[all-commits] [llvm/llvm-project] 457e14: [LLD][ARM] Arm v6-m should not use short Thunks. (...
Peter Smith via All-commits
all-commits at lists.llvm.org
Mon Dec 9 03:25:08 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 457e14b9266496b3f92f642dd13a005af4670a6a
https://github.com/llvm/llvm-project/commit/457e14b9266496b3f92f642dd13a005af4670a6a
Author: Peter Smith <peter.smith at arm.com>
Date: 2024-12-09 (Mon, 09 Dec 2024)
Changed paths:
M lld/ELF/Thunks.cpp
A lld/test/ELF/arm-thumb-thunk-v6m-noshort.s
Log Message:
-----------
[LLD][ARM] Arm v6-m should not use short Thunks. (#118111)
Thumb short thunks use the B.w instruction. This instruction is not
present on Arm v6-m so we should prevent these targets from using
short-thunks. We want to permit Arm v8-m.base targets to continue using
short thunks as it does have the B.w instruction despite not
implementing all of Thumb 2.
Add a check to see if the Movt and Movw instructions are present before
enabling short thunks for Thumb. The v6-m architecture has
J1J2BranchEncoding, but it does not have Movt and Movw, whereas
v8-m.base has both.
The memory map and limited flash size of an Arm v6-m CPU makes a short
thunk very unlikely in practice, but it is worth getting it right just
in case.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list