diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-12-10 17:13:40 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-12-10 17:13:40 +0000 |
commit | 78485ad65e38bf6d4d74cd990d06cc3d49f24073 (patch) | |
tree | 1f84632fa66671161fffeab41cf51ebe8dc580ef /llvm/lib/Target/ARM/ARMAsmBackend.cpp | |
parent | 0168763e7d90bad49714fd9db1f1b01326f20caf (diff) | |
download | bcm5719-llvm-78485ad65e38bf6d4d74cd990d06cc3d49f24073.tar.gz bcm5719-llvm-78485ad65e38bf6d4d74cd990d06cc3d49f24073.zip |
Thumb conditional branch binary encodings. rdar://8745367
llvm-svn: 121493
Diffstat (limited to 'llvm/lib/Target/ARM/ARMAsmBackend.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMAsmBackend.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMAsmBackend.cpp b/llvm/lib/Target/ARM/ARMAsmBackend.cpp index 7311b4181df..de05472f906 100644 --- a/llvm/lib/Target/ARM/ARMAsmBackend.cpp +++ b/llvm/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; |