]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/asm_syntax.rs
New upstream version 1.53.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / asm_syntax.rs
1 // only-x86_64
2 // ignore-aarch64
3
4 #![feature(asm)]
5
6 #[warn(clippy::inline_asm_x86_intel_syntax)]
7 mod warn_intel {
8 pub(super) unsafe fn use_asm() {
9 asm!("");
10 asm!("", options());
11 asm!("", options(nostack));
12 asm!("", options(att_syntax));
13 asm!("", options(nostack, att_syntax));
14 }
15 }
16
17 #[warn(clippy::inline_asm_x86_att_syntax)]
18 mod warn_att {
19 pub(super) unsafe fn use_asm() {
20 asm!("");
21 asm!("", options());
22 asm!("", options(nostack));
23 asm!("", options(att_syntax));
24 asm!("", options(nostack, att_syntax));
25 }
26 }
27
28 #[cfg(target_arch = "x86_64")]
29 fn main() {
30 unsafe {
31 warn_att::use_asm();
32 warn_intel::use_asm();
33 }
34 }