52
52
// Our goal here is to touch each page between %rsp+8 and %rsp+8-%rax,
53
53
// ensuring that if any pages are unmapped we'll make a page fault.
54
54
//
55
- // FIXME(abi_custom): This function is unsafe because it uses a custom ABI,
56
- // it does not actually match `extern "C"`.
57
- //
58
55
// The ABI here is that the stack frame size is located in `%rax`. Upon
59
56
// return we're not supposed to modify `%rsp` or `%rax`.
60
57
#[ cfg( target_arch = "x86_64" ) ]
61
58
#[ unsafe( naked) ]
62
59
#[ rustc_std_internal_symbol]
63
- pub unsafe extern "C " fn __rust_probestack ( ) {
60
+ pub unsafe extern "custom " fn __rust_probestack ( ) {
64
61
#[ cfg( not( all( target_env = "sgx" , target_vendor = "fortanix" ) ) ) ]
65
62
macro_rules! ret {
66
63
( ) => {
@@ -144,13 +141,10 @@ pub unsafe extern "C" fn __rust_probestack() {
144
141
// that on Unix we're expected to restore everything as it was, this
145
142
// function basically can't tamper with anything.
146
143
//
147
- // FIXME(abi_custom): This function is unsafe because it uses a custom ABI,
148
- // it does not actually match `extern "C"`.
149
- //
150
144
// The ABI here is the same as x86_64, except everything is 32-bits large.
151
145
#[ unsafe( naked) ]
152
146
#[ rustc_std_internal_symbol]
153
- pub unsafe extern "C " fn __rust_probestack ( ) {
147
+ pub unsafe extern "custom " fn __rust_probestack ( ) {
154
148
core:: arch:: naked_asm!(
155
149
"
156
150
.cfi_startproc
@@ -192,9 +186,6 @@ pub unsafe extern "C" fn __rust_probestack() {
192
186
// probestack function will also do things like _chkstk in MSVC.
193
187
// So we need to sub %ax %sp in probestack when arch is x86.
194
188
//
195
- // FIXME(abi_custom): This function is unsafe because it uses a custom ABI,
196
- // it does not actually match `extern "C"`.
197
- //
198
189
// REF: Rust commit(74e80468347)
199
190
// rust\src\llvm-project\llvm\lib\Target\X86\X86FrameLowering.cpp: 805
200
191
// Comments in LLVM:
@@ -203,7 +194,7 @@ pub unsafe extern "C" fn __rust_probestack() {
203
194
// themselves.
204
195
#[ unsafe( naked) ]
205
196
#[ rustc_std_internal_symbol]
206
- pub unsafe extern "C " fn __rust_probestack ( ) {
197
+ pub unsafe extern "custom " fn __rust_probestack ( ) {
207
198
core:: arch:: naked_asm!(
208
199
"
209
200
.cfi_startproc
0 commit comments