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 | a7217c824d512d6a80fbe97b82f4c2e15ec2a338 (patch) | |
tree | a2bd1efa93654903564459984a494dbdf831deee /lib/Target/PowerPC/PPCMCInstLower.cpp | |
parent | 55d02f3a138badd5b1f96240b4d4b416d9026e2c (diff) | |
download | external_llvm-a7217c824d512d6a80fbe97b82f4c2e15ec2a338.zip external_llvm-a7217c824d512d6a80fbe97b82f4c2e15ec2a338.tar.gz external_llvm-a7217c824d512d6a80fbe97b82f4c2e15ec2a338.tar.bz2 |
switch PPC to a simplified MCInstLowering model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119074 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCMCInstLower.cpp')
-rw-r--r-- | lib/Target/PowerPC/PPCMCInstLower.cpp | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/lib/Target/PowerPC/PPCMCInstLower.cpp b/lib/Target/PowerPC/PPCMCInstLower.cpp index afed393..2e94030 100644 --- a/lib/Target/PowerPC/PPCMCInstLower.cpp +++ b/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); |