diff options
author | Chris Lattner <sabre@nondot.org> | 2010-11-14 21:12:33 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-11-14 21:12:33 +0000 |
commit | 5c1b0cdec2a2f37818c4ab441e256a7d36837728 (patch) | |
tree | 48be4689f85ed5c2daf3614a9188bf35e11457e7 /llvm/lib/Target/PowerPC/PPCMCInstLower.cpp | |
parent | a7d0bed3368b809ad47d7113cad82ca5c3a59957 (diff) | |
download | llvm-5c1b0cdec2a2f37818c4ab441e256a7d36837728.zip llvm-5c1b0cdec2a2f37818c4ab441e256a7d36837728.tar.gz llvm-5c1b0cdec2a2f37818c4ab441e256a7d36837728.tar.bz2 |
switch PPC to a simplified MCInstLowering model.
llvm-svn: 119074
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCMCInstLower.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCMCInstLower.cpp | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp b/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp index afed393..2e94030 100644 --- a/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp +++ b/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp @@ -12,15 +12,15 @@ // //===----------------------------------------------------------------------===// -#include "PPCMCInstLower.h" +#include "PPC.h" #include "llvm/CodeGen/AsmPrinter.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/MC/MCExpr.h" #include "llvm/MC/MCInst.h" - using namespace llvm; -void PPCMCInstLower::Lower(const MachineInstr *MI, MCInst &OutMI) const { +void llvm::LowerPPCMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI, + AsmPrinter &Printer) { OutMI.setOpcode(MI->getOpcode()); for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { @@ -38,36 +38,6 @@ void PPCMCInstLower::Lower(const MachineInstr *MI, MCInst &OutMI) const { case MachineOperand::MO_Immediate: MCOp = MCOperand::CreateImm(MO.getImm()); break; - case MachineOperand::MO_MachineBasicBlock: - MCOp = MCOperand::CreateExpr(MCSymbolRefExpr::Create( - MO.getMBB()->getSymbol(), Ctx)); - break; -#if 0 - case MachineOperand::MO_GlobalAddress: - MCOp = LowerSymbolRefOperand(MO, GetSymbolRef(MO)); - break; - case MachineOperand::MO_ExternalSymbol: - MCOp = LowerSymbolRefOperand(MO, GetExternalSymbolSymbol(MO)); - break; - case MachineOperand::MO_JumpTableIndex: - MCOp = LowerSymbolOperand(MO, GetJumpTableSymbol(MO)); - break; - case MachineOperand::MO_ConstantPoolIndex: - MCOp = LowerSymbolOperand(MO, GetConstantPoolIndexSymbol(MO)); - break; - case MachineOperand::MO_BlockAddress: - MCOp = LowerSymbolOperand(MO, Printer.GetBlockAddressSymbol( - MO.getBlockAddress())); - break; -#endif -#if 0 - case MachineOperand::MO_FPImmediate: - APFloat Val = MO.getFPImm()->getValueAPF(); - bool ignored; - Val.convert(APFloat::IEEEdouble, APFloat::rmTowardZero, &ignored); - MCOp = MCOperand::CreateFPImm(Val.convertToDouble()); - break; -#endif } OutMI.addOperand(MCOp); |