[PATCH] D102575: [SPARC][MC] Support more relocation types
LemonBoy via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 16 12:47:33 PDT 2021
LemonBoy added a comment.
> Is "tail reloc" a standard term for this?
Not really, the operand matches relocation operands in tail position hence the name. I'm open to suggestions.
================
Comment at: llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp:863
+template <unsigned Kind>
+OperandMatchResultTy SparcAsmParser::parseTailRelocSym(OperandVector &Operands) {
----------------
jrtc27 wrote:
> Make this an enum class (and pass it as a string in TableGen rather than an int)
Will do, I can see that having the Kind as bare numbers can be confusing.
================
Comment at: llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp:895-896
+ switch (VK) {
+ case SparcMCExpr::VK_Sparc_TLS_IE_LD:
+ case SparcMCExpr::VK_Sparc_TLS_IE_LDX:
+ return true;
----------------
jrtc27 wrote:
> These want to be separate kinds so you can stop people using %tie_ld with ldx
The idea is to perform only a minimum amount of parsing + backtracking in the parser, this kind of check is better suited to a `validateInstruction` hook as many other targets do.
================
Comment at: llvm/lib/Target/Sparc/SparcInstrInfo.td:1381
(tlsld ADDRrr:$addr, tglobaltlsaddr:$sym))]>;
+ def GDOP_LDrr : F3_1<3, 0b000000,
+ (outs IntRegs:$dst),
----------------
jrtc27 wrote:
> Doesn't belong under TLS
Oh well, I completely missed the ASCII-art header. I'll move it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102575/new/
https://reviews.llvm.org/D102575
More information about the llvm-commits
mailing list