summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorHarald van Dijk <harald@gigawatt.nl>2020-12-14 23:47:27 +0000
committerHarald van Dijk <harald@gigawatt.nl>2020-12-14 23:47:27 +0000
commit9eac818370fe4b50a167627593bfe53e61c216bc (patch)
treee77a04e85692d5f9a9bda225c6be9593aba64e5b /clang/lib/CodeGen/CodeGenModule.cpp
parentd058b69b1cd3d71b9bcb45011f5f3ef3a576a5e2 (diff)
[X86] Fix variadic argument handling for x32
The X86-64 ABI defines va_list as typedef struct { unsigned int gp_offset; unsigned int fp_offset; void *overflow_arg_area; void *reg_save_area; } va_list[1]; This means the size, alignment, and reg_save_area offset will depend on whether we are in LP64 or in ILP32 mode, so this commit adds the checks. Additionally, the VAARG_64 pseudo-instruction assumed 64-bit pointers, so this commit adds a VAARG_X32 pseudo-instruction that behaves just like VAARG_64, except for assuming 32-bit pointers. Some of these changes were originally done by Michael Liao <michael.hliao@gmail.com>. Fixes https://bugs.llvm.org/show_bug.cgi?id=48428. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D93160
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions