4 #![crate_type = "rlib"]
11 pub unsafe fn pure(x: i32) {
13 asm!("", out("ax") y, in("cx") x, options(pure), options(nomem));
16 pub static mut VAR: i32 = 0;
17 pub static mut DUMMY_OUTPUT: i32 = 0;
19 // CHECK-LABEL: @readonly
20 // CHECK: call i32 asm
23 pub unsafe fn readonly() -> i32 {
25 asm!("", out("ax") DUMMY_OUTPUT, options(pure), options(readonly));
29 // CHECK-LABEL: @nomem
31 // CHECK: call i32 asm
35 pub unsafe fn nomem() -> i32 {
37 asm!("", out("ax") DUMMY_OUTPUT, options(pure), options(nomem));
42 // CHECK-LABEL: @not_nomem
44 // CHECK: call i32 asm
48 pub unsafe fn not_nomem() -> i32 {
50 asm!("", out("ax") DUMMY_OUTPUT, options(pure), options(readonly));