]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: mingw: Make long double 64 bit
authorSaurabh Jha <saurabh.jha@arm.com>
Thu, 9 Oct 2025 15:03:18 +0000 (15:03 +0000)
committerAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Tue, 2 Dec 2025 01:19:48 +0000 (17:19 -0800)
commit429c2e50d9c7e1f018bb9d7c83bc194ae6e17a3a
treea27518ec6a5d8ebc3f8de38b54bded38d436944e
parent6c9585ce44faeba5e0b6859871712f4895537d29
aarch64: mingw: Make long double 64 bit

On windows targets, the size of long double is 64 bits. Therefore,
unlike aarch64-**-linux-gnu, where the size of long double is 128
bits, the size of long double for aarch64-w64-mingw32 has to be 64
bits.

This commit makes changes to gcc so that long double is 64 bits for
aarch64-w64-mingw32.

gcc/ChangeLog:

* config/aarch64/aarch64-abi-ms.h
(TARGET_LONG_DOUBLE_128): Set this to 0.
* config/aarch64/aarch64.cc
(aarch64_scalar_mode_supported_p): Make long double 64 bits.
(aarch64_c_mode_for_floating_type): Return true for TFmode.
* config/aarch64/aarch64.h
(TARGET_LONG_DOUBLE_128): Set this to 1.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/mingw/mingw.exp: New test.
* gcc.target/aarch64/mingw/long_double_size.c: New test.

co-authored-by: Radek Barton <radek.barton@microsoft.com>
co-authored-by: Martin Vejbora <mvejbora@microsoft.com>
gcc/config/aarch64/aarch64-abi-ms.h
gcc/config/aarch64/aarch64.cc
gcc/config/aarch64/aarch64.h
gcc/testsuite/gcc.target/aarch64/mingw/long_double_size.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/mingw/mingw.exp [new file with mode: 0644]