[llvm-commits] [llvm] r122131 - /llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp

Bill Wendling isanbard at gmail.com
Fri Dec 17 18:13:59 PST 2010


Author: void
Date: Fri Dec 17 20:13:59 2010
New Revision: 122131

URL: http://llvm.org/viewvc/llvm-project?rev=122131&view=rev
Log:
r120333 changed the opcode for the Thumb1 stuff from ARM::tMOVr to
ARM::tMOVgpr2gpr. But this check didn't change. As a result, we were getting
misaligned references to the jump table from an ADR instruction.

There is a test case, but unfortunately it's sensitive to random code changes.

<rdar://problem/8782223>

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

Modified: llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp?rev=122131&r1=122130&r2=122131&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp Fri Dec 17 20:13:59 2010
@@ -1025,7 +1025,7 @@
     OutStreamer.EmitInstruction(TmpInst);
 
     // Make sure the Thumb jump table is 4-byte aligned.
-    if (Opc == ARM::tMOVr)
+    if (Opc == ARM::tMOVgpr2gpr)
       EmitAlignment(2);
 
     // Output the data for the jump table itself





More information about the llvm-commits mailing list