diff options
author | badumbatish <tanghocle456@gmail.com> | 2024-07-21 15:13:25 -0700 |
---|---|---|
committer | CohenArthur <arthur.cohen@embecosm.com> | 2024-09-02 09:44:55 +0000 |
commit | 95674a0a358142e2ac38f827abe28998d8f39438 (patch) | |
tree | fcefca3fa54dca7263e300d3ddedfab0558e601e | |
parent | d645c559125ed75fd19af749c62c51ecc032370a (diff) | |
download | gcc-95674a0a358142e2ac38f827abe28998d8f39438.zip gcc-95674a0a358142e2ac38f827abe28998d8f39438.tar.gz gcc-95674a0a358142e2ac38f827abe28998d8f39438.tar.bz2 |
Added new test for prep of output {}
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_parse_output_operand.rs: New test.
-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, + ); + } +} |