[clang] [llvm] [X86] Add WinCall Calling Convention and x86_64apx-windows(-gnu/-msvc) triplets (PR #215585)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 12 01:00:06 PDT 2026
trcrsired wrote:
> Does x86 (32-bit) have a similar problem? I recall things like `std::string_view` weren't optimized properly due to the calling convention, too.
Well. Technically the nuance is that on i686 (aka 32 bit windows) windows has stdcall and fastcall and they are different.
but neither case if i remember correctly would cause a std::span to be passed/returned differently from a pointer + size combo. Because the size is 8 which satisifies the 1,2,4,8 size requirement. but on x86_64 they did not expand it to 16 cause issues like this, plus the rdx is no longer used for returning even 32bit uses edx for the 2nd parameter.
WinCall is trying to fix issues like this too.
However, if i rememebered correctly 32 bit windows has some other minor issues.
https://github.com/llvm/llvm-project/pull/215585
More information about the cfe-commits
mailing list