don't use emitlabel in the arm asm printer yet, the order
authorChris Lattner <sabre@nondot.org>
Mon, 5 Apr 2010 17:52:31 +0000 (17:52 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 5 Apr 2010 17:52:31 +0000 (17:52 +0000)
isn't well specified.  ARM really needs to have its instprinter
finished at some point.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100439 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp

index 8e855f5be72b8415cf7eab46191dad04a14474c6..15c52946cf589c045ee04405b16d1a6ff9dcbb9a 100644 (file)
@@ -935,7 +935,9 @@ void ARMAsmPrinter::printJTBlockOperand(const MachineInstr *MI, int OpNum,
   
   unsigned JTI = MO1.getIndex();
   MCSymbol *JTISymbol = GetARMJTIPICJumpTableLabel2(JTI, MO2.getImm());
-  OutStreamer.EmitLabel(JTISymbol);
+  // Can't use EmitLabel until instprinter happens, label comes out in the wrong
+  // order.
+  O << *JTISymbol << ":\n";
 
   const char *JTEntryDirective = MAI->getData32bitsDirective();
 
@@ -974,7 +976,10 @@ void ARMAsmPrinter::printJT2BlockOperand(const MachineInstr *MI, int OpNum,
   unsigned JTI = MO1.getIndex();
   
   MCSymbol *JTISymbol = GetARMJTIPICJumpTableLabel2(JTI, MO2.getImm());
-  OutStreamer.EmitLabel(JTISymbol);
+  
+  // Can't use EmitLabel until instprinter happens, label comes out in the wrong
+  // order.
+  O << *JTISymbol << ":\n";
 
   const MachineJumpTableInfo *MJTI = MF->getJumpTableInfo();
   const std::vector<MachineJumpTableEntry> &JT = MJTI->getJumpTables();