From f4554485cb2f1feeb0b19728607b1655da5d445b Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Fri, 25 May 2012 20:46:52 +0000 Subject: [PATCH] Remove the code that expands MIPS' .cpload directive. llvm-svn: 157494 --- llvm/lib/Target/Mips/MipsMCInstLower.cpp | 23 ----------------------- llvm/lib/Target/Mips/MipsMCInstLower.h | 1 - 2 files changed, 24 deletions(-) diff --git a/llvm/lib/Target/Mips/MipsMCInstLower.cpp b/llvm/lib/Target/Mips/MipsMCInstLower.cpp index d3cb6d8..1e2406f 100644 --- a/llvm/lib/Target/Mips/MipsMCInstLower.cpp +++ b/llvm/lib/Target/Mips/MipsMCInstLower.cpp @@ -117,29 +117,6 @@ static void CreateMCInst(MCInst& Inst, unsigned Opc, const MCOperand& Opnd0, 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& 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(); diff --git a/llvm/lib/Target/Mips/MipsMCInstLower.h b/llvm/lib/Target/Mips/MipsMCInstLower.h index fb1a258..23210d5 100644 --- a/llvm/lib/Target/Mips/MipsMCInstLower.h +++ b/llvm/lib/Target/Mips/MipsMCInstLower.h @@ -33,7 +33,6 @@ public: MipsMCInstLower(MipsAsmPrinter &asmprinter); void Initialize(Mangler *mang, MCContext* C); void Lower(const MachineInstr *MI, MCInst &OutMI) const; - void LowerCPLOAD(SmallVector& MCInsts); void LowerUnalignedLoadStore(const MachineInstr *MI, SmallVector& MCInsts); void LowerSETGP01(SmallVector& MCInsts); -- 2.7.4