Unbreak x86-64 jumptable.
authorEvan Cheng <evan.cheng@apple.com>
Fri, 9 Nov 2007 19:11:23 +0000 (19:11 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 9 Nov 2007 19:11:23 +0000 (19:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43955 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ATTAsmPrinter.cpp

index 07162115fa9452ff7948e82c7069d8f8fe077d83..cee802d1650a2a967c165042f149629f34b9900e 100644 (file)
@@ -506,7 +506,11 @@ void X86ATTAsmPrinter::printPICJumpTableSetLabel(unsigned uid,
   O << TAI->getSetDirective() << ' ' << TAI->getPrivateGlobalPrefix()
     << getFunctionNumber() << '_' << uid << "_set_" << MBB->getNumber() << ',';
   printBasicBlockLabel(MBB, false, false);
-  O << '-' << computePICLabel(getFunctionNumber(), TAI, Subtarget) << '\n';
+  if (Subtarget->isPICStyleRIPRel())
+    O << '-' << TAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber() 
+      << '_' << uid << '\n';
+  else
+    O << '-' << computePICLabel(getFunctionNumber(), TAI, Subtarget) << '\n';
 }
 
 void X86ATTAsmPrinter::printPICLabel(const MachineInstr *MI, unsigned Op) {