diff options
author | sje <sje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-16 19:39:27 +0000 |
---|---|---|
committer | sje <sje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-16 19:39:27 +0000 |
commit | d7bbff3ee3bc6fca09c3cdd87834f7dfc7cefa4c (patch) | |
tree | 3f1e7800e1902256ac38a84963a25cbb06fa3a28 /gcc/config/pa/quadlib.c | |
parent | ee92ab068263c20421f3b3b131a02673eeb66394 (diff) | |
download | gcc-d7bbff3ee3bc6fca09c3cdd87834f7dfc7cefa4c.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55490 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/pa/quadlib.c')
-rw-r--r-- | gcc/config/pa/quadlib.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/config/pa/quadlib.c b/gcc/config/pa/quadlib.c index 358b9b448bb..05d632a25c6 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]; +} |