[PATCH] D56694: [mips] Emit .reloc R_{MICRO}MIPS_JALR along with j(al)r(c) $25
Vladimir Stefanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 17 07:59:09 PST 2019
vstefanovic marked an inline comment as done.
vstefanovic added inline comments.
================
Comment at: lib/Target/Mips/MipsAsmPrinter.cpp:165
+ const MipsSubtarget &Subtarget) {
+ if (!(MI.isReturn() || MI.isCall() || MI.isIndirectBranch()))
+ return;
----------------
atanasyan wrote:
> # Let's move this `if` statement where we call `emitDirectiveRelocJalr`. So we will not call `emitDirectiveRelocJalr` for move, compare etc instructions at all.
> # If I comment out this statement no one test fail. I think we need a test checks that we do not emit `JALR` for inappropriate instructions.
This 'if' is not to prevent emitting any wrong .reloc but only to skip looping over instructions that certainly don't have an MO_JALR operand.
Btw, this function is inlined for non-O0.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56694/new/
https://reviews.llvm.org/D56694
More information about the llvm-commits
mailing list