aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMAsmBackend.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-12-10 17:13:40 +0000
committerJim Grosbach <grosbach@apple.com>2010-12-10 17:13:40 +0000
commit01086451393ef33e82b6fad623989dd97dd70edf (patch)
tree15898316fb4d622048d0b83e354954d0c9d1cb36 /lib/Target/ARM/ARMAsmBackend.cpp
parentc8cfbcb99a2002d4c7b0ae3734cf4609f0663dde (diff)
Thumb conditional branch binary encodings. rdar://8745367
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121493 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMAsmBackend.cpp')
-rw-r--r--lib/Target/ARM/ARMAsmBackend.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMAsmBackend.cpp b/lib/Target/ARM/ARMAsmBackend.cpp
index 7311b4181d..de05472f90 100644
--- a/lib/Target/ARM/ARMAsmBackend.cpp
+++ b/lib/Target/ARM/ARMAsmBackend.cpp
@@ -200,6 +200,9 @@ static unsigned adjustFixupValue(unsigned Kind, uint64_t Value) {
uint32_t Binary = (Value - 4) >> 1;
return ((Binary & 0x20) << 9) | ((Binary & 0x1f) << 3);
}
+ case ARM::fixup_arm_thumb_bcc:
+ // Offset by 4 and don't encode the lower bit, which is always 0.
+ return ((Value - 4) >> 1) & 0xff;
case ARM::fixup_arm_pcrel_10:
Value = Value - 6; // ARM fixups offset by an additional word and don't
// need to adjust for the half-word ordering.
@@ -310,6 +313,7 @@ static unsigned getFixupKindNumBytes(unsigned Kind) {
default:
llvm_unreachable("Unknown fixup kind!");
+ case ARM::fixup_arm_thumb_bcc:
case ARM::fixup_arm_thumb_cp:
return 1;