]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/asm-clobbers.rs
Rollup merge of #86887 - jyn514:cleanup-clean, r=CraftSpider
[rust.git] / src / test / codegen / asm-clobbers.rs
1 // compile-flags: -O
2 // only-x86_64
3
4 #![crate_type = "rlib"]
5 #![feature(asm)]
6
7 // CHECK-LABEL: @x87_clobber
8 // CHECK: ~{st},~{st(1)},~{st(2)},~{st(3)},~{st(4)},~{st(5)},~{st(6)},~{st(7)}
9 #[no_mangle]
10 pub unsafe fn x87_clobber() {
11     asm!("foo", out("st") _);
12 }
13
14 // CHECK-LABEL: @mmx_clobber
15 // CHECK: ~{st},~{st(1)},~{st(2)},~{st(3)},~{st(4)},~{st(5)},~{st(6)},~{st(7)}
16 #[no_mangle]
17 pub unsafe fn mmx_clobber() {
18     asm!("bar", out("mm0") _, out("mm1") _);
19 }