compiler_builtins/
x86_64.rs1#![allow(unused_imports)]
2
3use core::intrinsics;
4
5intrinsics! {
11 #[unsafe(naked)]
12 #[cfg(all(
13 any(
14 all(windows, target_env = "gnu"),
15 target_os = "cygwin",
16 target_os = "uefi"
17 ),
18 not(feature = "no-asm")
19 ))]
20 pub unsafe extern "C" fn ___chkstk_ms() {
21 core::arch::naked_asm!(
22 "push %rcx",
23 "push %rax",
24 "cmp $0x1000,%rax",
25 "lea 24(%rsp),%rcx",
26 "jb 1f",
27 "2:",
28 "sub $0x1000,%rcx",
29 "test %rcx,(%rcx)",
30 "sub $0x1000,%rax",
31 "cmp $0x1000,%rax",
32 "ja 2b",
33 "1:",
34 "sub %rax,%rcx",
35 "test %rcx,(%rcx)",
36 "pop %rax",
37 "pop %rcx",
38 "ret",
39 options(att_syntax)
40 );
41 }
42}
43
44mod _fltused {
47 #[unsafe(no_mangle)]
48 #[used]
49 #[cfg(target_os = "uefi")]
50 static _fltused: i32 = 0;
51}