[PATCH] [mips64] Emit correct addend for R_MIPS_PC16, R_MIPS_PC21_S2 and R_MIPS_PC26_S2 relocations.
Daniel Sanders
daniel.sanders at imgtec.com
Mon Jun 22 07:02:30 PDT 2015
LGTM with some formatting nits.
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,
----------------
Nit: Indent according to what clang-format would do
================
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,
----------------
Likewise
================
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,
----------------
Likewise
http://reviews.llvm.org/D10565
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list