[llvm-commits] [llvm] r157494 - in /llvm/trunk/lib/Target/Mips: MipsMCInstLower.cpp MipsMCInstLower.h
Akira Hatanaka
ahatanaka at mips.com
Fri May 25 13:46:52 PDT 2012
Author: ahatanak
Date: Fri May 25 15:46:52 2012
New Revision: 157494
URL: http://llvm.org/viewvc/llvm-project?rev=157494&view=rev
Log:
Remove the code that expands MIPS' .cpload directive.
Modified:
llvm/trunk/lib/Target/Mips/MipsMCInstLower.cpp
llvm/trunk/lib/Target/Mips/MipsMCInstLower.h
Modified: llvm/trunk/lib/Target/Mips/MipsMCInstLower.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsMCInstLower.cpp?rev=157494&r1=157493&r2=157494&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsMCInstLower.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsMCInstLower.cpp Fri May 25 15:46:52 2012
@@ -117,29 +117,6 @@
Inst.addOperand(Opnd2);
}
-// Lower ".cpload $reg" to
-// "lui $gp, %hi(_gp_disp)"
-// "addiu $gp, $gp, %lo(_gp_disp)"
-// "addu $gp, $gp, $t9"
-void MipsMCInstLower::LowerCPLOAD(SmallVector<MCInst, 4>& MCInsts) {
- MCOperand GPReg = MCOperand::CreateReg(Mips::GP);
- MCOperand T9Reg = MCOperand::CreateReg(Mips::T9);
- StringRef SymName("_gp_disp");
- const MCSymbol *Sym = Ctx->GetOrCreateSymbol(SymName);
- const MCSymbolRefExpr *MCSym;
-
- MCSym = MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_Mips_ABS_HI, *Ctx);
- MCOperand SymHi = MCOperand::CreateExpr(MCSym);
- MCSym = MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_Mips_ABS_LO, *Ctx);
- MCOperand SymLo = MCOperand::CreateExpr(MCSym);
-
- MCInsts.resize(3);
-
- CreateMCInst(MCInsts[0], Mips::LUi, GPReg, SymHi);
- CreateMCInst(MCInsts[1], Mips::ADDiu, GPReg, GPReg, SymLo);
- CreateMCInst(MCInsts[2], Mips::ADDu, GPReg, GPReg, T9Reg);
-}
-
MCOperand MipsMCInstLower::LowerOperand(const MachineOperand& MO,
unsigned offset) const {
MachineOperandType MOTy = MO.getType();
Modified: llvm/trunk/lib/Target/Mips/MipsMCInstLower.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsMCInstLower.h?rev=157494&r1=157493&r2=157494&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsMCInstLower.h (original)
+++ llvm/trunk/lib/Target/Mips/MipsMCInstLower.h Fri May 25 15:46:52 2012
@@ -33,7 +33,6 @@
MipsMCInstLower(MipsAsmPrinter &asmprinter);
void Initialize(Mangler *mang, MCContext* C);
void Lower(const MachineInstr *MI, MCInst &OutMI) const;
- void LowerCPLOAD(SmallVector<MCInst, 4>& MCInsts);
void LowerUnalignedLoadStore(const MachineInstr *MI,
SmallVector<MCInst, 4>& MCInsts);
void LowerSETGP01(SmallVector<MCInst, 4>& MCInsts);
More information about the llvm-commits
mailing list