diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/codegen/asm-multiple-options.rs | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/codegen/asm-multiple-options.rs')
-rw-r--r-- | src/test/codegen/asm-multiple-options.rs | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/src/test/codegen/asm-multiple-options.rs b/src/test/codegen/asm-multiple-options.rs deleted file mode 100644 index 1ae37d627..000000000 --- a/src/test/codegen/asm-multiple-options.rs +++ /dev/null @@ -1,54 +0,0 @@ -// compile-flags: -O -// only-x86_64 - -#![crate_type = "rlib"] - -use std::arch::asm; - -// CHECK-LABEL: @pure -// CHECK-NOT: asm -// CHECK: ret void -#[no_mangle] -pub unsafe fn pure(x: i32) { - let y: i32; - asm!("", out("ax") y, in("cx") x, options(pure), options(nomem)); -} - -pub static mut VAR: i32 = 0; -pub static mut DUMMY_OUTPUT: i32 = 0; - -// CHECK-LABEL: @readonly -// CHECK: call i32 asm -// CHECK: ret i32 1 -#[no_mangle] -pub unsafe fn readonly() -> i32 { - VAR = 1; - asm!("", out("ax") DUMMY_OUTPUT, options(pure), options(readonly)); - VAR -} - -// CHECK-LABEL: @nomem -// CHECK-NOT: store -// CHECK: call i32 asm -// CHECK: store -// CHECK: ret i32 2 -#[no_mangle] -pub unsafe fn nomem() -> i32 { - VAR = 1; - asm!("", out("ax") DUMMY_OUTPUT, options(pure), options(nomem)); - VAR = 2; - VAR -} - -// CHECK-LABEL: @not_nomem -// CHECK: store -// CHECK: call i32 asm -// CHECK: store -// CHECK: ret i32 2 -#[no_mangle] -pub unsafe fn not_nomem() -> i32 { - VAR = 1; - asm!("", out("ax") DUMMY_OUTPUT, options(pure), options(readonly)); - VAR = 2; - VAR -} |