[PATCH] D55292: [mips][mc] Emit R_{MICRO}MIPS_JALR when expanding jal to jalr

Vladimir Stefanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 4 13:03:06 PST 2018


vstefanovic created this revision.
vstefanovic added a reviewer: atanasyan.
Herald added subscribers: jrtc27, arichardson, sdardis.

When replacing jal with jalr, also emit '.reloc R_MIPS_JALR' (R_MICROMIPS_JALR
for micromips).
The linker might then be able to turn jalr into a direct call.
Add '-mips-jalr-reloc' to enable/disable this feature (default is true).


Repository:
  rL LLVM

https://reviews.llvm.org/D55292

Files:
  lib/Target/Mips/AsmParser/MipsAsmParser.cpp
  test/MC/Mips/expansion-jal-sym-pic.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55292.176700.patch
Type: text/x-patch
Size: 12993 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181204/b09e0bed/attachment.bin>


More information about the llvm-commits mailing list