2025-03-16 21:14:41 +01:00
|
|
|
//@ build-pass
|
|
|
|
|
//@ needs-asm-support
|
|
|
|
|
|
2024-12-18 22:05:27 +01:00
|
|
|
#![feature(naked_functions_target_feature)]
|
2025-03-16 21:14:41 +01:00
|
|
|
#![crate_type = "lib"]
|
|
|
|
|
|
|
|
|
|
use std::arch::{asm, naked_asm};
|
|
|
|
|
|
|
|
|
|
#[cfg(target_arch = "x86_64")]
|
|
|
|
|
#[target_feature(enable = "sse2")]
|
2025-03-29 17:30:11 +01:00
|
|
|
#[unsafe(naked)]
|
|
|
|
|
pub extern "C" fn compatible_target_feature() {
|
|
|
|
|
naked_asm!("ret");
|
2025-03-16 21:14:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(target_arch = "aarch64")]
|
|
|
|
|
#[target_feature(enable = "neon")]
|
2025-03-29 17:30:11 +01:00
|
|
|
#[unsafe(naked)]
|
|
|
|
|
pub extern "C" fn compatible_target_feature() {
|
|
|
|
|
naked_asm!("ret");
|
2025-03-16 21:14:41 +01:00
|
|
|
}
|