summaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2016-06-13 21:34:07 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2016-06-13 21:34:07 +0000
commit61958e92f84b20ec65157388ac221d0f23291b03 (patch)
treec7b6909eb3ebaf242aa655314fa820d26e2c5b3a /libgcc
parent423bd6003bda13889da0b7ee54c0ae2ce7b4474a (diff)
downloadgcc-61958e92f84b20ec65157388ac221d0f23291b03.tar.gz
* config/i386/i386-builtin-types.def (INT_FTYPE_FLOAT128):
New function type. * config/i386/i386.c (enum ix86_builtins) [IX86_BUILTIN_SIGNBITQ]: New. (ix86_init_builtins): Add __builtin_signbitq function. (ix86_expand_args_builtin): Handle INT_FTYPE_FLOAT128. (ix86_expand_builtin): Handle IX86_BUILTIN_SIGNBITQ. * config/i386/i386.md (signbittf2): New expander. * config/i386/sse.md (ptesttf2): New insn pattern. * doc/extend.texi (x86 Built-in Functions): Document __builtin_signbitq. libgcc/ChangeLog: * config.host (i[34567]86-*-* | x86_64-*-*): Always include i386/${host_address}/t-softfp in tmake_file. * config/i386/32/t-softfp: Update comment for __builtin_copysignq. * config/i386/32/tf-signs.c: Add __signbittf2 fallback function. * config/i386/64/t-softfp: New file. * config/i386/64/tf-signs.c: Ditto. * config/i386/libgcc-bsd.ver: Add __signbittf2. * config/i386/libgcc-glibc.ver: Ditto. * config/i386/libgcc-sol2.ver: Ditto. testsuite/ChangeLog: * gcc.target/i386/float128-3.c: New test. * gcc.target/i386/quad-sse4.c: Ditto. * gcc.target/i386/quad-sse.c: Use -msse instead of -msse2. Update scan strings. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237415 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog26
-rw-r--r--libgcc/config.host4
-rw-r--r--libgcc/config/i386/32/t-softfp3
-rw-r--r--libgcc/config/i386/32/tf-signs.c11
-rw-r--r--libgcc/config/i386/64/t-softfp2
-rw-r--r--libgcc/config/i386/64/tf-signs.c46
-rw-r--r--libgcc/config/i386/libgcc-bsd.ver4
-rw-r--r--libgcc/config/i386/libgcc-glibc.ver8
-rw-r--r--libgcc/config/i386/libgcc-sol2.ver4
9 files changed, 97 insertions, 11 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 544ea65f102..557a041f71a 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,15 @@
+2016-06-13 Uros Bizjak <ubizjak@gmail.com>
+
+ * config.host (i[34567]86-*-* | x86_64-*-*): Always include
+ i386/${host_address}/t-softfp in tmake_file.
+ * config/i386/32/t-softfp: Update comment for __builtin_copysignq.
+ * config/i386/32/tf-signs.c: Add __signbittf2 fallback function.
+ * config/i386/64/t-softfp: New file.
+ * config/i386/64/tf-signs.c: Ditto.
+ * config/i386/libgcc-bsd.ver: Add __signbittf2.
+ * config/i386/libgcc-glibc.ver: Ditto.
+ * config/i386/libgcc-sol2.ver: Ditto.
+
2016-06-05 Aaron Conole <aconole@redhat.com>
Nathan Sidwell <nathan@acm.org>
@@ -30,7 +42,7 @@
2016-05-19 Sandra Loosemore <sandra@codesourcery.com>
- * config.host [x86_64-*-cygwin*]: Handle tmake_eh_file for mixed
+ * config.host [x86_64-*-cygwin*]: Handle tmake_eh_file for mixed
dw2/seh configuration.
[x86_64-*-mingw*]: Likewise.
@@ -104,7 +116,7 @@
2016-03-28 James Bowman <james.bowman@ftdichip.com>
- * libgcc/config/ft32/lib1funcs.S (*divsi3, *modsi3): New.
+ * libgcc/config/ft32/lib1funcs.S (*divsi3, *modsi3): New.
2016-03-22 Michael Meissner <meissner@linux.vnet.ibm.com>
@@ -519,7 +531,7 @@
2015-10-02 Kirill Yukhin <kirill.yukhin@intel.com>
- * config/i386/cpuinfo.c (processor_features): Add
+ * config/i386/cpuinfo.c (processor_features): Add
FEATURE_AVX512VBMI and FEATURE_AVX512VBMI.
2015-09-28 Joseph Myers <joseph@codesourcery.com>
@@ -884,10 +896,10 @@
2015-05-15 Martin Galvan <martin.galvan@tallertechnologies.com>
- * config/arm/lib1funcs.S (CFI_START_FUNCTION, CFI_END_FUNCTION):
- New macros.
- * config/arm/ieee754-df.S: Add CFI directives.
- * config/arm/ieee754-sf.S: Add CFI directives.
+ * config/arm/lib1funcs.S (CFI_START_FUNCTION, CFI_END_FUNCTION):
+ New macros.
+ * config/arm/ieee754-df.S: Add CFI directives.
+ * config/arm/ieee754-sf.S: Add CFI directives.
2015-05-13 Eric Botcazou <ebotcazou@adacore.com>
diff --git a/libgcc/config.host b/libgcc/config.host
index 7899216af6c..0cd688ddd69 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -1361,9 +1361,7 @@ i[34567]86-*-darwin* | x86_64-*-darwin* | \
i[34567]86-*-freebsd* | x86_64-*-freebsd* | \
i[34567]86-*-openbsd* | x86_64-*-openbsd*)
tmake_file="${tmake_file} t-softfp-tf"
- if test "${host_address}" = 32; then
- tmake_file="${tmake_file} i386/${host_address}/t-softfp"
- fi
+ tmake_file="${tmake_file} i386/${host_address}/t-softfp"
tmake_file="${tmake_file} i386/t-softfp t-softfp"
;;
esac
diff --git a/libgcc/config/i386/32/t-softfp b/libgcc/config/i386/32/t-softfp
index a48a5b3b116..f27e7e64c22 100644
--- a/libgcc/config/i386/32/t-softfp
+++ b/libgcc/config/i386/32/t-softfp
@@ -1,5 +1,6 @@
# Omit TImode functions
softfp_int_modes := si di
-# Provide fallbacks for __builtin_copysignq and __builtin_fabsq.
+# Provide fallbacks for __builtin_copysignq, __builtin_fabsq
+# and __builtin_signbitq.
LIB2ADD += $(srcdir)/config/i386/32/tf-signs.c
diff --git a/libgcc/config/i386/32/tf-signs.c b/libgcc/config/i386/32/tf-signs.c
index 1e30626715f..d74c86a7282 100644
--- a/libgcc/config/i386/32/tf-signs.c
+++ b/libgcc/config/i386/32/tf-signs.c
@@ -37,6 +37,7 @@ union _FP_UNION_Q
__float128 __copysigntf3 (__float128, __float128);
__float128 __fabstf2 (__float128);
+int __signbittf2 (__float128);
__float128
__copysigntf3 (__float128 a, __float128 b)
@@ -60,3 +61,13 @@ __fabstf2 (__float128 a)
return A.flt;
}
+
+int
+__signbittf2 (__float128 a)
+{
+ union _FP_UNION_Q A;
+
+ A.flt = a;
+
+ return A.bits.sign;
+}
diff --git a/libgcc/config/i386/64/t-softfp b/libgcc/config/i386/64/t-softfp
new file mode 100644
index 00000000000..f159f74fe50
--- /dev/null
+++ b/libgcc/config/i386/64/t-softfp
@@ -0,0 +1,2 @@
+# Provide fallbacks for __builtin_signbitq
+LIB2ADD += $(srcdir)/config/i386/64/tf-signs.c
diff --git a/libgcc/config/i386/64/tf-signs.c b/libgcc/config/i386/64/tf-signs.c
new file mode 100644
index 00000000000..29dfaef09a4
--- /dev/null
+++ b/libgcc/config/i386/64/tf-signs.c
@@ -0,0 +1,46 @@
+/* Copyright (C) 2016 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+union _FP_UNION_Q
+{
+ __float128 flt;
+ struct
+ {
+ unsigned long long frac0 : 64;
+ unsigned long long frac1 : 48;
+ unsigned exp : 15;
+ unsigned sign : 1;
+ } bits __attribute__((packed));
+};
+
+int __signbittf3 (__float128);
+
+int
+__signbittf2 (__float128 a)
+{
+ union _FP_UNION_Q A;
+
+ A.flt = a;
+
+ return A.bits.sign;
+}
diff --git a/libgcc/config/i386/libgcc-bsd.ver b/libgcc/config/i386/libgcc-bsd.ver
index f80193ead36..c89f87ec266 100644
--- a/libgcc/config/i386/libgcc-bsd.ver
+++ b/libgcc/config/i386/libgcc-bsd.ver
@@ -111,3 +111,7 @@ GCC_4.8.0 {
__cpu_model
__cpu_indicator_init
}
+
+GCC_7.0.0 {
+ __signbittf2
+}
diff --git a/libgcc/config/i386/libgcc-glibc.ver b/libgcc/config/i386/libgcc-glibc.ver
index 443f8d6647a..6f664dc3f56 100644
--- a/libgcc/config/i386/libgcc-glibc.ver
+++ b/libgcc/config/i386/libgcc-glibc.ver
@@ -152,6 +152,10 @@ GCC_4.8.0 {
__cpu_model
__cpu_indicator_init
}
+
+GCC_7.0.0 {
+ __signbittf2
+}
%else
GCC_4.4.0 {
__addtf3
@@ -193,4 +197,8 @@ GCC_4.8.0 {
__cpu_model
__cpu_indicator_init
}
+
+GCC_7.0.0 {
+ __signbittf2
+}
%endif
diff --git a/libgcc/config/i386/libgcc-sol2.ver b/libgcc/config/i386/libgcc-sol2.ver
index cb9801ca9ec..185b424d4b8 100644
--- a/libgcc/config/i386/libgcc-sol2.ver
+++ b/libgcc/config/i386/libgcc-sol2.ver
@@ -111,3 +111,7 @@ GCC_4.8.0 {
__cpu_model
__cpu_indicator_init
}
+
+GCC_7.0.0 {
+ __signbittf2
+}