[PATCH] D63669: [RISCV] Allow parsing dot '.' in assembly
Sam Elliott via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 12 01:36:43 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL365881: [RISCV] Allow parsing dot '.' in assembly (authored by lenary, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D63669?vs=209057&id=209424#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63669/new/
https://reviews.llvm.org/D63669
Files:
llvm/trunk/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
llvm/trunk/test/MC/RISCV/rv32i-aliases-invalid.s
llvm/trunk/test/MC/RISCV/rv32i-valid.s
llvm/trunk/test/MC/RISCV/rvi-aliases-valid.s
Index: llvm/trunk/test/MC/RISCV/rvi-aliases-valid.s
===================================================================
--- llvm/trunk/test/MC/RISCV/rvi-aliases-valid.s
+++ llvm/trunk/test/MC/RISCV/rvi-aliases-valid.s
@@ -117,6 +117,13 @@
# CHECK-OBJ: j 0
# CHECK-OBJ: R_RISCV_JAL a0
j a0
+# CHECK-S-NOALIAS: [[LABEL:.L[[:alnum:]_]+]]:
+# CHECK-S-NOALIAS-NEXT: jal zero, [[LABEL]]
+# CHECK-S: [[LABEL:.L[[:alnum:]_]+]]:
+# CHECK-S-NEXT: j [[LABEL]]
+# CHECK-OBJ-NOALIAS: jal zero, 0
+# CHECK-OBJ: j 0
+j .
# CHECK-S-OBJ-NOALIAS: jal ra, 2040
# CHECK-S-OBJ: jal 2040
jal 2040
Index: llvm/trunk/test/MC/RISCV/rv32i-aliases-invalid.s
===================================================================
--- llvm/trunk/test/MC/RISCV/rv32i-aliases-invalid.s
+++ llvm/trunk/test/MC/RISCV/rv32i-aliases-invalid.s
@@ -19,5 +19,7 @@
srl x2, x3, -2 # CHECK: :[[@LINE]]:13: error: immediate must be an integer in the range [0, 31]
sra x2, x3, -3 # CHECK: :[[@LINE]]:13: error: immediate must be an integer in the range [0, 31]
+addi x1, . # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
+
foo:
.space 4
Index: llvm/trunk/test/MC/RISCV/rv32i-valid.s
===================================================================
--- llvm/trunk/test/MC/RISCV/rv32i-valid.s
+++ llvm/trunk/test/MC/RISCV/rv32i-valid.s
@@ -90,6 +90,9 @@
# CHECK-ASM-AND-OBJ: jal s0, 156
# CHECK-ASM: encoding: [0x6f,0x04,0xc0,0x09]
jal s0, (0xff-99)
+# CHECK-ASM: encoding: [0x6f,0bAAAA0000,A,A]
+# CHECK-OBJ: jal zero, 0
+jal zero, .
# CHECK-ASM-AND-OBJ: jalr a0, a1, -2048
# CHECK-ASM: encoding: [0x67,0x85,0x05,0x80]
Index: llvm/trunk/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
===================================================================
--- llvm/trunk/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+++ llvm/trunk/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
@@ -1119,6 +1119,7 @@
default:
return MatchOperand_NoMatch;
case AsmToken::LParen:
+ case AsmToken::Dot:
case AsmToken::Minus:
case AsmToken::Plus:
case AsmToken::Exclaim:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63669.209424.patch
Type: text/x-patch
Size: 2065 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190712/336bafa0/attachment.bin>
More information about the llvm-commits
mailing list