From 81397a9f53440ed6fb816480784fd9b14a3fca57 Mon Sep 17 00:00:00 2001 From: badumbatish Date: Wed, 4 Sep 2024 23:59:36 -0700 Subject: gccrs: Provide input operand for gccrs gcc/rust/ChangeLog: * backend/rust-compile-asm.cc (CompileAsm::asm_construct_inputs): Provide input operand for gccrs * expand/rust-macro-builtins-asm.cc (parse_reg_operand_in): Move expr to In (expand_inline_asm_strings): Add comments to debug strings gcc/testsuite/ChangeLog: * rust/compile/inline_asm_parse_operand.rs: Remove inout, functionality not supported. Remove redundant {} * rust/execute/torture/inline_asm_mov_x_5_ARM.rs: Add operand in * rust/execute/torture/inline_asm_mov_x_5_x86_64.rs: Likewise --- gcc/testsuite/rust/compile/inline_asm_parse_operand.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/testsuite/rust/compile') diff --git a/gcc/testsuite/rust/compile/inline_asm_parse_operand.rs b/gcc/testsuite/rust/compile/inline_asm_parse_operand.rs index e0efe1c..c7bc152 100644 --- a/gcc/testsuite/rust/compile/inline_asm_parse_operand.rs +++ b/gcc/testsuite/rust/compile/inline_asm_parse_operand.rs @@ -8,7 +8,7 @@ macro_rules! asm { fn main() -> i32 { unsafe { asm!( - "add {}, {}", + "add {}, 1", in(reg) 0 ); } @@ -21,15 +21,15 @@ fn main() -> i32 { unsafe { asm!( "add {}, {}", - inout(reg) num1 =>_num1, in(reg) _num2, + out(reg) _num1, ); } let mut _output_testing: u32 = 0; unsafe { asm!( - "add {}, {}", + "add {}, 1", in(reg) _num1, //out(reg) _, ); -- cgit v1.1