]>
Commit | Line | Data |
---|---|---|
3c0e092e XL |
1 | // needs-asm-support |
2 | // only-x86_64 | |
3 | ||
a2a8927a | 4 | use std::arch::asm; |
3c0e092e | 5 | |
a2a8927a | 6 | // checks various modes of failure for the `clobber_abi` argument (after parsing) |
3c0e092e XL |
7 | |
8 | fn main() { | |
9 | unsafe { | |
10 | asm!("", clobber_abi("C")); | |
11 | asm!("", clobber_abi("foo")); | |
12 | //~^ ERROR invalid ABI for `clobber_abi` | |
13 | asm!("", clobber_abi("C", "foo")); | |
14 | //~^ ERROR invalid ABI for `clobber_abi` | |
15 | asm!("", clobber_abi("C", "C")); | |
16 | //~^ ERROR `C` ABI specified multiple times | |
17 | asm!("", clobber_abi("win64", "sysv64")); | |
18 | asm!("", clobber_abi("win64", "efiapi")); | |
19 | //~^ ERROR `win64` ABI specified multiple times | |
20 | asm!("", clobber_abi("C", "foo", "C")); | |
21 | //~^ ERROR invalid ABI for `clobber_abi` | |
22 | //~| ERROR `C` ABI specified multiple times | |
23 | asm!("", clobber_abi("win64", "foo", "efiapi")); | |
24 | //~^ ERROR invalid ABI for `clobber_abi` | |
25 | //~| ERROR `win64` ABI specified multiple times | |
26 | asm!("", clobber_abi("C"), clobber_abi("C")); | |
27 | //~^ ERROR `C` ABI specified multiple times | |
28 | asm!("", clobber_abi("win64"), clobber_abi("sysv64")); | |
29 | asm!("", clobber_abi("win64"), clobber_abi("efiapi")); | |
30 | //~^ ERROR `win64` ABI specified multiple times | |
31 | } | |
32 | } |