[PATCH] D22754: [mips] Adding support for symbolic constants for mips64r6
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 25 08:40:08 PDT 2016
dsanders added a comment.
This patch affects all Mips subtargets. Could you correct the title and summary of the patch?
================
Comment at: lib/Target/Mips/AsmParser/MipsAsmParser.cpp:4611-4619
@@ -4608,11 +4610,11 @@
// Integers and expressions are acceptable
OperandMatchResultTy ResTy = parseImm(Operands);
if (ResTy != MatchOperand_NoMatch)
return ResTy;
// Registers are a valid target and have priority over symbols.
ResTy = parseAnyRegister(Operands);
if (ResTy != MatchOperand_NoMatch)
return ResTy;
----------------
The change to parseImm() breaks the following code:
.set foo,$25
jr foo
Before this change, the 'foo' was parsed by parseAnyRegister() and was added to the operand list as the register $25. After this change, it's parsed by parseImm() and added to the operand list as the expression 'foo'.
================
Comment at: test/MC/Mips/mips64r6/immediate.s:1
@@ +1,2 @@
+# RUN: llvm-mc -triple=mips64el-linux-gnu -arch=mips64el -mcpu=mips64r6 %s -filetype=obj -o - | llvm-objdump -d - | FileCheck %s
+
----------------
(regarding the directory): This isn't mips64r6 specific so it should be moved up one level to test/MC/Mips
(regarding the filename): The filename should mention symbols since this test is defining a symbol and making sure it's evaluated at assembly time.
https://reviews.llvm.org/D22754
More information about the llvm-commits
mailing list