[PATCH] D103452: [clang] Fix reading long doubles with va_arg on x86_64 mingw

2021-06-07 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6de45b9e6a2c: [clang] Fix reading long doubles with va_arg on x86_64 mingw (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D103452?vs=349517&id=350390#toc Repository: rG LLV

[PATCH] D103452: [clang] Fix reading long doubles with va_arg on x86_64 mingw

2021-06-07 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: clang/test/CodeGen/mingw-long-double.c:56-58 + // GNU32: bitcast i8* %argp.cur to x86_fp80* + // GNU64: bitcast i8* %argp.cur to x86_fp80** + // MSC64: bitcast i8* %argp.cur to double* rnk wrote: > mstorsjo wrote: >

[PATCH] D103452: [clang] Fix reading long doubles with va_arg on x86_64 mingw

2021-06-07 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/test/CodeGen/mingw-long-double.c:56-58 + // GNU32: bitcast i8* %argp.cur to x86_fp80* + // GNU64: bitcast i8* %argp.cur to x86_fp80** + // MSC64: bitcast i8* %argp.cur to double* mstorsjo wrote: > mstorsjo wrote: >

[PATCH] D103452: [clang] Fix reading long doubles with va_arg on x86_64 mingw

2021-06-07 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: clang/test/CodeGen/mingw-long-double.c:56-58 + // GNU32: bitcast i8* %argp.cur to x86_fp80* + // GNU64: bitcast i8* %argp.cur to x86_fp80** + // MSC64: bitcast i8* %argp.cur to double* mstorsjo wrote: > rnk wrote: >

[PATCH] D103452: [clang] Fix reading long doubles with va_arg on x86_64 mingw

2021-06-04 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: clang/test/CodeGen/mingw-long-double.c:56-58 + // GNU32: bitcast i8* %argp.cur to x86_fp80* + // GNU64: bitcast i8* %argp.cur to x86_fp80** + // MSC64: bitcast i8* %argp.cur to double* rnk wrote: > These tests will s

[PATCH] D103452: [clang] Fix reading long doubles with va_arg on x86_64 mingw

2021-06-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Comment at: clang/test/CodeGen/mingw-long-double.c:56-58 + // GNU32: bitcast i8* %argp.cur to x86_fp80* + // GNU64: bitcast i8* %argp.cur to x86_fp80** + // MSC64: bitcast

[PATCH] D103452: [clang] Fix reading long doubles with va_arg on x86_64 mingw

2021-06-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 349517. mstorsjo added a comment. Updated the CodeGenCXX/ext-int.cpp testcase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103452/new/ https://reviews.llvm.org/D103452 Files: clang/lib/CodeGen/TargetInfo.

[PATCH] D103452: [clang] Fix reading long doubles with va_arg on x86_64 mingw

2021-06-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 349491. mstorsjo added a comment. Updated to not require the types to be either `isAggregateTypeForABI(Ty)` or `Ty->isMemberPointerType()`, just check the size of the type, added a testcase for `__int128` (which I tested against GCC). Repository: rG LLV

[PATCH] D103452: [clang] Fix reading long doubles with va_arg on x86_64 mingw

2021-06-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:4364-4365 // MS x64 ABI requirement: "Any argument that doesn't fit in 8 bytes, or is // not 1, 2, 4, or 8 bytes, must be passed by reference." if (isAggregateTypeForABI(Ty) || Ty->isMemberPoi

[PATCH] D103452: [clang] Fix reading long doubles with va_arg on x86_64 mingw

2021-06-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:4364-4365 // MS x64 ABI requirement: "Any argument that doesn't fit in 8 bytes, or is // not 1, 2, 4, or 8 bytes, must be passed by reference." if (isAggregateTypeForABI(Ty) || Ty->isMemberPoi

[PATCH] D103452: [clang] Fix reading long doubles with va_arg on x86_64 mingw

2021-06-02 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:4364-4365 // MS x64 ABI requirement: "Any argument that doesn't fit in 8 bytes, or is // not 1, 2, 4, or 8 bytes, must be passed by reference." if (isAggregateTypeForABI(Ty) || Ty->isMemberPointerT

[PATCH] D103452: [clang] Fix reading long doubles with va_arg on x86_64 mingw

2021-06-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: rnk, mati865. Herald added a subscriber: pengfei. mstorsjo requested review of this revision. Herald added a project: clang. On x86_64 mingw, long doubles are always passed indirectly as arguments (see an existing case in WinX86_64ABIInfo::