summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2012-03-30 21:54:22 +0000
committerJim Grosbach <grosbach@apple.com>2012-03-30 21:54:22 +0000
commit913cc3072d0500667444fbfdfed6c43d431d7f3f (patch)
tree4efac27171d116c8d2b8ed19a7dea9010824938d /llvm/lib
parent185f2edd70a34d28b305df0cd8ce519ecbca2cfd (diff)
downloadbcm5719-llvm-913cc3072d0500667444fbfdfed6c43d431d7f3f.tar.gz
bcm5719-llvm-913cc3072d0500667444fbfdfed6c43d431d7f3f.zip
ARM fix encoding fixup resolution for ldrd and friends.
The 8-bit payload is not contiguous in the opcode. Move the upper nibble over 4 bits into the correct place. rdar://11158641 llvm-svn: 153780
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp b/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
index 3ba891da4f7..5f2138d5de9 100644
--- a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
+++ b/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
@@ -469,7 +469,9 @@ static unsigned adjustFixupValue(unsigned Kind, uint64_t Value) {
Value = -Value;
isAdd = false;
}
+ // The value has the low 4 bits encoded in [3:0] and the high 4 in [11:8].
assert ((Value < 256) && "Out of range pc-relative fixup value!");
+ Value = (Value & 0xf) | ((Value & 0xf0) << 4);
return Value | (isAdd << 23);
}
case ARM::fixup_arm_pcrel_10:
OpenPOWER on IntegriCloud