[lld][ARM] don't use short thumb thunks if no branch range extension
In ThumbThunk::isCompatibleWith, we check if we can use short thunks if we are within branch range. However these short thumb thunks will generate b.w instructions, and these are not available on pre branch range extension architectures. On these architectures (v4, v5, and most of v6), we could replace the b.w with a Thumb b (2) instruction, but that would in an ideal situation only give us an extra range of 2048 bytes on top of the 4MB range of a BL, if a thunk section happens to be placed on the outer range of a BL and the stars are aligned. It doesn't seem worth it. What would be worth it is a state change to Arm and a subsequent branch to either Arm or Thumb code. But that's the subject of another patch. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D140633
Loading
Please sign in to comment