[llvm-commits] [llvm] r121216 - /llvm/trunk/lib/Target/ARM/ARMAsmBackend.cpp

Owen Anderson resistor at mac.com
Tue Dec 7 16:21:33 PST 2010


Author: resistor
Date: Tue Dec  7 18:21:33 2010
New Revision: 121216

URL: http://llvm.org/viewvc/llvm-project?rev=121216&view=rev
Log:
Simplify the byte reordering logic slightly.

Modified:
    llvm/trunk/lib/Target/ARM/ARMAsmBackend.cpp

Modified: llvm/trunk/lib/Target/ARM/ARMAsmBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMAsmBackend.cpp?rev=121216&r1=121215&r2=121216&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMAsmBackend.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMAsmBackend.cpp Tue Dec  7 18:21:33 2010
@@ -131,10 +131,8 @@
     
     // 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;
     }
     





More information about the llvm-commits mailing list