]> git.lizzy.rs Git - rust.git/blob - tests/codegen/asm-clobbers.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / codegen / asm-clobbers.rs
1 // compile-flags: -O
2 // only-x86_64
3
4 #![crate_type = "rlib"]
5
6 use std::arch::asm;
7
8 // CHECK-LABEL: @x87_clobber
9 // CHECK: ~{st},~{st(1)},~{st(2)},~{st(3)},~{st(4)},~{st(5)},~{st(6)},~{st(7)}
10 #[no_mangle]
11 pub unsafe fn x87_clobber() {
12     asm!("foo", out("st") _);
13 }
14
15 // CHECK-LABEL: @mmx_clobber
16 // CHECK: ~{st},~{st(1)},~{st(2)},~{st(3)},~{st(4)},~{st(5)},~{st(6)},~{st(7)}
17 #[no_mangle]
18 pub unsafe fn mmx_clobber() {
19     asm!("bar", out("mm0") _, out("mm1") _);
20 }