7 Comments
Feb 19, 2021Liked by Jim Cownie

The AArch64/MacOS conventions are those of AArch64/iOS, a little known system that the author can be forgiven for not knowing about :-). I suspect the place where the overhead of calling variadic functions actually matters is in things like objc_msgSend which may well occur in computationally significant portions of code.

Expand full comment

You may be correct for the cases you have tried, but there are other cases where varadic and non-varadic functions are called differently on, I believe, a number of ISAs. For example on RISC-V all arguments to a varadic function are passed in integer registers, including floating point arguments.

https://godbolt.org/z/z5r5z8

Expand full comment

Clang can be told to compile for other targets, for example "-target arm64-apple-macosx" gives you this: https://godbolt.org/z/avGExz

Expand full comment