[llvm-commits] [llvm] r128117 - /llvm/trunk/lib/MC/MachObjectWriter.cpp

Owen Anderson resistor at mac.com
Tue Mar 22 15:52:54 PDT 2011


Author: resistor
Date: Tue Mar 22 17:52:54 2011
New Revision: 128117

URL: http://llvm.org/viewvc/llvm-project?rev=128117&view=rev
Log:
RIT_ARM_ThumbBranch32Bit relocations are not used and should never be generated.
This fixes kimwitu++, bullet, and tramp3dv4 with the ARM integrated assembler.
Fixes <rdar://problem/9165738>.

Modified:
    llvm/trunk/lib/MC/MachObjectWriter.cpp

Modified: llvm/trunk/lib/MC/MachObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MachObjectWriter.cpp?rev=128117&r1=128116&r2=128117&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MachObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/MachObjectWriter.cpp Tue Mar 22 17:52:54 2011
@@ -821,7 +821,7 @@
     //  1 - :upper16: for movt instructions
     // high bit of r_length:
     //  0 - arm instructions
-    //  1 - thumb instructions   
+    //  1 - thumb instructions
     // the other half of the relocated expression is in the following pair
     // relocation entry in the the low 16 bits of r_address field.
     unsigned ThumbBit = 0;
@@ -949,15 +949,11 @@
 
       // Handle Thumb branches.
     case ARM::fixup_arm_thumb_br:
+    case ARM::fixup_arm_thumb_bl:
       RelocType = unsigned(macho::RIT_ARM_ThumbBranch22Bit);
       Log2Size = llvm::Log2_32(2);
       return true;
 
-    case ARM::fixup_arm_thumb_bl:
-      RelocType = unsigned(macho::RIT_ARM_ThumbBranch32Bit);
-      Log2Size = llvm::Log2_32(4);
-      return true;
-
     case ARM::fixup_arm_thumb_blx:
       RelocType = unsigned(macho::RIT_ARM_ThumbBranch22Bit);
       // Report as 'long', even though that is not quite accurate.





More information about the llvm-commits mailing list