We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18c3592 commit 9bf5fd9Copy full SHA for 9bf5fd9
compiler-builtins/src/arm.rs
@@ -162,4 +162,25 @@ intrinsics! {
162
pub unsafe extern "aapcs" fn __aeabi_memclr8(dest: *mut u8, n: usize) {
163
__aeabi_memset4(dest, n, 0);
164
}
165
+
166
+ // NOTE This function is implemented using assembly because they are using
167
+ // a custom calling convention
168
+ #[naked]
169
+ #[cfg(all(target_arch = "arm64ec", target_env = "msvc", not(feature = "no-asm")))]
170
+ pub unsafe extern "C" fn __chkstk() {
171
+ core::arch::naked_asm!(
172
+ ".p2align 2",
173
+ "lsl r4, r4, #2",
174
+ "mov r12, sp",
175
+ "push {{ r5, r6 }}",
176
+ "mov r5, r4",
177
+ "1:",
178
+ "sub r12, r12, 4096",
179
+ "subs r5, r5, 4096",
180
+ "ldr r6, [r12]",
181
+ "bgt 1b",
182
+ "pop {{ r5, r6 }}",
183
+ "bx lr",
184
+ );
185
+ }
186
0 commit comments