diff options
author | Jim Grosbach <grosbach@apple.com> | 2012-04-26 20:48:12 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2012-04-26 20:48:12 +0000 |
commit | 9da7892fbe1c9e7c592c5928e36724a0e190a777 (patch) | |
tree | 096bd548752a8df25be2d3e0aa2b71aa9b4942a0 /lib | |
parent | dba86d8ec204a90bc3f129ffde833242cf58b90c (diff) | |
download | llvm-9da7892fbe1c9e7c592c5928e36724a0e190a777.tar.gz llvm-9da7892fbe1c9e7c592c5928e36724a0e190a777.tar.bz2 llvm-9da7892fbe1c9e7c592c5928e36724a0e190a777.tar.xz |
ARM: Thumb ldr(literal) base address alignment is 32-bits.
The base address for the PC-relative load is Align(PC,4), so it's the
address of the word containing the 16-bit instruction, not the address
of the instruction itself. Ugh.
rdar://11314619
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155659 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp b/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp index d10bfc104a..a281dd3858 100644 --- a/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp +++ b/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp @@ -84,7 +84,8 @@ public: { "fixup_arm_thumb_bl", 0, 32, MCFixupKindInfo::FKF_IsPCRel }, { "fixup_arm_thumb_blx", 0, 32, MCFixupKindInfo::FKF_IsPCRel }, { "fixup_arm_thumb_cb", 0, 16, MCFixupKindInfo::FKF_IsPCRel }, -{ "fixup_arm_thumb_cp", 0, 8, MCFixupKindInfo::FKF_IsPCRel }, +{ "fixup_arm_thumb_cp", 0, 8, MCFixupKindInfo::FKF_IsPCRel | + MCFixupKindInfo::FKF_IsAlignedDownTo32Bits}, { "fixup_arm_thumb_bcc", 0, 8, MCFixupKindInfo::FKF_IsPCRel }, // movw / movt: 16-bits immediate but scattered into two chunks 0 - 12, 16 - 19. { "fixup_arm_movt_hi16", 0, 20, 0 }, |