quadlib.c (_U_Qfcnvfxt_quad_to_usgl): New function.
authorWill Cohen <wcohen@redhat.com>
Wed, 21 Feb 2001 05:05:25 +0000 (05:05 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 21 Feb 2001 05:05:25 +0000 (22:05 -0700)
        * config/pa/quadlib.c (_U_Qfcnvfxt_quad_to_usgl): New function.
        * config/pa/long_double.h (FIXUNS_TRUNCTFSI2_LIBCALL): Added.
        (INIT_TARGET_OPTABS): Use FIXUNS_TRUNCTFSI2_LIBCALL for
        fixunstfsi_libfunc.

From-SVN: r39937

gcc/ChangeLog
gcc/config/pa/long_double.h
gcc/config/pa/quadlib.c

index e70bd8373b1afda03f1b189ebd9ed10cddeff763..af11506d31163efba779fa272bf3db706cf18176 100644 (file)
@@ -1,3 +1,10 @@
+2001-02-20  Will Cohen  <wcohen@redhat.com>
+       * config/pa/quadlib.c (_U_Qfcnvfxt_quad_to_usgl): New function.
+       * config/pa/long_double.h (FIXUNS_TRUNCTFSI2_LIBCALL): Added.
+       (INIT_TARGET_OPTABS): Use FIXUNS_TRUNCTFSI2_LIBCALL for
+       fixunstfsi_libfunc.
+
 2001-02-20  Stan Shebs  <shebs@apple.com>
 
        * config/rs6000/rs6000.c (output_cbranch): Output branches
index 92d03761e0f3f48d8c94ed2fdcb9799503fc592a..e65f15f9345298c26444e5b985d6c977f6ae3e04 100644 (file)
@@ -52,6 +52,7 @@ do { long value[4];                                                     \
    we can massage its return value for PA64.  */
 #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 FIX_TRUNCTFDI2_LIBCALL "_U_Qfcnvfxt_quad_to_dbl"
 #define EQTF2_LIBCALL "_U_Qfeq"
 #define NETF2_LIBCALL "_U_Qfne"
@@ -89,7 +90,7 @@ do { long value[4];                                                     \
     floatditf_libfunc = gen_rtx_SYMBOL_REF (Pmode, FLOATDITF2_LIBCALL);  \
     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, FIX_TRUNCTFSI2_LIBCALL);  \
+    fixunstfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIXUNS_TRUNCTFSI2_LIBCALL);\
     fixunstfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFDI2_LIBCALL);  \
     eqtf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EQTF2_LIBCALL);         \
     netf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, NETF2_LIBCALL);         \
index 598e0c297cb3409c93665c63411d6188e656f366..cdf3ea989db236bff0dd7d0d46fe41c6722fa2d1 100644 (file)
@@ -92,3 +92,12 @@ __U_Qfcnvfxt_quad_to_sgl (long double a)
   return _U_Qfcnvfxt_quad_to_sgl (a) >> 32;
 }
 #endif
+
+/* HP only has signed conversion in library, so need to synthesize an
+   unsigned version */
+unsigned int
+_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);
+}