[PATCH] D31662: [LLD][ELF] Introduce range extension thunks for ARM

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 4 04:31:47 PDT 2017


peter.smith created this revision.
Herald added subscribers: rengolin, aemerson.

This change adds a new function to Target that can be used to check whether a call is in range. On ARM we can now generate a range extension thunk if the call is out of range.

      

With this change the existing tests arm-branch-error.s and arm-thumb-branch-error.s now no longer fail with an out of range branch. These have been renamed and tests added for the range extension thunk.

I've made the check for range Target Specific as there are sometimes rules that make relocation ranges irregular such as the alignment of the place of a Thumb blx instruction, and the ARM pc-bias of two instructions.


https://reviews.llvm.org/D31662

Files:
  ELF/Relocations.cpp
  ELF/Relocations.h
  ELF/Target.cpp
  ELF/Target.h
  ELF/Thunks.cpp
  test/ELF/arm-branch-error.s
  test/ELF/arm-branch-rangethunk.s
  test/ELF/arm-thumb-branch-error.s
  test/ELF/arm-thumb-branch-rangethunk.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31662.94042.patch
Type: text/x-patch
Size: 17436 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170404/8a630693/attachment.bin>


More information about the llvm-commits mailing list