summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MipsMCInstLower.cpp
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2012-06-14 01:20:12 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2012-06-14 01:20:12 +0000
commita1b142f97c5784ca9897618e26b880cc9e67fb83 (patch)
treef4e038769846bd81c51445f813ef84107a7c2022 /llvm/lib/Target/Mips/MipsMCInstLower.cpp
parenteb36522a4da83132fcf4c8cae8653dca01a59825 (diff)
downloadbcm5719-llvm-a1b142f97c5784ca9897618e26b880cc9e67fb83.tar.gz
bcm5719-llvm-a1b142f97c5784ca9897618e26b880cc9e67fb83.zip
Remove code in MipsAsmPrinter and MipsMCInstLower.
llvm-svn: 158434
Diffstat (limited to 'llvm/lib/Target/Mips/MipsMCInstLower.cpp')
-rw-r--r--llvm/lib/Target/Mips/MipsMCInstLower.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/llvm/lib/Target/Mips/MipsMCInstLower.cpp b/llvm/lib/Target/Mips/MipsMCInstLower.cpp
index 161762ccf88..c92811a78a9 100644
--- a/llvm/lib/Target/Mips/MipsMCInstLower.cpp
+++ b/llvm/lib/Target/Mips/MipsMCInstLower.cpp
@@ -109,6 +109,7 @@ MCOperand MipsMCInstLower::LowerSymbolOperand(const MachineOperand &MO,
return MCOperand::CreateExpr(AddExpr);
}
+/*
static void CreateMCInst(MCInst& Inst, unsigned Opc, const MCOperand& Opnd0,
const MCOperand& Opnd1,
const MCOperand& Opnd2 = MCOperand()) {
@@ -118,6 +119,7 @@ static void CreateMCInst(MCInst& Inst, unsigned Opc, const MCOperand& Opnd0,
if (Opnd2.isValid())
Inst.addOperand(Opnd2);
}
+*/
MCOperand MipsMCInstLower::LowerOperand(const MachineOperand& MO,
unsigned offset) const {
@@ -156,23 +158,3 @@ void MipsMCInstLower::Lower(const MachineInstr *MI, MCInst &OutMI) const {
OutMI.addOperand(MCOp);
}
}
-
-// Create the following two instructions:
-// "lui $2, %hi(_gp_disp)"
-// "addiu $2, $2, %lo(_gp_disp)"
-void MipsMCInstLower::LowerSETGP01(SmallVector<MCInst, 4>& MCInsts) {
- MCOperand RegOpnd = MCOperand::CreateReg(Mips::V0);
- 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(2);
-
- CreateMCInst(MCInsts[0], Mips::LUi, RegOpnd, SymHi);
- CreateMCInst(MCInsts[1], Mips::ADDiu, RegOpnd, RegOpnd, SymLo);
-}
OpenPOWER on IntegriCloud