The feature gate for the issue is #![feature(c_variadic_naked_functions)].
This feature allows naked c-variadic function definitions with any ABI that is supported for foreign c-variadic functions.
#![feature(c_variadic, c_variadic_naked_functions)]
#[unsafe(naked)]
unsafe extern "win64" fn variadic_win64(_: u32, _: ...) -> u32 {
core::arch::naked_asm!(
r#"
push rax
mov qword ptr [rsp + 40], r9
mov qword ptr [rsp + 24], rdx
mov qword ptr [rsp + 32], r8
lea rax, [rsp + 40]
mov qword ptr [rsp], rax
lea eax, [rdx + rcx]
add eax, r8d
pop rcx
ret
"#,
)
}
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Steps
Unresolved Questions
XXX --- list all the "unresolved questions" found in the RFC to ensure they are
not forgotten
Implementation history
The feature gate for the issue is
#![feature(c_variadic_naked_functions)].This feature allows naked c-variadic function definitions with any ABI that is supported for foreign c-variadic functions.
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Steps
feature(c_variadic_naked_functions)#148770rustfmtUnresolved Questions
XXX --- list all the "unresolved questions" found in the RFC to ensure they are
not forgotten
Implementation history
feature(c_variadic_naked_functions)#148770