]> gcc.gnu.org Git - gcc.git/commit
LoongArch: Implement 128-bit floating point functions in gcc.
authorchenxiaolong <chenxiaolong@loongson.cn>
Fri, 1 Sep 2023 03:22:42 +0000 (11:22 +0800)
committerLulu Cheng <chenglulu@loongson.cn>
Sat, 2 Sep 2023 02:25:03 +0000 (10:25 +0800)
commit4e2d53c943400e8b5d49a7d5aab4a1ad046aefba
tree43111423e0a8fcd8f66815c4aa12b5bf4b9b6d62
parent80907b03c8e72cdcd597f1359fda21163ec22107
LoongArch: Implement 128-bit floating point functions in gcc.

During implementation, float128_type_node is bound with the type "__float128"
so that the compiler can correctly identify the type   of the function. The
"q" suffix is associated with the "f128" function, which makes GCC more
flexible to support different user input cases, implementing functions such
as __builtin_{huge_valq, infq, fabsq, copysignq, nanq, nansq}.

gcc/ChangeLog:

* config/loongarch/loongarch-builtins.cc (loongarch_init_builtins):
Associate the __float128 type to float128_type_node so that it can
be recognized by the compiler.
* config/loongarch/loongarch-c.cc (loongarch_cpu_cpp_builtins):
Add the flag "FLOAT128_TYPE" to gcc and associate a function
with the suffix "q" to "f128".
* doc/extend.texi:Added support for 128-bit floating-point functions on
the LoongArch architecture.

gcc/testsuite/ChangeLog:

* gcc.target/loongarch/math-float-128.c: New test.
gcc/config/loongarch/loongarch-builtins.cc
gcc/config/loongarch/loongarch-c.cc
gcc/doc/extend.texi
gcc/testsuite/gcc.target/loongarch/math-float-128.c [new file with mode: 0644]
This page took 0.06121 seconds and 6 git commands to generate.