Commit d5ae4db
authored
Rollup merge of #141538 - folkertdev:systemv-x86_64-va_arg, r=workingjubilee
implement `va_arg` for x86_64 systemv
tracking issue: rust-lang/rust#44930
Turns out LLVM's `va_arg` is also unreliable for this target.
llvm/llvm-project#141361
So, like clang, we implement our own. I used
- the spec at https://gitlab.com/x86-psABIs/x86-64-ABI
- the clang implementation at https://github.com/llvm/llvm-project/blob/9a440f84773c56d3803f330774acb2b4f471d5b4/clang/lib/CodeGen/Targets/X86.cpp#L3041
We can take a bunch of shortcuts because the return type of `va_list` must implement `VaArgSafe`. I also extended some of the tests, because up to 11 floats can be stored in the `reg_safe_area` for this calling convention.
r? `@workingjubilee`
`@rustbot` label +F-c_variadic
try-job: x86_64-apple-1File tree
0 file changed
+0
-0
lines changed0 file changed
+0
-0
lines changed
0 commit comments