Fix: moved #[no_mangle]

This commit is contained in:
linux1 2021-08-18 12:40:18 -04:00
parent 7095dfffc3
commit 66e95b17ec

View file

@ -49,7 +49,7 @@ extern "Rust" {
}
macro_rules! check { ($func:ident, $ty:ty, $class:ident, $mov:literal) => {
#[no_mangle]
pub unsafe fn $func(x: $ty) -> $ty {
dont_merge(stringify!(func));
@ -75,7 +75,6 @@ macro_rules! check_reg { ($func:ident, $ty:ty, $reg:tt, $mov:literal) => {
// systemz: brasl %r14, extern_func@PLT
// systemz: #NO_APP
#[cfg(s390x)]
#[no_mangle]
pub unsafe fn sym_fn_32() {
asm!("brasl %r14, {}", sym extern_func);
}
@ -84,5 +83,4 @@ pub unsafe fn sym_fn_32() {
// CHECK: #APP
// CHECK: lgr r{{[0-15]+}}, r{{[0-15]+}}
// CHECK: #NO_APP
#[no_mangle]
check!(reg_i32, i32, reg, "lgr");