[PATCH] D68057: [mips] Relax jalr/jr instructions using R_MIPS_JALR relocation

Simon Atanasyan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 15:22:01 PDT 2019


atanasyan created this revision.
atanasyan added reviewers: ruiu, grimar.
Herald added subscribers: MaskRay, jrtc27, arichardson, sdardis, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.

The R_MIPS_JALR relocation denotes jalr/jr instructions in position independent code. Both these instructions take a target's address from the $25 register. If offset to the target symbol fits into the 18-bits, it's more efficient to replace jalr/jr by bal/b instructions.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D68057

Files:
  lld/ELF/Arch/Mips.cpp
  lld/test/ELF/mips-jalr.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68057.221844.patch
Type: text/x-patch
Size: 2922 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190925/74a7a606/attachment.bin>


More information about the llvm-commits mailing list