blob: 9e9c7badfcacec8435d39fd873ba06874dfa38ab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
// revisions: x86_64 arm
//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
//[arm] compile-flags: --target armv7-unknown-linux-gnueabihf
#![feature(no_core, lang_items, rustc_attrs)]
#![no_core]
#[rustc_builtin_macro]
macro_rules! asm {
() => {};
}
#[lang = "sized"]
trait Sized {}
fn main() {
unsafe {
asm!(".intel_syntax noprefix", "nop");
//[x86_64]~^ ERROR intel syntax is the default syntax on this target
asm!(".intel_syntax aaa noprefix", "nop");
//[x86_64]~^ ERROR intel syntax is the default syntax on this target
asm!(".att_syntax noprefix", "nop");
//[x86_64]~^ ERROR using the .att_syntax directive may cause issues
//[arm]~^^ att syntax is the default syntax on this target
asm!(".att_syntax bbb noprefix", "nop");
//[x86_64]~^ ERROR using the .att_syntax directive may cause issues
//[arm]~^^ att syntax is the default syntax on this target
asm!(".intel_syntax noprefix; nop");
//[x86_64]~^ ERROR intel syntax is the default syntax on this target
asm!(
r"
.intel_syntax noprefix
nop"
);
//[x86_64]~^^^ ERROR intel syntax is the default syntax on this target
}
}
|