4 #![crate_type = "rlib"]
12 pub unsafe fn pure(x: i32) {
14 asm!("", out("ax") y, in("cx") x, options(pure), options(nomem));
17 pub static mut VAR: i32 = 0;
18 pub static mut DUMMY_OUTPUT: i32 = 0;
20 // CHECK-LABEL: @readonly
21 // CHECK: call i32 asm
24 pub unsafe fn readonly() -> i32 {
26 asm!("", out("ax") DUMMY_OUTPUT, options(pure), options(readonly));
30 // CHECK-LABEL: @nomem
32 // CHECK: call i32 asm
36 pub unsafe fn nomem() -> i32 {
38 asm!("", out("ax") DUMMY_OUTPUT, options(pure), options(nomem));
43 // CHECK-LABEL: @not_nomem
45 // CHECK: call i32 asm
49 pub unsafe fn not_nomem() -> i32 {
51 asm!("", out("ax") DUMMY_OUTPUT, options(pure), options(readonly));