aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authormeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-11 19:45:35 +0000
committermeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-11 19:45:35 +0000
commit627359844d229887e1a0f1cae829c9831aba7912 (patch)
tree17fc7642002652c4807a5bd71789fcefe83fb7db /libgcc
parent22b930cb1e8c2210adaead83653ebc03fa8017b0 (diff)
[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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234884 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog8
-rw-r--r--libgcc/configure22
-rw-r--r--libgcc/configure.ac18
3 files changed, 32 insertions, 16 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 6011d2cccfb..2a138628326 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 f3f360512c4..e7d6c75a6f7 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 897259e62bc..269997f23e2 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;
}