mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
35 lines
766 B
Rust
35 lines
766 B
Rust
// only-x86_64
|
|
// ignore-aarch64
|
|
|
|
#[warn(clippy::inline_asm_x86_intel_syntax)]
|
|
mod warn_intel {
|
|
pub(super) unsafe fn use_asm() {
|
|
use std::arch::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() {
|
|
use std::arch::asm;
|
|
asm!("");
|
|
asm!("", options());
|
|
asm!("", options(nostack));
|
|
asm!("", options(att_syntax));
|
|
asm!("", options(nostack, att_syntax));
|
|
}
|
|
}
|
|
|
|
#[cfg(target_arch = "x86_64")]
|
|
fn main() {
|
|
unsafe {
|
|
warn_att::use_asm();
|
|
warn_intel::use_asm();
|
|
}
|
|
}
|