[all-commits] [llvm/llvm-project] c8c075: [MS] Follow up fix to pass aligned args to variadi...
Reid Kleckner via All-commits
all-commits at lists.llvm.org
Wed Sep 13 16:29:25 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c8c075e8769a615451653b37e5426eb5d7a1d16c
https://github.com/llvm/llvm-project/commit/c8c075e8769a615451653b37e5426eb5d7a1d16c
Author: Reid Kleckner <rnk at google.com>
Date: 2023-09-13 (Wed, 13 Sep 2023)
Changed paths:
M clang/include/clang/CodeGen/CGFunctionInfo.h
M clang/lib/CodeGen/Targets/X86.cpp
M clang/test/CodeGen/X86/x86_32-arguments-win32.c
Log Message:
-----------
[MS] Follow up fix to pass aligned args to variadic x86_32 functions (#65692)
MSVC allows users to pass structures with required alignments greater
than 4 to variadic functions. It does not pass them indirectly to
correctly align them. Instead, it passes them directly with the usual 4
byte stack alignment.
This change implements the same logic in clang on the passing side. The
receiving side (va_arg) never implemented any of this indirect logic, so
it doesn't need to be updated.
This issue pre-existed, but @aaron.ballman noticed it when we started
passing structs containing aligned fields indirectly in D152752.
More information about the All-commits
mailing list