[PATCH] [mips64] Emit correct addend for R_MIPS_PC16, R_MIPS_PC21_S2 and R_MIPS_PC26_S2 relocations.
Vladimir Radosavljevic
vladimir.radosavljevic at rt-rk.com
Mon Jun 22 08:32:52 PDT 2015
REPOSITORY
rL LLVM
================
Comment at: lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp:229-230
@@ -228,3 +228,4 @@
- const MCExpr *Expr = MO.getExpr();
- Fixups.push_back(MCFixup::create(0, Expr,
+ const MCExpr *FixupExpression = MCBinaryExpr::createAdd(MO.getExpr(),
+ MCConstantExpr::create(-4, Ctx), Ctx);
+ Fixups.push_back(MCFixup::create(0, FixupExpression,
----------------
dsanders wrote:
> Nit: Indent according to what clang-format would do
Done.
================
Comment at: lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp:319-320
@@ -317,3 +318,4 @@
- const MCExpr *Expr = MO.getExpr();
- Fixups.push_back(MCFixup::create(0, Expr,
+ const MCExpr *FixupExpression = MCBinaryExpr::createAdd(MO.getExpr(),
+ MCConstantExpr::create(-4, Ctx), Ctx);
+ Fixups.push_back(MCFixup::create(0, FixupExpression,
----------------
dsanders wrote:
> Likewise
Done.
================
Comment at: lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp:342-343
@@ -339,3 +341,4 @@
- const MCExpr *Expr = MO.getExpr();
- Fixups.push_back(MCFixup::create(0, Expr,
+ const MCExpr *FixupExpression = MCBinaryExpr::createAdd(MO.getExpr(),
+ MCConstantExpr::create(-4, Ctx), Ctx);
+ Fixups.push_back(MCFixup::create(0, FixupExpression,
----------------
dsanders wrote:
> Likewise
Done.
http://reviews.llvm.org/D10565
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list