aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMAsmBackend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/ARM/ARMAsmBackend.cpp')
-rw-r--r--lib/Target/ARM/ARMAsmBackend.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Target/ARM/ARMAsmBackend.cpp b/lib/Target/ARM/ARMAsmBackend.cpp
index 7c4823d8ba..0bf6dd6e13 100644
--- a/lib/Target/ARM/ARMAsmBackend.cpp
+++ b/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;
}