[PATCH] D17008: [lanai] Add MCExpr and ELF relocations
James Y Knight via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 9 10:54:20 PST 2016
jyknight added a subscriber: jyknight.
================
Comment at: include/llvm/MC/MCExpr.h:294
@@ -293,1 +293,3 @@
+ VK_Lanai_ABS_HI,
+ VK_Lanai_ABS_LO,
----------------
It looks like half the backends put target specific expr kinds in a subclass of MCTargetExpr, instead of in here. I'm not sure, but maybe that's the way you're supposed to do it now?
================
Comment at: include/llvm/Object/RelocVisitor.h:324
@@ +323,3 @@
+ RelocToApply visitELF_Lanai_32(RelocationRef R, uint64_t Value) {
+ uint32_t Res = Value & 0xFFFFFFFF;
+ return RelocToApply(Res, 4);
----------------
No call to getELFAddend needed here?
================
Comment at: lib/MC/MCExpr.cpp:316
@@ -313,1 +315,3 @@
.Case("got", VK_GOT)
+ .Case("lo", VK_Lanai_ABS_LO)
+ .Case("hi", VK_Lanai_ABS_HI)
----------------
This, in particular, seems an unfortunate consequence of not using a LanaiMCExpr: a very generic name, assigned a target-specific variant.
http://reviews.llvm.org/D17008
More information about the llvm-commits
mailing list