[PATCH] [mips] [IAS] Add support for LASym with identical source and destination register operands.
Daniel Sanders
daniel.sanders at imgtec.com
Tue May 19 06:18:57 PDT 2015
LGTM with the repetition removed.
================
Comment at: lib/Target/Mips/AsmParser/MipsAsmParser.cpp:1986-1991
@@ -1974,8 +1985,8 @@
- createLShiftOri<0>(MCOperand::createExpr(HigherExpr), DstReg, SMLoc(),
- Instructions);
- createLShiftOri<16>(MCOperand::createExpr(HiExpr), DstReg, SMLoc(),
- Instructions);
- createLShiftOri<16>(MCOperand::createExpr(LoExpr), DstReg, SMLoc(),
- Instructions);
+ createLShiftOri<0>(MCOperand::createExpr(HigherExpr),
+ UseAT ? ATReg : DstReg, SMLoc(), Instructions);
+ createLShiftOri<16>(MCOperand::createExpr(HiExpr), UseAT ? ATReg : DstReg,
+ SMLoc(), Instructions);
+ createLShiftOri<16>(MCOperand::createExpr(LoExpr), UseAT ? ATReg : DstReg,
+ SMLoc(), Instructions);
} else {
----------------
Instead of repeating ``UseAT ? ATReg : DstReg``, why not define a new variable for the temporary register to use?
http://reviews.llvm.org/D9366
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list