forked from OSchip/llvm-project
parent
38c2e65e78
commit
69c1d631f2
|
@ -57,7 +57,7 @@ static MCInst lowerRIEfLow(const MachineInstr *MI, unsigned Opcode) {
|
|||
}
|
||||
|
||||
void SystemZAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
||||
SystemZMCInstLower Lower(Mang, MF->getContext(), *this);
|
||||
SystemZMCInstLower Lower(MF->getContext(), *this);
|
||||
MCInst LoweredMI;
|
||||
switch (MI->getOpcode()) {
|
||||
case SystemZ::Return:
|
||||
|
@ -178,7 +178,7 @@ bool SystemZAsmPrinter::PrintAsmOperand(const MachineInstr *MI,
|
|||
return true;
|
||||
OS << -int64_t(MI->getOperand(OpNo).getImm());
|
||||
} else {
|
||||
SystemZMCInstLower Lower(Mang, MF->getContext(), *this);
|
||||
SystemZMCInstLower Lower(MF->getContext(), *this);
|
||||
MCOperand MO(Lower.lowerOperand(MI->getOperand(OpNo)));
|
||||
SystemZInstPrinter::printOperand(MO, OS);
|
||||
}
|
||||
|
|
|
@ -26,9 +26,9 @@ static MCSymbolRefExpr::VariantKind getVariantKind(unsigned Flags) {
|
|||
llvm_unreachable("Unrecognised MO_ACCESS_MODEL");
|
||||
}
|
||||
|
||||
SystemZMCInstLower::SystemZMCInstLower(Mangler *mang, MCContext &ctx,
|
||||
SystemZMCInstLower::SystemZMCInstLower(MCContext &ctx,
|
||||
SystemZAsmPrinter &asmprinter)
|
||||
: Mang(mang), Ctx(ctx), AsmPrinter(asmprinter) {}
|
||||
: Ctx(ctx), AsmPrinter(asmprinter) {}
|
||||
|
||||
const MCExpr *
|
||||
SystemZMCInstLower::getExpr(const MachineOperand &MO,
|
||||
|
@ -42,7 +42,7 @@ SystemZMCInstLower::getExpr(const MachineOperand &MO,
|
|||
break;
|
||||
|
||||
case MachineOperand::MO_GlobalAddress:
|
||||
Symbol = Mang->getSymbol(MO.getGlobal());
|
||||
Symbol = AsmPrinter.Mang->getSymbol(MO.getGlobal());
|
||||
break;
|
||||
|
||||
case MachineOperand::MO_ExternalSymbol:
|
||||
|
|
|
@ -23,13 +23,11 @@ class Mangler;
|
|||
class SystemZAsmPrinter;
|
||||
|
||||
class LLVM_LIBRARY_VISIBILITY SystemZMCInstLower {
|
||||
Mangler *Mang;
|
||||
MCContext &Ctx;
|
||||
SystemZAsmPrinter &AsmPrinter;
|
||||
|
||||
public:
|
||||
SystemZMCInstLower(Mangler *mang, MCContext &ctx,
|
||||
SystemZAsmPrinter &asmPrinter);
|
||||
SystemZMCInstLower(MCContext &ctx, SystemZAsmPrinter &asmPrinter);
|
||||
|
||||
// Lower MachineInstr MI to MCInst OutMI.
|
||||
void lower(const MachineInstr *MI, MCInst &OutMI) const;
|
||||
|
|
Loading…
Reference in New Issue