diff options
author | Michael Meissner <meissner@linux.vnet.ibm.com> | 2016-04-11 19:45:35 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 2016-04-11 19:45:35 +0000 |
commit | 35fbda430dff88d550d1c73d4499f0c6aceece4e (patch) | |
tree | 17fc7642002652c4807a5bd71789fcefe83fb7db /libgcc | |
parent | a9c2f3d9af1ba5ef57d98bd48b5f1689b42082e5 (diff) | |
download | gcc-35fbda430dff88d550d1c73d4499f0c6aceece4e.zip gcc-35fbda430dff88d550d1c73d4499f0c6aceece4e.tar.gz gcc-35fbda430dff88d550d1c73d4499f0c6aceece4e.tar.bz2 |
re PR target/70381 (On powerpc, -mfloat128 is on by default for all VSX systems)
[gcc]
2016-04-11 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/70381
* config/rs6000/rs6000.c (rs6000_opt_masks): Disable using the
target attribute and pragma from changing the -mfloat128
and -mfloat128-hardware options.
* doc/extend.texi (Additional Floating Types): Document PowerPC
__float128 restrictions.
[libgcc]
2016-04-11 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/70381
* configure.ac (powerpc*-*-linux*): Rework tests to build
__float128 emulation routines to not depend on using #pragma GCC
target to enable -mfloat128.
* configure: Regnerate.
[gcc/testsuite]
2016-04-11 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/70381
* gcc.target/powerpc/float128-1.c: New tests to make sure the
__float128 emulator is built and runs.
* gcc.target/powerpc/float128-1.c: Likewise.
* lib/target-supports.exp (check_ppc_float128_sw_available):
Rework tests for __float128 software and hardware
availability. Fix exit condition to return 0 on success.
From-SVN: r234884
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 8 | ||||
-rw-r--r-- | libgcc/configure | 22 | ||||
-rw-r--r-- | libgcc/configure.ac | 18 |
3 files changed, 32 insertions, 16 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 6011d2c..2a13862 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,11 @@ +2016-04-11 Michael Meissner <meissner@linux.vnet.ibm.com> + + PR target/70381 + * configure.ac (powerpc*-*-linux*): Rework tests to build + __float128 emulation routines to not depend on using #pragma GCC + target to enable -mfloat128. + * configure: Regnerate. + 2016-04-04 Eric Botcazou <ebotcazou@adacore.com> PR target/67172 diff --git a/libgcc/configure b/libgcc/configure index f3f3605..e7d6c75 100644 --- a/libgcc/configure +++ b/libgcc/configure @@ -4767,16 +4767,20 @@ esac esac case ${host} in +# At present, we cannot turn -mfloat128 on via #pragma GCC target, +# so just check if we have VSX (ISA 2.06) support to build the +# software libraries, and whether the assembler can handle xsaddqp +# for hardware support. powerpc*-*-linux*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the PowerPC compiler can do __float128" >&5 -$as_echo_n "checking whether the PowerPC compiler can do __float128... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PowerPC ISA 2.06 to build __float128 libraries" >&5 +$as_echo_n "checking for PowerPC ISA 2.06 to build __float128 libraries... " >&6; } if test "${libgcc_cv_powerpc_float128+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#pragma GCC target ("vsx,float128") - __float128 add (__float128 *a) { return *a + *(a+1); } +#pragma GCC target ("vsx") + vector double dadd (vector double a, vector double b) { return a + b; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : libgcc_cv_powerpc_float128=yes @@ -4788,21 +4792,21 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgcc_cv_powerpc_float128" >&5 $as_echo "$libgcc_cv_powerpc_float128" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the PowerPC compiler can do hardware __float128" >&5 -$as_echo_n "checking whether the PowerPC compiler can do hardware __float128... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PowerPC ISA 3.0 to build hardware __float128 libraries" >&5 +$as_echo_n "checking for PowerPC ISA 3.0 to build hardware __float128 libraries... " >&6; } if test "${libgcc_cv_powerpc_float128_hw+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#pragma GCC target ("cpu=power9,float128,float128-hardware") +#pragma GCC target ("vsx,power9-vector") #include <sys/auxv.h> #ifndef AT_PLATFORM #error "AT_PLATFORM is not defined" #endif - __float128 add (__float128 a, __float128 b) + vector unsigned char (vector unsigned char a, vector unsigned char b) { - __float128 ret; + vector unsigned char ret; __asm__ ("xsaddqp %0,%1,%2" : "=v" (ret) : "v" (a), "v" (b)); return ret; } diff --git a/libgcc/configure.ac b/libgcc/configure.ac index 897259e..269997f 100644 --- a/libgcc/configure.ac +++ b/libgcc/configure.ac @@ -374,26 +374,30 @@ esac esac case ${host} in +# At present, we cannot turn -mfloat128 on via #pragma GCC target, +# so just check if we have VSX (ISA 2.06) support to build the +# software libraries, and whether the assembler can handle xsaddqp +# for hardware support. powerpc*-*-linux*) - AC_CACHE_CHECK([whether the PowerPC compiler can do __float128], + AC_CACHE_CHECK([for PowerPC ISA 2.06 to build __float128 libraries], [libgcc_cv_powerpc_float128], [AC_COMPILE_IFELSE( - [#pragma GCC target ("vsx,float128") - __float128 add (__float128 *a) { return *a + *(a+1); }], + [#pragma GCC target ("vsx") + vector double dadd (vector double a, vector double b) { return a + b; }], [libgcc_cv_powerpc_float128=yes], [libgcc_cv_powerpc_float128=no])]) - AC_CACHE_CHECK([whether the PowerPC compiler can do hardware __float128], + AC_CACHE_CHECK([for PowerPC ISA 3.0 to build hardware __float128 libraries], [libgcc_cv_powerpc_float128_hw], [AC_COMPILE_IFELSE( - [#pragma GCC target ("cpu=power9,float128,float128-hardware") + [#pragma GCC target ("vsx,power9-vector") #include <sys/auxv.h> #ifndef AT_PLATFORM #error "AT_PLATFORM is not defined" #endif - __float128 add (__float128 a, __float128 b) + vector unsigned char (vector unsigned char a, vector unsigned char b) { - __float128 ret; + vector unsigned char ret; __asm__ ("xsaddqp %0,%1,%2" : "=v" (ret) : "v" (a), "v" (b)); return ret; } |