[all-commits] [llvm/llvm-project] 62c605: [lld][ARM] support absolute thunks for Armv4T Thum...
Ties Stuij via All-commits
all-commits at lists.llvm.org
Wed Dec 21 03:06:27 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 62c605771a30962e32c7e14d8911c3e5e829b38d
https://github.com/llvm/llvm-project/commit/62c605771a30962e32c7e14d8911c3e5e829b38d
Author: Ties Stuij <ties at stuij.se>
Date: 2022-12-21 (Wed, 21 Dec 2022)
Changed paths:
M lld/ELF/Arch/ARM.cpp
M lld/ELF/Driver.cpp
M lld/ELF/Thunks.cpp
A lld/test/ELF/arm-bl-v4t.s
M lld/test/ELF/arm-bl-v6.s
R lld/test/ELF/arm-blx-v4t.s
M lld/test/ELF/arm-blx.s
A lld/test/ELF/arm-bx-v4t.s
M lld/test/ELF/arm-thumb-interwork-thunk-v5.s
M lld/test/ELF/arm-thunk-multipass-plt.s
Log Message:
-----------
[lld][ARM] support absolute thunks for Armv4T Thumb and interworking
changes:
- BLX: The Arm architecture versions that support the branch and link
instruction (BLX), can rewrite BLs in place when a state change from Arm<->Thumb
is required. Armv4T does not have BLX and so needs thunks for state changes.
- v4T Thumb long branches needed their own thunk. We could have used the v6M
implementation, but v6M doesn't have Arm state and must resolve to rather
inefficient stack reshuffling. We also can't reuse v7 thumb thunks as they use
MOVV/MOVT, which wasn't available yet for v4T.
- Remove the `lack of BLX' warning. LLVM only supports Arm Architecture versions
upwards of v4, which we now all support in LLD.
- renamed existing thunks to better reflect their use:
ARMV5ABSLongThunk -> ARMV5LongLdrPcThunk,
ARMV5PILongThunk -> ARMV4PILongThunk
- removed isCompatibleWith method from ARMV5ABSLongThunk and ARMV5PILongThunk,
as they were identical to the ARMThunk parent class implementation.
Support for (efficient) position independent thunks for v4T will be added in a
follow-up patch, including possible related thunk renaming and code comment
cleanup.
Reviewed By: MaskRay, peter.smith
Differential Revision: https://reviews.llvm.org/D139888
More information about the All-commits
mailing list