2024-12-17 01:12:36 +09:00
|
|
|
//@ add-core-stubs
|
2025-04-02 12:08:01 -07:00
|
|
|
//@ revisions: x86_64 arm
|
2021-03-08 23:48:08 -05:00
|
|
|
//@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
|
2021-03-24 04:52:57 +00:00
|
|
|
//@[x86_64] check-pass
|
2021-06-13 21:19:39 +03:00
|
|
|
//@[x86_64] needs-llvm-components: x86
|
2024-08-17 05:32:09 +01:00
|
|
|
// LLVM 19+ has full support for 64-bit cookies.
|
2021-03-08 23:48:08 -05:00
|
|
|
//@[arm] compile-flags: --target armv7-unknown-linux-gnueabihf
|
2021-03-24 04:52:57 +00:00
|
|
|
//@[arm] build-fail
|
2021-06-13 21:19:39 +03:00
|
|
|
//@[arm] needs-llvm-components: arm
|
2022-03-19 16:50:24 +01:00
|
|
|
//@ needs-asm-support
|
2021-03-08 23:48:08 -05:00
|
|
|
|
2024-12-17 01:12:36 +09:00
|
|
|
#![feature(no_core)]
|
2021-03-24 04:52:57 +00:00
|
|
|
#![crate_type = "rlib"]
|
2021-03-08 23:48:08 -05:00
|
|
|
#![no_core]
|
2024-04-07 00:46:35 +02:00
|
|
|
|
2024-12-17 01:12:36 +09:00
|
|
|
extern crate minicore;
|
|
|
|
use minicore::*;
|
2021-02-18 14:27:11 -05:00
|
|
|
|
2021-03-24 04:52:57 +00:00
|
|
|
pub fn main() {
|
2021-02-18 14:27:11 -05:00
|
|
|
unsafe {
|
|
|
|
asm!(".intel_syntax noprefix", "nop");
|
2021-03-24 04:52:57 +00:00
|
|
|
//[x86_64]~^ WARN avoid using `.intel_syntax`
|
|
|
|
//[arm]~^^ ERROR unknown directive
|
2021-02-18 14:27:11 -05:00
|
|
|
asm!(".intel_syntax aaa noprefix", "nop");
|
2021-03-24 04:52:57 +00:00
|
|
|
//[x86_64]~^ WARN avoid using `.intel_syntax`
|
|
|
|
//[arm]~^^ ERROR unknown directive
|
2021-02-18 14:27:11 -05:00
|
|
|
asm!(".att_syntax noprefix", "nop");
|
2021-03-24 04:52:57 +00:00
|
|
|
//[x86_64]~^ WARN avoid using `.att_syntax`
|
|
|
|
//[arm]~^^ ERROR unknown directive
|
2021-02-18 14:27:11 -05:00
|
|
|
asm!(".att_syntax bbb noprefix", "nop");
|
2021-03-24 04:52:57 +00:00
|
|
|
//[x86_64]~^ WARN avoid using `.att_syntax`
|
|
|
|
//[arm]~^^ ERROR unknown directive
|
2021-02-20 01:17:18 -05:00
|
|
|
asm!(".intel_syntax noprefix; nop");
|
2021-03-24 04:52:57 +00:00
|
|
|
//[x86_64]~^ WARN avoid using `.intel_syntax`
|
|
|
|
//[arm]~^^ ERROR unknown directive
|
2021-02-20 01:17:18 -05:00
|
|
|
|
|
|
|
asm!(
|
|
|
|
r"
|
|
|
|
.intel_syntax noprefix
|
|
|
|
nop"
|
|
|
|
);
|
2021-03-24 04:52:57 +00:00
|
|
|
//[x86_64]~^^^ WARN avoid using `.intel_syntax`
|
|
|
|
//[arm]~^^^^ ERROR unknown directive
|
2021-02-18 14:27:11 -05:00
|
|
|
}
|
|
|
|
}
|
2021-04-13 18:11:11 +01:00
|
|
|
|
|
|
|
global_asm!(".intel_syntax noprefix", "nop");
|
|
|
|
//[x86_64]~^ WARN avoid using `.intel_syntax`
|
2024-08-17 05:32:09 +01:00
|
|
|
// Global assembly errors don't have line numbers, so no error on ARM.
|
2025-03-23 15:50:51 +03:00
|
|
|
|
|
|
|
//[arm]~? ERROR unknown directive
|
|
|
|
//[arm]~? ERROR unknown directive
|