[PATCH] Extend MipsMCExpr class to handle %higher(sym1 - sym2 + const) and %highest(sym1 - sym2 + const) relocations.

Sasa Stankovic Sasa.Stankovic at imgtec.com
Wed Apr 2 07:58:58 PDT 2014


  > Since higher_highest.ll is currently disabled, and since it tests at the wrong level (.ll) for test/MC, would it make sense  > to remove it?

  I deleted this file and moved its CHECK's to higher-highest-addressing.s. (The file tests that R_MIPS_HIGHER and R_MIPS_HIGHEST relocations are emitted in the .o file. Since it uses -force-mips-long-branch option, it was created when MipsLongBranch's implementation was emitting R_MIPS_HIGHER and R_MIPS_HIGHEST relocations in the .o file, and was disabled when MipsLongBranch started to directly calculate offsets.)

  > Maybe remove these labels if they're not needed for the test?

  I removed $L3 and $L4 and changed last two checks to test %higher(const) and %highest(const), but I left $L1 and $L2 because %higher($L1-$L2) and %higher(const) and handled in different parts of MipsAsmParser::evaluateRelocExpr function. This way, both code paths in evaluateRelocExpr will be tested.


================
Comment at: lib/Target/Mips/MCTargetDesc/MipsMCExpr.h:40
@@ -35,2 +39,3 @@
+
   static const MipsMCExpr *Create(VariantKind Kind, const MCExpr *Expr,
                                   MCContext &Ctx);
----------------
Mark Seaborn wrote:
> This isn't used any more, is it?
It is used in the long branch patch, but I'll change the code there to use the other Create function.


http://llvm-reviews.chandlerc.com/D3230



More information about the llvm-commits mailing list