2024-12-16 16:12:36 +00:00
|
|
|
//@ add-core-stubs
|
2024-08-17 04:32:09 +00:00
|
|
|
//@ revisions: x86_64 arm_llvm_18 arm
|
2021-03-09 04:48:08 +00: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 18:19:39 +00:00
|
|
|
//@[x86_64] needs-llvm-components: x86
|
2024-08-17 04:32:09 +00:00
|
|
|
//@[arm_llvm_18] compile-flags: --target armv7-unknown-linux-gnueabihf
|
|
|
|
//@[arm_llvm_18] build-fail
|
|
|
|
//@[arm_llvm_18] needs-llvm-components: arm
|
|
|
|
//@[arm_llvm_18] ignore-llvm-version: 19 - 99
|
|
|
|
// LLVM 19+ has full support for 64-bit cookies.
|
2021-03-09 04:48:08 +00:00
|
|
|
//@[arm] compile-flags: --target armv7-unknown-linux-gnueabihf
|
2021-03-24 04:52:57 +00:00
|
|
|
//@[arm] build-fail
|
2021-06-13 18:19:39 +00:00
|
|
|
//@[arm] needs-llvm-components: arm
|
2024-08-17 04:32:09 +00:00
|
|
|
//@[arm] min-llvm-version: 19
|
2022-03-19 15:50:24 +00:00
|
|
|
//@ needs-asm-support
|
2021-03-09 04:48:08 +00:00
|
|
|
|
2024-12-16 16:12:36 +00:00
|
|
|
#![feature(no_core)]
|
2021-03-24 04:52:57 +00:00
|
|
|
#![crate_type = "rlib"]
|
2021-03-09 04:48:08 +00:00
|
|
|
#![no_core]
|
2024-04-06 22:46:35 +00:00
|
|
|
|
2024-12-16 16:12:36 +00:00
|
|
|
extern crate minicore;
|
|
|
|
use minicore::*;
|
2021-02-18 19:27:11 +00:00
|
|
|
|
2021-03-24 04:52:57 +00:00
|
|
|
pub fn main() {
|
2021-02-18 19:27:11 +00: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
|
2024-08-17 04:32:09 +00:00
|
|
|
//[arm_llvm_18]~^^^ ERROR unknown directive
|
2021-02-18 19:27:11 +00: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
|
2024-08-17 04:32:09 +00:00
|
|
|
//[arm_llvm_18]~^^^ ERROR unknown directive
|
2021-02-18 19:27:11 +00: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
|
2024-08-17 04:32:09 +00:00
|
|
|
//[arm_llvm_18]~^^^ ERROR unknown directive
|
2021-02-18 19:27:11 +00: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
|
2024-08-17 04:32:09 +00:00
|
|
|
//[arm_llvm_18]~^^^ ERROR unknown directive
|
2021-02-20 06:17:18 +00: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
|
2024-08-17 04:32:09 +00:00
|
|
|
//[arm_llvm_18]~^^^ ERROR unknown directive
|
2021-02-20 06:17:18 +00: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
|
2024-08-17 04:32:09 +00:00
|
|
|
//[arm_llvm_18]~^^^^^ ERROR unknown directive
|
2021-02-18 19:27:11 +00:00
|
|
|
}
|
|
|
|
}
|
2021-04-13 17:11:11 +00:00
|
|
|
|
|
|
|
global_asm!(".intel_syntax noprefix", "nop");
|
|
|
|
//[x86_64]~^ WARN avoid using `.intel_syntax`
|
2024-08-17 04:32:09 +00:00
|
|
|
// Global assembly errors don't have line numbers, so no error on ARM.
|