summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-25 19:39:52 +0000
committerChris Lattner <sabre@nondot.org>2010-01-25 19:39:52 +0000
commit6330d5330e35c65efe3b414710818bdc043edc1c (patch)
treeb3c7f201e007271a2329185dadb59ab5acc67bda /llvm/lib/Target
parenta9ee93ef42f2fb8d338b686767556d45fbb81a02 (diff)
downloadbcm5719-llvm-6330d5330e35c65efe3b414710818bdc043edc1c.tar.gz
bcm5719-llvm-6330d5330e35c65efe3b414710818bdc043edc1c.zip
sink an arm specific method out of asmprinter into the ARMAsmPrinter and
rename it to avoid shadowing. llvm-svn: 94440
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp18
-rw-r--r--llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.h4
2 files changed, 17 insertions, 5 deletions
diff --git a/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
index e1f386ee3dd..f3f86402a55 100644
--- a/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
+++ b/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
@@ -167,6 +167,9 @@ namespace {
void EmitStartOfAsmFile(Module &M);
void EmitEndOfAsmFile(Module &M);
+ virtual void printPICJumpTableSetLabel2(unsigned uid, unsigned uid2,
+ const MachineBasicBlock *MBB) const;
+
/// EmitMachineConstantPoolValue - Print a machine constantpool value to
/// the .s file.
virtual void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) {
@@ -904,6 +907,19 @@ void ARMAsmPrinter::printCPInstOperand(const MachineInstr *MI, int OpNum,
}
}
+void ARMAsmPrinter::printPICJumpTableSetLabel2(unsigned uid, unsigned uid2,
+ const MachineBasicBlock *MBB) const {
+ if (!MAI->getSetDirective())
+ return;
+
+ O << MAI->getSetDirective() << ' ' << MAI->getPrivateGlobalPrefix()
+ << getFunctionNumber() << '_' << uid << '_' << uid2
+ << "_set_" << MBB->getNumber() << ','
+ << *GetMBBSymbol(MBB->getNumber())
+ << '-' << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber()
+ << '_' << uid << '_' << uid2 << '\n';
+}
+
void ARMAsmPrinter::printJTBlockOperand(const MachineInstr *MI, int OpNum) {
assert(!Subtarget->isThumb2() && "Thumb2 should use double-jump jumptables!");
@@ -927,7 +943,7 @@ void ARMAsmPrinter::printJTBlockOperand(const MachineInstr *MI, int OpNum) {
bool isNew = JTSets.insert(MBB);
if (UseSet && isNew)
- printPICJumpTableSetLabel(JTI, MO2.getImm(), MBB);
+ printPICJumpTableSetLabel2(JTI, MO2.getImm(), MBB);
O << JTEntryDirective << ' ';
if (UseSet)
diff --git a/llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.h b/llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.h
index 6a9262d90fe..fc94033ec2a 100644
--- a/llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.h
+++ b/llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.h
@@ -126,10 +126,6 @@ class VISIBILITY_HIDDEN X86AsmPrinter : public AsmPrinter {
const char *Modifier=NULL);
void printPICJumpTableSetLabel(unsigned uid,
const MachineBasicBlock *MBB) const;
- void printPICJumpTableSetLabel(unsigned uid, unsigned uid2,
- const MachineBasicBlock *MBB) const {
- AsmPrinter::printPICJumpTableSetLabel(uid, uid2, MBB);
- }
void printPICJumpTableEntry(const MachineJumpTableInfo *MJTI,
const MachineBasicBlock *MBB,
unsigned uid) const;
OpenPOWER on IntegriCloud