5252// Our goal here is to touch each page between %rsp+8 and %rsp+8-%rax,
5353// ensuring that if any pages are unmapped we'll make a page fault.
5454//
55- // FIXME(abi_custom): This function is unsafe because it uses a custom ABI,
56- // it does not actually match `extern "C"`.
57- //
5855// The ABI here is that the stack frame size is located in `%rax`. Upon
5956// return we're not supposed to modify `%rsp` or `%rax`.
6057#[ cfg( target_arch = "x86_64" ) ]
6158#[ unsafe( naked) ]
6259#[ rustc_std_internal_symbol]
63- pub unsafe extern "C " fn __rust_probestack ( ) {
60+ pub unsafe extern "custom " fn __rust_probestack ( ) {
6461 #[ cfg( not( all( target_env = "sgx" , target_vendor = "fortanix" ) ) ) ]
6562 macro_rules! ret {
6663 ( ) => {
@@ -144,13 +141,10 @@ pub unsafe extern "C" fn __rust_probestack() {
144141// that on Unix we're expected to restore everything as it was, this
145142// function basically can't tamper with anything.
146143//
147- // FIXME(abi_custom): This function is unsafe because it uses a custom ABI,
148- // it does not actually match `extern "C"`.
149- //
150144// The ABI here is the same as x86_64, except everything is 32-bits large.
151145#[ unsafe( naked) ]
152146#[ rustc_std_internal_symbol]
153- pub unsafe extern "C " fn __rust_probestack ( ) {
147+ pub unsafe extern "custom " fn __rust_probestack ( ) {
154148 core:: arch:: naked_asm!(
155149 "
156150 .cfi_startproc
@@ -192,9 +186,6 @@ pub unsafe extern "C" fn __rust_probestack() {
192186// probestack function will also do things like _chkstk in MSVC.
193187// So we need to sub %ax %sp in probestack when arch is x86.
194188//
195- // FIXME(abi_custom): This function is unsafe because it uses a custom ABI,
196- // it does not actually match `extern "C"`.
197- //
198189// REF: Rust commit(74e80468347)
199190// rust\src\llvm-project\llvm\lib\Target\X86\X86FrameLowering.cpp: 805
200191// Comments in LLVM:
@@ -203,7 +194,7 @@ pub unsafe extern "C" fn __rust_probestack() {
203194// themselves.
204195#[ unsafe( naked) ]
205196#[ rustc_std_internal_symbol]
206- pub unsafe extern "C " fn __rust_probestack ( ) {
197+ pub unsafe extern "custom " fn __rust_probestack ( ) {
207198 core:: arch:: naked_asm!(
208199 "
209200 .cfi_startproc
0 commit comments