summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMAsmBackend.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2010-12-08 00:21:33 +0000
committerOwen Anderson <resistor@mac.com>2010-12-08 00:21:33 +0000
commit72ce453c739c0c7bf6fae61bc3a3ac97a2a5314f (patch)
tree0178baec9d99fc1932a5b36bab9c65eb354d4046 /llvm/lib/Target/ARM/ARMAsmBackend.cpp
parent0f7142d80802844ca85cb41a0df32017dbf7e0da (diff)
downloadbcm5719-llvm-72ce453c739c0c7bf6fae61bc3a3ac97a2a5314f.tar.gz
bcm5719-llvm-72ce453c739c0c7bf6fae61bc3a3ac97a2a5314f.zip
Simplify the byte reordering logic slightly.
llvm-svn: 121216
Diffstat (limited to 'llvm/lib/Target/ARM/ARMAsmBackend.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMAsmBackend.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Target/ARM/ARMAsmBackend.cpp b/llvm/lib/Target/ARM/ARMAsmBackend.cpp
index 7c4823d8ba4..0bf6dd6e13d 100644
--- a/llvm/lib/Target/ARM/ARMAsmBackend.cpp
+++ b/llvm/lib/Target/ARM/ARMAsmBackend.cpp
@@ -131,10 +131,8 @@ static unsigned adjustFixupValue(unsigned Kind, uint64_t Value) {
// Same addressing mode as fixup_arm_pcrel_10, but with the bytes reordered.
if (Kind == ARM::fixup_t2_pcrel_10) {
- uint64_t swapped = (Value & 0x00FF0000) >> 16;
- swapped |= (Value & 0xFF000000) >> 16;
- swapped |= (Value & 0x000000FF) << 16;
- swapped |= (Value & 0x0000FF00) << 16;
+ uint64_t swapped = (Value & 0xFFFF0000) >> 16;
+ swapped |= (Value & 0x0000FFFF) << 16;
return swapped;
}
OpenPOWER on IntegriCloud