diff options
author | badumbatish <tanghocle456@gmail.com> | 2024-07-21 15:13:25 -0700 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-19 15:32:06 +0100 |
commit | 8a56194dd27fda4c3b87f025f386a82780392692 (patch) | |
tree | 9ac17170a7c450152b4576353f9626c304ae40f2 /gcc | |
parent | d3e1f59ba8333b3b7e5e01a604c3f842a9ce535f (diff) | |
download | gcc-8a56194dd27fda4c3b87f025f386a82780392692.zip gcc-8a56194dd27fda4c3b87f025f386a82780392692.tar.gz gcc-8a56194dd27fda4c3b87f025f386a82780392692.tar.bz2 |
gccrs: Added new test for prep of output {}
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_parse_output_operand.rs: New test.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/rust/compile/inline_asm_parse_output_operand.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/inline_asm_parse_output_operand.rs b/gcc/testsuite/rust/compile/inline_asm_parse_output_operand.rs new file mode 100644 index 0000000..3134c73 --- /dev/null +++ b/gcc/testsuite/rust/compile/inline_asm_parse_output_operand.rs @@ -0,0 +1,18 @@ +#![feature(rustc_attrs)] + +#[rustc_builtin_macro] +macro_rules! asm { + () => {}; +} + +fn main() { + let mut _num1: i32 = 10; + let mut _num2: i32 = 10; + unsafe { + asm!( + "mov {0}, 4", + out(reg) _num1, + out(reg) _num2, + ); + } +} |