[llvm-commits] [llvm] r82391 - in /llvm/trunk/lib/Target/X86/AsmPrinter: X86ATTAsmPrinter.cpp X86ATTAsmPrinter.h X86AsmPrinter.cpp X86MCInstLower.cpp X86MCInstLower.h
Chris Lattner
sabre at nondot.org
Sun Sep 20 00:35:34 PDT 2009
Author: lattner
Date: Sun Sep 20 02:35:34 2009
New Revision: 82391
URL: http://llvm.org/viewvc/llvm-project?rev=82391&view=rev
Log:
rename X86ATTAsmPrinter class -> X86AsmPrinter
Modified:
llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h
llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.h
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp?rev=82391&r1=82390&r2=82391&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp Sun Sep 20 02:35:34 2009
@@ -50,20 +50,20 @@
// Primitive Helper Functions.
//===----------------------------------------------------------------------===//
-void X86ATTAsmPrinter::printMCInst(const MCInst *MI) {
+void X86AsmPrinter::printMCInst(const MCInst *MI) {
if (MAI->getAssemblerDialect() == 0)
X86ATTInstPrinter(O, *MAI).printInstruction(MI);
else
X86IntelInstPrinter(O, *MAI).printInstruction(MI);
}
-void X86ATTAsmPrinter::PrintPICBaseSymbol() const {
+void X86AsmPrinter::PrintPICBaseSymbol() const {
// FIXME: Gross const cast hack.
- X86ATTAsmPrinter *AP = const_cast<X86ATTAsmPrinter*>(this);
+ X86AsmPrinter *AP = const_cast<X86AsmPrinter*>(this);
X86MCInstLower(OutContext, 0, *AP).GetPICBaseSymbol()->print(O, MAI);
}
-void X86ATTAsmPrinter::emitFunctionHeader(const MachineFunction &MF) {
+void X86AsmPrinter::emitFunctionHeader(const MachineFunction &MF) {
unsigned FnAlign = MF.getAlignment();
const Function *F = MF.getFunction();
@@ -131,7 +131,7 @@
/// runOnMachineFunction - This uses the printMachineInstruction()
/// method to print assembly for each instruction.
///
-bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
+bool X86AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
const Function *F = MF.getFunction();
this->MF = &MF;
CallingConv::ID CC = F->getCallingConv();
@@ -205,7 +205,7 @@
/// printSymbolOperand - Print a raw symbol reference operand. This handles
/// jump tables, constant pools, global address and external symbols, all of
/// which print to a label with various suffixes for relocation types etc.
-void X86ATTAsmPrinter::printSymbolOperand(const MachineOperand &MO) {
+void X86AsmPrinter::printSymbolOperand(const MachineOperand &MO) {
switch (MO.getType()) {
default: llvm_unreachable("unknown symbol type!");
case MachineOperand::MO_JumpTableIndex:
@@ -348,7 +348,7 @@
/// print_pcrel_imm - This is used to print an immediate value that ends up
/// being encoded as a pc-relative value. These print slightly differently, for
/// example, a $ is not emitted.
-void X86ATTAsmPrinter::print_pcrel_imm(const MachineInstr *MI, unsigned OpNo) {
+void X86AsmPrinter::print_pcrel_imm(const MachineInstr *MI, unsigned OpNo) {
const MachineOperand &MO = MI->getOperand(OpNo);
switch (MO.getType()) {
default: llvm_unreachable("Unknown pcrel immediate operand");
@@ -366,7 +366,7 @@
}
-void X86ATTAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo,
+void X86AsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo,
const char *Modifier) {
const MachineOperand &MO = MI->getOperand(OpNo);
switch (MO.getType()) {
@@ -399,7 +399,7 @@
}
}
-void X86ATTAsmPrinter::printSSECC(const MachineInstr *MI, unsigned Op) {
+void X86AsmPrinter::printSSECC(const MachineInstr *MI, unsigned Op) {
unsigned char value = MI->getOperand(Op).getImm();
assert(value <= 7 && "Invalid ssecc argument!");
switch (value) {
@@ -414,8 +414,8 @@
}
}
-void X86ATTAsmPrinter::printLeaMemReference(const MachineInstr *MI, unsigned Op,
- const char *Modifier) {
+void X86AsmPrinter::printLeaMemReference(const MachineInstr *MI, unsigned Op,
+ const char *Modifier) {
const MachineOperand &BaseReg = MI->getOperand(Op);
const MachineOperand &IndexReg = MI->getOperand(Op+2);
const MachineOperand &DispSpec = MI->getOperand(Op+3);
@@ -458,8 +458,8 @@
}
}
-void X86ATTAsmPrinter::printMemReference(const MachineInstr *MI, unsigned Op,
- const char *Modifier) {
+void X86AsmPrinter::printMemReference(const MachineInstr *MI, unsigned Op,
+ const char *Modifier) {
assert(isMem(MI, Op) && "Invalid memory reference!");
const MachineOperand &Segment = MI->getOperand(Op+4);
if (Segment.getReg()) {
@@ -469,7 +469,7 @@
printLeaMemReference(MI, Op, Modifier);
}
-void X86ATTAsmPrinter::printPICJumpTableSetLabel(unsigned uid,
+void X86AsmPrinter::printPICJumpTableSetLabel(unsigned uid,
const MachineBasicBlock *MBB) const {
if (!MAI->getSetDirective())
return;
@@ -494,16 +494,16 @@
}
-void X86ATTAsmPrinter::printPICLabel(const MachineInstr *MI, unsigned Op) {
+void X86AsmPrinter::printPICLabel(const MachineInstr *MI, unsigned Op) {
PrintPICBaseSymbol();
O << '\n';
PrintPICBaseSymbol();
O << ':';
}
-void X86ATTAsmPrinter::printPICJumpTableEntry(const MachineJumpTableInfo *MJTI,
- const MachineBasicBlock *MBB,
- unsigned uid) const {
+void X86AsmPrinter::printPICJumpTableEntry(const MachineJumpTableInfo *MJTI,
+ const MachineBasicBlock *MBB,
+ unsigned uid) const {
const char *JTEntryDirective = MJTI->getEntrySize() == 4 ?
MAI->getData32bitsDirective() : MAI->getData64bitsDirective();
@@ -519,7 +519,7 @@
GetMBBSymbol(MBB->getNumber())->print(O, MAI);
}
-bool X86ATTAsmPrinter::printAsmMRegister(const MachineOperand &MO, char Mode) {
+bool X86AsmPrinter::printAsmMRegister(const MachineOperand &MO, char Mode) {
unsigned Reg = MO.getReg();
switch (Mode) {
default: return true; // Unknown mode.
@@ -546,9 +546,9 @@
/// PrintAsmOperand - Print out an operand for an inline asm expression.
///
-bool X86ATTAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
- unsigned AsmVariant,
- const char *ExtraCode) {
+bool X86AsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
+ unsigned AsmVariant,
+ const char *ExtraCode) {
// Does this asm operand have a single letter operand modifier?
if (ExtraCode && ExtraCode[0]) {
if (ExtraCode[1] != 0) return true; // Unknown modifier.
@@ -620,10 +620,9 @@
return false;
}
-bool X86ATTAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
- unsigned OpNo,
- unsigned AsmVariant,
- const char *ExtraCode) {
+bool X86AsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
+ unsigned OpNo, unsigned AsmVariant,
+ const char *ExtraCode) {
if (ExtraCode && ExtraCode[0]) {
if (ExtraCode[1] != 0) return true; // Unknown modifier.
@@ -650,7 +649,7 @@
/// printMachineInstruction -- Print out a single X86 LLVM instruction MI in
/// AT&T syntax to the current output stream.
///
-void X86ATTAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
+void X86AsmPrinter::printMachineInstruction(const MachineInstr *MI) {
++EmittedInsts;
processDebugLoc(MI->getDebugLoc());
@@ -662,7 +661,7 @@
O << '\n';
}
-void X86ATTAsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) {
+void X86AsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) {
if (!GVar->hasInitializer())
return; // External global require no code
@@ -803,7 +802,7 @@
O << "\t.size\t" << name << ", " << Size << '\n';
}
-void X86ATTAsmPrinter::EmitEndOfAsmFile(Module &M) {
+void X86AsmPrinter::EmitEndOfAsmFile(Module &M) {
if (Subtarget->isTargetDarwin()) {
// All darwin targets use mach-o.
TargetLoweringObjectFileMachO &TLOFMacho =
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h?rev=82391&r1=82390&r2=82391&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h Sun Sep 20 02:35:34 2009
@@ -32,10 +32,10 @@
class MCStreamer;
class MCSymbol;
-class VISIBILITY_HIDDEN X86ATTAsmPrinter : public AsmPrinter {
+class VISIBILITY_HIDDEN X86AsmPrinter : public AsmPrinter {
const X86Subtarget *Subtarget;
public:
- explicit X86ATTAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
+ explicit X86AsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
const MCAsmInfo *T, bool V)
: AsmPrinter(O, TM, T, V) {
Subtarget = &TM.getSubtarget<X86Subtarget>();
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp?rev=82391&r1=82390&r2=82391&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp Sun Sep 20 02:35:34 2009
@@ -30,7 +30,7 @@
TargetMachine &tm,
const MCAsmInfo *tai,
bool verbose) {
- return new X86ATTAsmPrinter(o, tm, tai, verbose);
+ return new X86AsmPrinter(o, tm, tai, verbose);
}
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp?rev=82391&r1=82390&r2=82391&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp Sun Sep 20 02:35:34 2009
@@ -392,8 +392,7 @@
-void X86ATTAsmPrinter::
-printInstructionThroughMCStreamer(const MachineInstr *MI) {
+void X86AsmPrinter::printInstructionThroughMCStreamer(const MachineInstr *MI) {
X86MCInstLower MCInstLowering(OutContext, Mang, *this);
switch (MI->getOpcode()) {
case TargetInstrInfo::DBG_LABEL:
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.h?rev=82391&r1=82390&r2=82391&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.h (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.h Sun Sep 20 02:35:34 2009
@@ -21,18 +21,18 @@
class MachineModuleInfoMachO;
class MachineOperand;
class Mangler;
- class X86ATTAsmPrinter;
+ class X86AsmPrinter;
class X86Subtarget;
/// X86MCInstLower - This class is used to lower an MachineInstr into an MCInst.
class VISIBILITY_HIDDEN X86MCInstLower {
MCContext &Ctx;
Mangler *Mang;
- X86ATTAsmPrinter &AsmPrinter;
+ X86AsmPrinter &AsmPrinter;
const X86Subtarget &getSubtarget() const;
public:
- X86MCInstLower(MCContext &ctx, Mangler *mang, X86ATTAsmPrinter &asmprinter)
+ X86MCInstLower(MCContext &ctx, Mangler *mang, X86AsmPrinter &asmprinter)
: Ctx(ctx), Mang(mang), AsmPrinter(asmprinter) {}
void Lower(const MachineInstr *MI, MCInst &OutMI) const;
More information about the llvm-commits
mailing list