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

Jim Grosbach grosbach at apple.com
Mon Dec 13 11:25:46 PST 2010


Author: grosbach
Date: Mon Dec 13 13:25:46 2010
New Revision: 121709

URL: http://llvm.org/viewvc/llvm-project?rev=121709&view=rev
Log:
Use 32-bit types for 32-bit values.

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=121709&r1=121708&r2=121709&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMAsmBackend.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMAsmBackend.cpp Mon Dec 13 13:25:46 2010
@@ -144,14 +144,14 @@
     Value = Value - 4;
     Value >>= 1; // Low bit is not encoded.
 
-    uint64_t out = 0;
+    uint32_t out = 0;
     out |= (Value & 0x80000) << 7; // S bit
     out |= (Value & 0x40000) >> 7; // J2 bit
     out |= (Value & 0x20000) >> 4; // J1 bit
     out |= (Value & 0x1F800) << 5; // imm6 field
     out |= (Value & 0x007FF);      // imm11 field
 
-    uint64_t swapped = (out & 0xFFFF0000) >> 16;
+    uint32_t swapped = (out & 0xFFFF0000) >> 16;
     swapped |= (out & 0x0000FFFF) << 16;
     return swapped;
   }
@@ -226,7 +226,7 @@
     // Same addressing mode as fixup_arm_pcrel_10,
     // but with 16-bit halfwords swapped.
     if (Kind == ARM::fixup_t2_pcrel_10) {
-      uint64_t swapped = (Value & 0xFFFF0000) >> 16;
+      uint32_t swapped = (Value & 0xFFFF0000) >> 16;
       swapped |= (Value & 0x0000FFFF) << 16;
       return swapped;
     }





More information about the llvm-commits mailing list