diff options
author | Steve Ellcey <sje@cup.hp.com> | 2002-07-16 19:39:27 +0000 |
---|---|---|
committer | Steve Ellcey <sje@gcc.gnu.org> | 2002-07-16 19:39:27 +0000 |
commit | 6acb6d3ef0fc9d39e259ff9f8ee2b330dec965d9 (patch) | |
tree | 3f1e7800e1902256ac38a84963a25cbb06fa3a28 | |
parent | 5d7c281902771a6de24a387f3c759e966e3be8ad (diff) | |
download | gcc-6acb6d3ef0fc9d39e259ff9f8ee2b330dec965d9.zip gcc-6acb6d3ef0fc9d39e259ff9f8ee2b330dec965d9.tar.gz gcc-6acb6d3ef0fc9d39e259ff9f8ee2b330dec965d9.tar.bz2 |
long_double.h (FIXUNS_TRUNCTFDI2_LIBCALL): New define.
* gcc/config/pa/long_double.h (FIXUNS_TRUNCTFDI2_LIBCALL): New define.
(fixunstfdi_libfunc): Change to use FIXUNS_TRUNCTFDI2_LIBCALL.
* gcc/config/pa/quadlib.c (_U_Qfcnvfxt_quad_to_udbl): New function.
From-SVN: r55490
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/pa/long_double.h | 5 | ||||
-rw-r--r-- | gcc/config/pa/quadlib.c | 19 |
3 files changed, 26 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eb97ffc..8087377 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-07-16 Steve Ellcey <sje@cup.hp.com> + * gcc/config/pa/long_double.h (FIXUNS_TRUNCTFDI2_LIBCALL): New define. + (fixunstfdi_libfunc): Change to use FIXUNS_TRUNCTFDI2_LIBCALL. + * gcc/config/pa/quadlib.c (_U_Qfcnvfxt_quad_to_udbl): New function. + 2002-07-16 Ian Dall <ian@sibyl.beware.dropbear.id.au> * doc/invoke.texi (NS32K Options): Document -mieee-compare option diff --git a/gcc/config/pa/long_double.h b/gcc/config/pa/long_double.h index 9d21eea..5d2c619 100644 --- a/gcc/config/pa/long_double.h +++ b/gcc/config/pa/long_double.h @@ -1,5 +1,5 @@ /* Definitions of long double support for GNU compiler. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. @@ -42,6 +42,7 @@ Boston, MA 02111-1307, USA. */ #define FIX_TRUNCTFSI2_LIBCALL \ (TARGET_64BIT ? "__U_Qfcnvfxt_quad_to_sgl" : "_U_Qfcnvfxt_quad_to_sgl") #define FIXUNS_TRUNCTFSI2_LIBCALL "_U_Qfcnvfxt_quad_to_usgl" +#define FIXUNS_TRUNCTFDI2_LIBCALL "_U_Qfcnvfxt_quad_to_udbl" #define FIX_TRUNCTFDI2_LIBCALL "_U_Qfcnvfxt_quad_to_dbl" #define EQTF2_LIBCALL "_U_Qfeq" #define NETF2_LIBCALL "_U_Qfne" @@ -80,7 +81,7 @@ Boston, MA 02111-1307, USA. */ fixtfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFSI2_LIBCALL);\ fixtfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFDI2_LIBCALL);\ fixunstfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIXUNS_TRUNCTFSI2_LIBCALL);\ - fixunstfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFDI2_LIBCALL); \ + fixunstfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIXUNS_TRUNCTFDI2_LIBCALL);\ eqtf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EQTF2_LIBCALL); \ netf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, NETF2_LIBCALL); \ gttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GTTF2_LIBCALL); \ diff --git a/gcc/config/pa/quadlib.c b/gcc/config/pa/quadlib.c index 358b9b4..05d632a 100644 --- a/gcc/config/pa/quadlib.c +++ b/gcc/config/pa/quadlib.c @@ -1,5 +1,5 @@ /* Subroutines for long double support. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. @@ -42,6 +42,7 @@ long double _U_Qfneg (long double); int __U_Qfcnvfxt_quad_to_sgl (long double); #endif unsigned int _U_Qfcnvfxt_quad_to_usgl(long double); +unsigned long long _U_Qfcnvfxt_quad_to_udbl(long double); int _U_Qfeq (long double a, long double b) @@ -114,3 +115,19 @@ _U_Qfcnvfxt_quad_to_usgl(long double a) extern long long _U_Qfcnvfxt_quad_to_dbl (long double a); return (unsigned int) _U_Qfcnvfxt_quad_to_dbl (a); } + +/* HP only has signed conversion in library, so need to synthesize an + unsigned version */ +typedef union { + long long unsigned int u[2]; + long double d[1]; +} quad_type; + +unsigned long long +_U_Qfcnvfxt_quad_to_udbl(long double a) +{ + extern quad_type _U_Qfcnvfxt_quad_to_quad (long double a); + quad_type u; + u = _U_Qfcnvfxt_quad_to_quad(a); + return u.u[1]; +} |