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

Owen Anderson resistor at mac.com
Tue Dec 14 11:42:53 PST 2010


Author: resistor
Date: Tue Dec 14 13:42:53 2010
New Revision: 121784

URL: http://llvm.org/viewvc/llvm-project?rev=121784&view=rev
Log:
Fix a small bug (typo?) in the fixup for Thumb1 CBZ/CBNZ instructions.

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=121784&r1=121783&r2=121784&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMAsmBackend.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMAsmBackend.cpp Tue Dec 14 13:42:53 2010
@@ -238,7 +238,7 @@
   case ARM::fixup_arm_thumb_cb: {
     // Offset by 4 and don't encode the lower bit, which is always 0.
     uint32_t Binary = (Value - 4) >> 1;
-    return ((Binary & 0x20) << 9) | ((Binary & 0x1f) << 3);
+    return ((Binary & 0x20) << 4) | ((Binary & 0x1f) << 3);
   }
   case ARM::fixup_arm_thumb_br:
     // Offset by 4 and don't encode the lower bit, which is always 0.





More information about the llvm-commits mailing list