On 6/13/26 22:22, Oleg Tolmatcev wrote:
GCC could return __int128 values in SSE (%xmm0) on Windows x64 instead of following the MS x64 ABI. Root cause: return classification allowed 128-bit integer-like scalars to be treated as direct register returns. This patch updates the Windows x64 return-classification and codegen to treat int128 as an indirect return (caller-provided slot passed as first argument, pointer returned in RAX).PR target/78799 * config/i386/i386.cc (function_value_ms_64): Do not treat integral 16-byte values as SSE returns. (ix86_return_in_memory): Likewise avoid treating integral 16-byte values as XMM returns. * gcc/testsuite/gcc.target/i386/pr78799.c: New test. Signed-off-by: Oleg Tolmatcev <[email protected]>
Please use the change log format below next time, it should be pointed to the changelog file and the files modified relative to it.
gcc: PR target/78799 * config/i386/i386.cc (function_value_ms_64): Do not treat integral 16-byte values as SSE returns. (ix86_return_in_memory): Likewise avoid treating integral 16-byte values as XMM returns.gcc/testsuite:* gcc.target/i386/pr78799.c: New test.
I have tested the change on x86_64 Linux, no new testsuite failures. Now for other reviewers to comment on it.
