We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d8ab794 + a285b0a commit 3f47913Copy full SHA for 3f47913
src/x86.rs
@@ -8,14 +8,27 @@ use core::intrinsics;
8
// NOTE These functions are never mangled as they are not tested against compiler-rt
9
10
intrinsics! {
11
+ #[naked]
12
+ #[cfg(all(
13
+ windows,
14
+ target_env = "gnu",
15
+ not(feature = "no-asm")
16
+ ))]
17
+ pub unsafe extern "C" fn __chkstk() {
18
+ core::arch::asm!(
19
+ "jmp __alloca", // Jump to __alloca since fallthrough may be unreliable"
20
+ options(noreturn, att_syntax)
21
+ );
22
+ }
23
+
24
#[naked]
25
#[cfg(all(
26
windows,
27
target_env = "gnu",
28
not(feature = "no-asm")
29
))]
30
pub unsafe extern "C" fn _alloca() {
- // _chkstk and _alloca are the same function
31
+ // __chkstk and _alloca are the same function
32
core::arch::asm!(
33
"push %ecx",
34
"cmp $0x1000,%eax",
0 commit comments