diff options
author | badumbatish <tanghocle456@gmail.com> | 2024-07-23 22:17:12 -0700 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-19 15:32:01 +0100 |
commit | d2c9afb7bc8278bdf946599f58da18c76d3d1d2f (patch) | |
tree | ac0dd47e1c7cac2fc23431635899e7e40adfa641 /gcc/testsuite/rust/compile | |
parent | 86d5412d85b907fd63b5c86817e35e506ea3f7f0 (diff) | |
download | gcc-d2c9afb7bc8278bdf946599f58da18c76d3d1d2f.zip gcc-d2c9afb7bc8278bdf946599f58da18c76d3d1d2f.tar.gz gcc-d2c9afb7bc8278bdf946599f58da18c76d3d1d2f.tar.bz2 |
gccrs: Fix the parser's operand and flags storage
gcc/rust/ChangeLog:
* ast/rust-expr.h (struct InlineAsmOperand):
Add construction for register_type
* expand/rust-macro-builtins-asm.cc (parse_reg_operand):
Fix parsing logic & reassignment logic
(parse_reg_operand_in): Fix parsing
(parse_reg_operand_out): Fix parsing
(parse_reg_operand_inout): Fix parsing
(parse_reg_operand_unexpected): Remove rust_unreachable()
(parse_asm_arg): Fix parsing logic
* expand/rust-macro-builtins-asm.h: Add = operator overloading
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_illegal_operands.rs: Test now passing
* rust/compile/inline_asm_parse_operand.rs: Remove _, not
supported right now
Diffstat (limited to 'gcc/testsuite/rust/compile')
-rw-r--r-- | gcc/testsuite/rust/compile/inline_asm_illegal_operands.rs | 6 | ||||
-rw-r--r-- | gcc/testsuite/rust/compile/inline_asm_parse_operand.rs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/gcc/testsuite/rust/compile/inline_asm_illegal_operands.rs b/gcc/testsuite/rust/compile/inline_asm_illegal_operands.rs index 5a13fb9..f29b4b6 100644 --- a/gcc/testsuite/rust/compile/inline_asm_illegal_operands.rs +++ b/gcc/testsuite/rust/compile/inline_asm_illegal_operands.rs @@ -11,14 +11,14 @@ fn main() { asm!( "add {x}, {1}", x = in(reg) _x, - x = in(reg) _x, // { dg-error {duplicate argument named 'x'} "" { xfail *-*-* } .-1 } + x = in(reg) _x, // { dg-error {duplicate argument named 'x'} } ); asm!( "mov {x}, {x}", - x = inout("eax") _x, // { dg-error {explicit register arguments cannot have names} "" { xfail *-*-* } .-1 } + x = inout("eax") _x, // { dg-error {explicit register arguments cannot have names} } x = inout(reg) _x, // It then proceeds to parse this line, resulting in only 1 error instead of duplication error as well. ); } _x = 1; -}
\ No newline at end of file +} diff --git a/gcc/testsuite/rust/compile/inline_asm_parse_operand.rs b/gcc/testsuite/rust/compile/inline_asm_parse_operand.rs index 2770263..dfce295 100644 --- a/gcc/testsuite/rust/compile/inline_asm_parse_operand.rs +++ b/gcc/testsuite/rust/compile/inline_asm_parse_operand.rs @@ -31,7 +31,7 @@ fn main() { asm!( "add {0}, {0}", in(reg) _num1, - out(reg) _, + //out(reg) _, ); } -}
\ No newline at end of file +} |