diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-01-26 05:15:20 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-01-26 05:15:20 +0000 |
| commit | cc0f734cd0ea84bc9a7d5a2df40a11126ac3ae2a (patch) | |
| tree | 9c0dc2424260b5d1a7bef946eddca2fe013ced1d /llvm/lib/Target | |
| parent | 279de3ef6407711e1465915a7bb2bb4ba6ca92da (diff) | |
| download | bcm5719-llvm-cc0f734cd0ea84bc9a7d5a2df40a11126ac3ae2a.tar.gz bcm5719-llvm-cc0f734cd0ea84bc9a7d5a2df40a11126ac3ae2a.zip | |
simplify asmprinter: only emit .set directives when entries have
EK_LabelDifference32 kind and the target has .set support. Simplify
X86AsmPrinter::printPICJumpTableSetLabel to make use of recent helpers.
llvm-svn: 94518
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp b/llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp index cc124139020..9f1424b7cbc 100644 --- a/llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp +++ b/llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp @@ -455,17 +455,8 @@ void X86AsmPrinter::printMemReference(const MachineInstr *MI, unsigned Op, void X86AsmPrinter::printPICJumpTableSetLabel(unsigned uid, const MachineBasicBlock *MBB) const { - if (!MAI->getSetDirective()) - return; - - // We don't need .set machinery if we have GOT-style relocations - if (Subtarget->isPICStyleGOT()) // X86-32 on ELF. - return; - - O << MAI->getSetDirective() << ' ' << MAI->getPrivateGlobalPrefix() - << getFunctionNumber() << '_' << uid << "_set_" << MBB->getNumber() << ','; - - O << *MBB->getSymbol(OutContext); + O << MAI->getSetDirective() << ' ' << *GetJTSetSymbol(uid, MBB->getNumber()) + << ',' << *MBB->getSymbol(OutContext); if (Subtarget->isPICStyleRIPRel()) O << '-' << *GetJTISymbol(uid) << '\n'; |

