1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#![allow(unused_imports)] use core::intrinsics; intrinsics! { #[naked] #[cfg(all(target_os = "uefi", not(feature = "no-asm")))] pub unsafe extern "C" fn __chkstk() { core::arch::asm!( ".p2align 2", "lsl x16, x15, #4", "mov x17, sp", "1:", "sub x17, x17, 4096", "subs x16, x16, 4096", "ldr xzr, [x17]", "b.gt 1b", "ret", options(noreturn) ); } }