[PATCH] D117565: [RISCV] Fix incomplete asm statement parsing
Luís Marques via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 19 13:56:50 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa767ae2c5ce7: [RISCV] Fix incomplete asm statement parsing (authored by luismarques).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117565/new/
https://reviews.llvm.org/D117565
Files:
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
llvm/test/CodeGen/RISCV/large-stack.ll
Index: llvm/test/CodeGen/RISCV/large-stack.ll
===================================================================
--- llvm/test/CodeGen/RISCV/large-stack.ll
+++ llvm/test/CodeGen/RISCV/large-stack.ll
@@ -64,12 +64,10 @@
; RV32I-FPELIM-NEXT: add a1, a2, a1
; RV32I-FPELIM-NEXT: #APP
; RV32I-FPELIM-NEXT: nop
-; RV32I-FPELIM-EMPTY:
; RV32I-FPELIM-NEXT: #NO_APP
; RV32I-FPELIM-NEXT: sw a0, 0(a1)
; RV32I-FPELIM-NEXT: #APP
; RV32I-FPELIM-NEXT: nop
-; RV32I-FPELIM-EMPTY:
; RV32I-FPELIM-NEXT: #NO_APP
; RV32I-FPELIM-NEXT: lui a0, 97
; RV32I-FPELIM-NEXT: addi a0, a0, 672
@@ -104,12 +102,10 @@
; RV32I-WITHFP-NEXT: add a1, a2, a1
; RV32I-WITHFP-NEXT: #APP
; RV32I-WITHFP-NEXT: nop
-; RV32I-WITHFP-EMPTY:
; RV32I-WITHFP-NEXT: #NO_APP
; RV32I-WITHFP-NEXT: sw a0, 0(a1)
; RV32I-WITHFP-NEXT: #APP
; RV32I-WITHFP-NEXT: nop
-; RV32I-WITHFP-EMPTY:
; RV32I-WITHFP-NEXT: #NO_APP
; RV32I-WITHFP-NEXT: lui a0, 97
; RV32I-WITHFP-NEXT: addi a0, a0, 688
Index: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
===================================================================
--- llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+++ llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
@@ -1912,8 +1912,10 @@
Operands.push_back(RISCVOperand::createToken(Name, NameLoc, isRV64()));
// If there are no more operands, then finish
- if (getLexer().is(AsmToken::EndOfStatement))
+ if (getLexer().is(AsmToken::EndOfStatement)) {
+ getParser().Lex(); // Consume the EndOfStatement.
return false;
+ }
// Parse first operand
if (parseOperand(Operands, Name))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117565.401396.patch
Type: text/x-patch
Size: 1641 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220119/40ca5667/attachment.bin>
More information about the llvm-commits
mailing list