2020-09-30 21:30:49 +00:00
|
|
|
// only-x86_64
|
2021-04-18 23:13:46 +00:00
|
|
|
// ignore-aarch64
|
|
|
|
|
|
|
|
#![feature(asm)]
|
2020-09-28 13:30:47 +00:00
|
|
|
|
|
|
|
#[warn(clippy::inline_asm_x86_intel_syntax)]
|
|
|
|
mod warn_intel {
|
|
|
|
pub(super) unsafe fn use_asm() {
|
|
|
|
asm!("");
|
|
|
|
asm!("", options());
|
|
|
|
asm!("", options(nostack));
|
|
|
|
asm!("", options(att_syntax));
|
|
|
|
asm!("", options(nostack, att_syntax));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[warn(clippy::inline_asm_x86_att_syntax)]
|
|
|
|
mod warn_att {
|
|
|
|
pub(super) unsafe fn use_asm() {
|
|
|
|
asm!("");
|
|
|
|
asm!("", options());
|
|
|
|
asm!("", options(nostack));
|
|
|
|
asm!("", options(att_syntax));
|
|
|
|
asm!("", options(nostack, att_syntax));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-18 23:13:46 +00:00
|
|
|
#[cfg(target_arch = "x86_64")]
|
2020-09-28 13:30:47 +00:00
|
|
|
fn main() {
|
|
|
|
unsafe {
|
|
|
|
warn_att::use_asm();
|
|
|
|
warn_intel::use_asm();
|
|
|
|
}
|
|
|
|
}
|