[PATCH] D22754: [mips] Adding support for symbolic constants for mips64r6
Matija Amidžić via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 25 06:37:24 PDT 2016
mamidzic created this revision.
mamidzic added reviewers: zoran.jovanovic, sdardis, dsanders, vkalintiris.
mamidzic added subscribers: petarj, llvm-commits, dsanders, sdardis.
This patch adds support for symbolic constants for mips64r6.
https://reviews.llvm.org/D22754
Files:
lib/Target/Mips/AsmParser/MipsAsmParser.cpp
test/MC/Mips/mips64r6/immediate.s
Index: test/MC/Mips/mips64r6/immediate.s
===================================================================
--- test/MC/Mips/mips64r6/immediate.s
+++ test/MC/Mips/mips64r6/immediate.s
@@ -0,0 +1,16 @@
+# RUN: llvm-mc -triple=mips64el-linux-gnu -arch=mips64el -mcpu=mips64r6 %s -filetype=obj -o - | llvm-objdump -d - | FileCheck %s
+
+.text
+
+FRAME_SIZE = 16
+
+andi $4, $5, FRAME_SIZE # CHECK: andi $4, $5, 16
+daddiu $4, $5, FRAME_SIZE # CHECK: daddiu $4, $5, 16
+lui $4, FRAME_SIZE # CHECK: aui $zero, $4, 16
+ori $3, $4, FRAME_SIZE # CHECK: ori $3, $4, 16
+slti $4, $3, FRAME_SIZE # CHECK: slti $4, $3, 16
+sltiu $7, $8, FRAME_SIZE # CHECK: sltiu $7, $8, 16
+xori $4, $5, FRAME_SIZE # CHECK: xori $4, $5, 16
+
+
+
Index: lib/Target/Mips/AsmParser/MipsAsmParser.cpp
===================================================================
--- lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+++ lib/Target/Mips/AsmParser/MipsAsmParser.cpp
@@ -4172,6 +4172,7 @@
case AsmToken::Plus:
case AsmToken::Integer:
case AsmToken::Tilde:
+ case AsmToken::Identifier:
case AsmToken::String: {
DEBUG(dbgs() << ".. generic integer\n");
OperandMatchResultTy ResTy = parseImm(Operands);
@@ -4585,6 +4586,7 @@
case AsmToken::Plus:
case AsmToken::Integer:
case AsmToken::Tilde:
+ case AsmToken::Identifier:
case AsmToken::String:
break;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22754.65338.patch
Type: text/x-patch
Size: 1406 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160725/93e5dd2b/attachment.bin>
More information about the llvm-commits
mailing list