[PATCH] D10967: [mips] Fix li/la differences between IAS and GAS.
Vasileios Kalintiris
Vasileios.Kalintiris at imgtec.com
Mon Jul 13 07:08:50 PDT 2015
vkalintiris accepted this revision.
vkalintiris added a comment.
This revision is now accepted and ready to land.
LGTM. I noted just some trivial suggestions.
================
Comment at: lib/Target/Mips/AsmParser/MipsAsmParser.cpp:1730
@@ -1729,1 +1729,3 @@
namespace {
+template <unsigned Opcode>
+void emitRRX(unsigned DstReg, unsigned SrcReg, MCOperand Imm, SMLoc IDLoc,
----------------
There's no need for using templates.
================
Comment at: lib/Target/Mips/AsmParser/MipsAsmParser.cpp:1882-1886
@@ -1854,6 +1881,7 @@
SrcReg = Mips::ZERO;
tmpInst.setOpcode(Mips::ADDiu);
tmpInst.addOperand(MCOperand::createReg(DstReg));
tmpInst.addOperand(MCOperand::createReg(SrcReg));
tmpInst.addOperand(MCOperand::createImm(ImmValue));
Instructions.push_back(tmpInst);
+ } else if (isUInt<16>(ImmValue)) {
----------------
Can you use your newly defined emitRR* functions here and for the ORi instruction down below (lines: 1912-1917)?
================
Comment at: test/MC/Mips/macro-li-bad.s:3-6
@@ +2,6 @@
+# RUN: FileCheck %s < %t1 --check-prefix=32-BIT
+# RUN: not llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n32 2>&1 | \
+# RUN: FileCheck %s --check-prefix=64-BIT --check-prefix=N32-ONLY
+# RUN: not llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n64 2>&1 | \
+# RUN: FileCheck %s --check-prefix=64-BIT --check-prefix=N64-ONLY
+
----------------
We don't need the Nxx-ONLY prefixes.
http://reviews.llvm.org/D10967
More information about the llvm-commits
mailing list