[llvm] r235984 - [mips] [IAS] Rename the createShiftOr function to createLShiftOri. NFC.
Toma Tabacu
toma.tabacu at imgtec.com
Tue Apr 28 06:16:06 PDT 2015
Author: tomatabacu
Date: Tue Apr 28 08:16:06 2015
New Revision: 235984
URL: http://llvm.org/viewvc/llvm-project?rev=235984&view=rev
Log:
[mips] [IAS] Rename the createShiftOr function to createLShiftOri. NFC.
Summary: The new name is more accurate with regard to the functionality.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8968
Modified:
llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
Modified: llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp?rev=235984&r1=235983&r2=235984&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Tue Apr 28 08:16:06 2015
@@ -1633,7 +1633,7 @@ bool MipsAsmParser::expandInstruction(MC
namespace {
template <bool PerformShift>
-void createShiftOr(MCOperand Operand, unsigned RegNo, SMLoc IDLoc,
+void createLShiftOri(MCOperand Operand, unsigned RegNo, SMLoc IDLoc,
SmallVectorImpl<MCInst> &Instructions) {
MCInst tmpInst;
if (PerformShift) {
@@ -1654,9 +1654,9 @@ void createShiftOr(MCOperand Operand, un
}
template <int Shift, bool PerformShift>
-void createShiftOr(int64_t Value, unsigned RegNo, SMLoc IDLoc,
+void createLShiftOri(int64_t Value, unsigned RegNo, SMLoc IDLoc,
SmallVectorImpl<MCInst> &Instructions) {
- createShiftOr<PerformShift>(
+ createLShiftOri<PerformShift>(
MCOperand::CreateImm(((Value & (0xffffLL << Shift)) >> Shift)), RegNo,
IDLoc, Instructions);
}
@@ -1741,7 +1741,7 @@ bool MipsAsmParser::expandLoadImm(MCInst
tmpInst.addOperand(MCOperand::CreateReg(Reg));
tmpInst.addOperand(MCOperand::CreateImm((ImmValue & 0xffff0000) >> 16));
Instructions.push_back(tmpInst);
- createShiftOr<0, false>(ImmValue, Reg, IDLoc, Instructions);
+ createLShiftOri<0, false>(ImmValue, Reg, IDLoc, Instructions);
} else if ((ImmValue & (0xffffLL << 48)) == 0) {
if (!isGP64bit()) {
Error(IDLoc, "instruction requires a 64-bit architecture");
@@ -1766,8 +1766,8 @@ bool MipsAsmParser::expandLoadImm(MCInst
tmpInst.addOperand(
MCOperand::CreateImm((ImmValue & (0xffffLL << 32)) >> 32));
Instructions.push_back(tmpInst);
- createShiftOr<16, false>(ImmValue, Reg, IDLoc, Instructions);
- createShiftOr<0, true>(ImmValue, Reg, IDLoc, Instructions);
+ createLShiftOri<16, false>(ImmValue, Reg, IDLoc, Instructions);
+ createLShiftOri<0, true>(ImmValue, Reg, IDLoc, Instructions);
} else {
if (!isGP64bit()) {
Error(IDLoc, "instruction requires a 64-bit architecture");
@@ -1793,9 +1793,9 @@ bool MipsAsmParser::expandLoadImm(MCInst
tmpInst.addOperand(
MCOperand::CreateImm((ImmValue & (0xffffLL << 48)) >> 48));
Instructions.push_back(tmpInst);
- createShiftOr<32, false>(ImmValue, Reg, IDLoc, Instructions);
- createShiftOr<16, true>(ImmValue, Reg, IDLoc, Instructions);
- createShiftOr<0, true>(ImmValue, Reg, IDLoc, Instructions);
+ createLShiftOri<32, false>(ImmValue, Reg, IDLoc, Instructions);
+ createLShiftOri<16, true>(ImmValue, Reg, IDLoc, Instructions);
+ createLShiftOri<0, true>(ImmValue, Reg, IDLoc, Instructions);
}
return false;
}
@@ -1934,11 +1934,11 @@ MipsAsmParser::expandLoadAddressSym(MCIn
tmpInst.addOperand(MCOperand::CreateExpr(HighestExpr));
Instructions.push_back(tmpInst);
- createShiftOr<false>(MCOperand::CreateExpr(HigherExpr), RegNo, SMLoc(),
+ createLShiftOri<false>(MCOperand::CreateExpr(HigherExpr), RegNo, SMLoc(),
Instructions);
- createShiftOr<true>(MCOperand::CreateExpr(HiExpr), RegNo, SMLoc(),
+ createLShiftOri<true>(MCOperand::CreateExpr(HiExpr), RegNo, SMLoc(),
Instructions);
- createShiftOr<true>(MCOperand::CreateExpr(LoExpr), RegNo, SMLoc(),
+ createLShiftOri<true>(MCOperand::CreateExpr(LoExpr), RegNo, SMLoc(),
Instructions);
} else {
// Otherwise, expand to:
@@ -1949,7 +1949,7 @@ MipsAsmParser::expandLoadAddressSym(MCIn
tmpInst.addOperand(MCOperand::CreateExpr(HiExpr));
Instructions.push_back(tmpInst);
- createShiftOr<false>(MCOperand::CreateExpr(LoExpr), RegNo, SMLoc(),
+ createLShiftOri<false>(MCOperand::CreateExpr(LoExpr), RegNo, SMLoc(),
Instructions);
}
}
More information about the llvm-commits
mailing list