Skip to content

Commit fff42eb

Browse files
committed
add a fixme to use extern_custom when available
1 parent 601e479 commit fff42eb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

library/compiler-builtins/compiler-builtins/src/probestack.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
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-
// This function is unsafe because it uses a custom ABI, it does not actually match `extern "C"`.
55+
// FIXME(abi_custom): This function is unsafe because it uses a custom ABI,
56+
// it does not actually match `extern "C"`.
5657
//
5758
// The ABI here is that the stack frame size is located in `%rax`. Upon
5859
// return we're not supposed to modify `%rsp` or `%rax`.
@@ -143,7 +144,8 @@ pub unsafe extern "C" fn __rust_probestack() {
143144
// that on Unix we're expected to restore everything as it was, this
144145
// function basically can't tamper with anything.
145146
//
146-
// This function is unsafe because it uses a custom ABI, it does not actually match `extern "C"`.
147+
// FIXME(abi_custom): This function is unsafe because it uses a custom ABI,
148+
// it does not actually match `extern "C"`.
147149
//
148150
// The ABI here is the same as x86_64, except everything is 32-bits large.
149151
#[unsafe(naked)]
@@ -190,7 +192,8 @@ pub unsafe extern "C" fn __rust_probestack() {
190192
// probestack function will also do things like _chkstk in MSVC.
191193
// So we need to sub %ax %sp in probestack when arch is x86.
192194
//
193-
// This function is unsafe because it uses a custom ABI, it does not actually match `extern "C"`.
195+
// FIXME(abi_custom): This function is unsafe because it uses a custom ABI,
196+
// it does not actually match `extern "C"`.
194197
//
195198
// REF: Rust commit(74e80468347)
196199
// rust\src\llvm-project\llvm\lib\Target\X86\X86FrameLowering.cpp: 805

0 commit comments

Comments
 (0)