#![allow(unused_imports)]
use core::intrinsics;
intrinsics! {
#[naked]
#[cfg(all(
windows,
target_env = "gnu",
not(feature = "no-asm")
))]
pub unsafe extern "C" fn ___chkstk_ms() {
core::arch::asm!(
"push %rcx",
"push %rax",
"cmp $0x1000,%rax",
"lea 24(%rsp),%rcx",
"jb 1f",
"2:",
"sub $0x1000,%rcx",
"test %rcx,(%rcx)",
"sub $0x1000,%rax",
"cmp $0x1000,%rax",
"ja 2b",
"1:",
"sub %rax,%rcx",
"test %rcx,(%rcx)",
"pop %rax",
"pop %rcx",
"ret",
options(noreturn, att_syntax)
);
}
#[naked]
#[cfg(all(
windows,
target_env = "gnu",
not(feature = "no-asm")
))]
pub unsafe extern "C" fn __alloca() {
core::arch::asm!(
"mov %rcx,%rax", "jmp ___chkstk", options(noreturn, att_syntax)
);
}
#[naked]
#[cfg(all(
windows,
target_env = "gnu",
not(feature = "no-asm")
))]
pub unsafe extern "C" fn ___chkstk() {
core::arch::asm!(
"push %rcx",
"cmp $0x1000,%rax",
"lea 16(%rsp),%rcx", "jb 1f",
"2:",
"sub $0x1000,%rcx",
"test %rcx,(%rcx)",
"sub $0x1000,%rax",
"cmp $0x1000,%rax",
"ja 2b",
"1:",
"sub %rax,%rcx",
"test %rcx,(%rcx)",
"lea 8(%rsp),%rax", "mov %rcx,%rsp", "mov -8(%rax),%rcx", "push (%rax)", "sub %rsp,%rax", "ret",
options(noreturn, att_syntax)
);
}
}
mod _fltused {
#[no_mangle]
#[used]
#[cfg(target_os = "uefi")]
static _fltused: i32 = 0;
}