On 5/12/2026 9:57 AM, Ard Biesheuvel via groups.io wrote:
Does MSVC follow the AAPCS64 for varargs?
https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#id120
Thanks for the link here, I didn't realize the va_list definition was
defined in the AAPCS64 ABI spec, I thought that this was only compiler
defined, but its good it is here. Unfortunately...MSVC does not follow
this.
They simply have typedef char * va_list. Presumably to match what x86
had. Which is very unfortunate. So then to match, clang has followed
that.
I'm reaching out to some internal compiler folks on this, but I don't
think this is likely to change, of course.
If not, then I don't think this is fixable. If it does, then we need to
fix the VA_LIST definitions for _M_ARM64.
Yeah, I think the question is whether we should rely on the compiler
builtins here or use our own definitions here, the char * and related
macros.
Because this is AAPCS64 defined, I somewhat lean towards saying MSVC did
this wrong and we shouldn't punish the toolchains that did this right.
Unfortunately, that doesn't solve the problem.
We still could make sure CLANGPDB takes advantage of the compiler
builtins by avoiding the _M_ARM64 path, that presumably would have
some benefit, but again, doesn't solve this problem.
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#121937): https://edk2.groups.io/g/devel/message/121937
Mute This Topic: https://groups.io/mt/119278849/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-