From b700203c8b19f7eff3eaffe1b4282584ab57fca2 Mon Sep 17 00:00:00 2001 From: Daniel Sanders Date: Fri, 20 Nov 2015 13:16:35 +0000 Subject: [PATCH] Partially revert r253662: some unrelated work was accidentally committed with it. Sorry. llvm-svn: 253663 --- .../CodeGen/SelectionDAG/SelectionDAGISel.cpp | 1 - .../Target/Mips/AsmParser/MipsAsmParser.cpp | 25 ++++++------------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 0f5b1f1afb52..04895e7702fc 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -439,7 +439,6 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) { if (Fn.hasFnAttribute(Attribute::OptimizeNone)) NewOptLevel = CodeGenOpt::None; OptLevelChanger OLC(*this, NewOptLevel); - errs() << "OptLevel is -O" << OptLevel << "\n"; TII = MF->getSubtarget().getInstrInfo(); TLI = MF->getSubtarget().getTargetLowering(); diff --git a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp index 74c289f1b9a2..32856550b70a 100644 --- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp @@ -1708,25 +1708,14 @@ bool MipsAsmParser::processInstruction(MCInst &Inst, SMLoc IDLoc, MCOperand::createExpr(GotDispRelocExpr), IDLoc, Instructions); } } else { - if (isABI_O32()) { - // If it's an external/weak symbol, we expand to: - // lw/ld $25, 0($gp) - // R_(MICRO)MIPS_CALL16 label - // jalr $25 - const MCExpr *Call16RelocExpr = evaluateRelocExpr(JalExpr, "call16"); + // If it's an external/weak symbol, we expand to: + // lw/ld $25, 0($gp) + // R_(MICRO)MIPS_CALL16 label + // jalr $25 + const MCExpr *Call16RelocExpr = evaluateRelocExpr(JalExpr, "call16"); - emitRRX(ABI.ArePtrs64bit() ? Mips::LD : Mips::LW, Mips::T9, Mips::GP, - MCOperand::createExpr(Call16RelocExpr), IDLoc, Instructions); - } else if (isABI_N32() || isABI_N64()) { - // If it's an external/weak symbol, we expand to: - // lw/ld $25, 0($gp) - // R_(MICRO)MIPS_GOT_DISP label - // jalr $25 - const MCExpr *GotDispRelocExpr = evaluateRelocExpr(JalExpr, "got_disp"); - - emitRRX(ABI.ArePtrs64bit() ? Mips::LD : Mips::LW, Mips::T9, Mips::GP, - MCOperand::createExpr(GotDispRelocExpr), IDLoc, Instructions); - } + emitRRX(ABI.ArePtrs64bit() ? Mips::LD : Mips::LW, Mips::T9, Mips::GP, + MCOperand::createExpr(Call16RelocExpr), IDLoc, Instructions); } MCInst JalrInst;