summaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-12 16:30:53 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-12 16:30:53 +0000
commit8b21beb20e34549be88451e0c4fec6bd6badb881 (patch)
treea9970b42c2ad08d6a0e408e9b647d6568ed8bd41 /libgcc
parentb899e8082e094e13abed789b586b4751cac97c96 (diff)
downloadgcc-8b21beb20e34549be88451e0c4fec6bd6badb881.tar.gz
gcc/
2009-02-12 Uros Bizjak <ubizjak@gmail.com> * longlong.h (sub_ddmmss): New for ia64. Ported from GMP 4.2. (umul_ppmm): Likewise. (count_leading_zeros): Likewise. (count_trailing_zeros): Likewise. (UMUL_TIME): Likewise. 2009-02-12 H.J. Lu <hongjiu.lu@intel.com> * config.gcc: Add ia64/t-fprules-softfp soft-fp/t-softfp to tmake_file for ia64*-*-linux*. * config/ia64/ia64.c (ia64_soft_fp_init_libfuncs): New. (ia64_expand_compare): Use HPUX library for TFmode only for HPUX. (ia64_builtins): Add IA64_BUILTIN_COPYSIGNQ, IA64_BUILTIN_FABSQ and IA64_BUILTIN_INFQ. (ia64_init_builtins): Initialize __builtin_infq, __builtin_fabsq and __builtin_copysignq if not HPUX. (ia64_expand_builtin): Handle IA64_BUILTIN_COPYSIGNQ, IA64_BUILTIN_FABSQ and IA64_BUILTIN_INFQ. * config/ia64/lib1funcs.asm (__divtf3): Define only if SHARED is defined. (__fixtfti): Likewise. (__fixunstfti): Likewise. (__floattitf): Likewise. * config/ia64/libgcc-glibc.ver: New. * config/ia64/t-fprules-softfp: Likewise. * config/ia64/sfp-machine.h: Likewise. * config/ia64/linux.h (LIBGCC2_HAS_TF_MODE): New. (LIBGCC2_TF_CEXT): Likewise. (TF_SIZE): Likewise. (TARGET_INIT_LIBFUNCS): Likewise. * config/ia64/t-glibc: Add $(srcdir)/config/ia64/libgcc-glibc.ver to SHLIB_MAPFILES. libgcc/ 2009-02-12 H.J. Lu <hongjiu.lu@intel.com> * config.host: Add ia64/t-fprules-softfp ia64/t-softfp-compat to tmake_file for ia64*-*-linux*. * Makefile.in (gen-hide-list): Ignore .*_compat and .*@.*. * config/ia64/__divxf3.asm: New. * config/ia64/_fixtfdi.asm: Likewise. * config/ia64/_fixunstfdi.asm: Likewise. * config/ia64/_floatditf.asm: Likewise. * config/ia64/t-fprules-softfp: Likewise. * config/ia64/t-softfp-compat: Likewise. * config/ia64/tf-signs.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144130 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog15
-rw-r--r--libgcc/Makefile.in4
-rw-r--r--libgcc/config.host2
-rw-r--r--libgcc/config/ia64/__divxf3.asm11
-rw-r--r--libgcc/config/ia64/_fixtfdi.asm11
-rw-r--r--libgcc/config/ia64/_fixunstfdi.asm11
-rw-r--r--libgcc/config/ia64/_floatditf.asm11
-rw-r--r--libgcc/config/ia64/t-fprules-softfp2
-rw-r--r--libgcc/config/ia64/t-softfp-compat7
-rw-r--r--libgcc/config/ia64/tf-signs.c62
10 files changed, 134 insertions, 2 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index ea7a9156196..402dbe185f3 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,18 @@
+2009-02-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config.host: Add ia64/t-fprules-softfp ia64/t-softfp-compat
+ to tmake_file for ia64*-*-linux*.
+
+ * Makefile.in (gen-hide-list): Ignore .*_compat and .*@.*.
+
+ * config/ia64/__divxf3.asm: New.
+ * config/ia64/_fixtfdi.asm: Likewise.
+ * config/ia64/_fixunstfdi.asm: Likewise.
+ * config/ia64/_floatditf.asm: Likewise.
+ * config/ia64/t-fprules-softfp: Likewise.
+ * config/ia64/t-softfp-compat: Likewise.
+ * config/ia64/tf-signs.c: Likewise.
+
2009-01-18 Ben Elliston <bje@au.ibm.com>
* config/i386/32/tf-signs.c (__copysigntf3, __fabstf2): Prototype.
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
index 5718a501830..c9c36d5fa16 100644
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -265,7 +265,9 @@ ASM_HIDDEN_OP = @asm_hidden_op@
define gen-hide-list
$(NM) -pg $< | \
- $(AWK) 'NF == 3 && $$2 !~ /^[UN]$$/ { print "\t$(ASM_HIDDEN_OP)", $$3 }' > $@T
+ $(AWK) 'NF == 3 && $$2 !~ /^[UN]$$/ && $$3 !~ /.*_compat/ \
+ && $$3 !~ /.*@.*/ \
+ { print "\t$(ASM_HIDDEN_OP)", $$3 }' > $@T
mv -f $@T $@
endef
else
diff --git a/libgcc/config.host b/libgcc/config.host
index 655ef953ce8..2225e679063 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -350,7 +350,7 @@ ia64*-*-freebsd*)
;;
ia64*-*-linux*)
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
- tmake_file="ia64/t-ia64"
+ tmake_file="ia64/t-ia64 ia64/t-fprules-softfp ia64/t-softfp-compat"
;;
ia64*-*-hpux*)
;;
diff --git a/libgcc/config/ia64/__divxf3.asm b/libgcc/config/ia64/__divxf3.asm
new file mode 100644
index 00000000000..f741bdaf9bc
--- /dev/null
+++ b/libgcc/config/ia64/__divxf3.asm
@@ -0,0 +1,11 @@
+#ifdef SHARED
+#define __divtf3 __divtf3_compat
+#endif
+
+#define L__divxf3
+#include "config/ia64/lib1funcs.asm"
+
+#ifdef SHARED
+#undef __divtf3
+.symver __divtf3_compat, __divtf3@GCC_3.0
+#endif
diff --git a/libgcc/config/ia64/_fixtfdi.asm b/libgcc/config/ia64/_fixtfdi.asm
new file mode 100644
index 00000000000..4d13c808c51
--- /dev/null
+++ b/libgcc/config/ia64/_fixtfdi.asm
@@ -0,0 +1,11 @@
+#ifdef SHARED
+#define __fixtfti __fixtfti_compat
+#endif
+
+#define L_fixtfdi
+#include "config/ia64/lib1funcs.asm"
+
+#ifdef SHARED
+#undef __fixtfti
+.symver __fixtfti_compat, __fixtfti@GCC_3.0
+#endif
diff --git a/libgcc/config/ia64/_fixunstfdi.asm b/libgcc/config/ia64/_fixunstfdi.asm
new file mode 100644
index 00000000000..b722d9e90dc
--- /dev/null
+++ b/libgcc/config/ia64/_fixunstfdi.asm
@@ -0,0 +1,11 @@
+#ifdef SHARED
+#define __fixunstfti __fixunstfti_compat
+#endif
+
+#define L_fixunstfdi
+#include "config/ia64/lib1funcs.asm"
+
+#ifdef SHARED
+#undef __fixunstfti
+.symver __fixunstfti_compat, __fixunstfti@GCC_3.0
+#endif
diff --git a/libgcc/config/ia64/_floatditf.asm b/libgcc/config/ia64/_floatditf.asm
new file mode 100644
index 00000000000..21d77028176
--- /dev/null
+++ b/libgcc/config/ia64/_floatditf.asm
@@ -0,0 +1,11 @@
+#ifdef SHARED
+#define __floattitf __floattitf_compat
+#endif
+
+#define L_floatditf
+#include "config/ia64/lib1funcs.asm"
+
+#ifdef SHARED
+#undef __floattitf
+.symver __floattitf_compat, __floattitf@GCC_3.0
+#endif
diff --git a/libgcc/config/ia64/t-fprules-softfp b/libgcc/config/ia64/t-fprules-softfp
new file mode 100644
index 00000000000..90acc376ec9
--- /dev/null
+++ b/libgcc/config/ia64/t-fprules-softfp
@@ -0,0 +1,2 @@
+# Provide fallbacks for __builtin_copysignq and __builtin_fabsq.
+LIB2ADD += $(srcdir)/config/ia64/tf-signs.c
diff --git a/libgcc/config/ia64/t-softfp-compat b/libgcc/config/ia64/t-softfp-compat
new file mode 100644
index 00000000000..d3dad68c48f
--- /dev/null
+++ b/libgcc/config/ia64/t-softfp-compat
@@ -0,0 +1,7 @@
+# Filter out the following TImode functions and provide backward binary
+# compatibility.
+# Replace __dvxf3 _fixtfdi _fixunstfdi _floatditf
+libgcc1-tf-functions = __divxf3 _fixtfdi _fixunstfdi _floatditf
+LIB1ASMFUNCS := $(filter-out $(libgcc1-tf-functions), $(LIB1ASMFUNCS))
+libgcc1-tf-compats = $(addsuffix .asm, $(libgcc1-tf-functions))
+LIB2ADD += $(addprefix $(srcdir)/config/ia64/, $(libgcc1-tf-compats))
diff --git a/libgcc/config/ia64/tf-signs.c b/libgcc/config/ia64/tf-signs.c
new file mode 100644
index 00000000000..9b42b9041f6
--- /dev/null
+++ b/libgcc/config/ia64/tf-signs.c
@@ -0,0 +1,62 @@
+/* Copyright (C) 2008 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 2, or (at your option) any later
+version.
+
+In addition to the permissions in the GNU General Public License, the
+Free Software Foundation gives you unlimited permission to link the
+compiled version of this file into combinations with other programs,
+and to distribute those combinations without any restriction coming
+from the use of this file. (The General Public License restrictions
+do apply in other respects; for example, they cover modification of
+the file, and distribution when not linked into a combine
+executable.)
+
+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.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING. If not, write to the Free
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA. */
+
+union _FP_UNION_Q
+{
+ __float128 flt;
+ struct
+ {
+ unsigned long frac1 : 64;
+ unsigned long frac0 : 48;
+ unsigned exp : 15;
+ unsigned sign : 1;
+ } bits __attribute__((packed));
+};
+
+__float128
+__copysigntf3 (__float128 a, __float128 b)
+{
+ union _FP_UNION_Q A, B;
+
+ A.flt = a;
+ B.flt = b;
+ A.bits.sign = B.bits.sign;
+
+ return A.flt;
+}
+
+__float128
+__fabstf2 (__float128 a)
+{
+ union _FP_UNION_Q A;
+
+ A.flt = a;
+ A.bits.sign = 0;
+
+ return A.flt;
+}