diff options
author | Owen Anderson <resistor@mac.com> | 2010-12-10 23:02:28 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2010-12-10 23:02:28 +0000 |
commit | 235c27644229204535e3b48240f4e22ef9734da2 (patch) | |
tree | d8e283055a4dfd08c20d6f7d8cc1ffc9ecde3ba6 | |
parent | 0348af667aea0f7806b4439cb1c40f9679f3164e (diff) | |
download | bcm5719-llvm-235c27644229204535e3b48240f4e22ef9734da2.tar.gz bcm5719-llvm-235c27644229204535e3b48240f4e22ef9734da2.zip |
Attempt to get Thumb2 branch fixups working properly.
llvm-svn: 121593
-rw-r--r-- | llvm/lib/Target/ARM/ARMAsmBackend.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/ARMAsmBackend.cpp b/llvm/lib/Target/ARM/ARMAsmBackend.cpp index 4555cd2082d..e81e454d397 100644 --- a/llvm/lib/Target/ARM/ARMAsmBackend.cpp +++ b/llvm/lib/Target/ARM/ARMAsmBackend.cpp @@ -141,7 +141,7 @@ static unsigned adjustFixupValue(unsigned Kind, uint64_t Value) { // Offset by 8 just as above. return 0xffffff & ((Value - 8) >> 2); case ARM::fixup_t2_branch: { - Value = Value - 6; + Value = Value - 4; Value >>= 1; // Low bit is not encoded. uint64_t out = 0; diff --git a/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp b/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp index 35f2bbd1df7..0bca50eb349 100644 --- a/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp +++ b/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp @@ -57,8 +57,7 @@ public: MCFixupKindInfo::FKF_IsAligned}, { "fixup_arm_adr_pcrel_12", 1, 24, MCFixupKindInfo::FKF_IsPCRel }, { "fixup_arm_branch", 1, 24, MCFixupKindInfo::FKF_IsPCRel }, -{ "fixup_t2_branch", 0, 32, MCFixupKindInfo::FKF_IsPCRel | - MCFixupKindInfo::FKF_IsAligned}, +{ "fixup_t2_branch", 0, 32, MCFixupKindInfo::FKF_IsPCRel }, { "fixup_arm_thumb_br", 0, 16, MCFixupKindInfo::FKF_IsPCRel }, { "fixup_arm_thumb_bl", 0, 32, MCFixupKindInfo::FKF_IsPCRel }, { "fixup_arm_thumb_blx", 7, 21, MCFixupKindInfo::FKF_IsPCRel }, |