This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch for fp-bit defect wrt mips
- To: gcc-patches at gcc dot gnu dot org
- Subject: Patch for fp-bit defect wrt mips
- From: Jason Eckhardt <jle at cygnus dot com>
- Date: Wed, 5 Jul 2000 20:14:50 -0700 (PDT)
A fp-bit.c defect will cause link failures on mips toolchains that use
unordered comparisons.
For mips:
1. US_SOFTWARE_GOFAST is always enabled.
2. Some toolchains will need __unorddf2 and __unordsf2 in libgcc for
unordered comparisons.
3. When US_SOFTWARE_GOFAST is enabled, _unord_f2 is not allowed to be built
from fp-bit.c.
4. Hence, unresolved __unord{s,d}f2 symbols result.
It seems that GOFAST and unordered support are currently not compatible.
Apparently, mips is the only platform where this is an issue.
* config/fp-bit.c (_unord_f2): Do not conditionally build this
function based on US_SOFTWARE_GOFAST.
(#ifdef US_SOFTWARE_GOFAST): Add definitions of __unord{s,d}f2.
Index: fp-bit.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/config/fp-bit.c,v
retrieving revision 1.64
diff -c -3 -p -r1.64 fp-bit.c
*** fp-bit.c 2000/06/17 18:35:09 1.64
--- fp-bit.c 2000/07/01 02:23:54
*************** typedef unsigned int UDItype __attribute
*** 247,252 ****
--- 247,253 ----
# define negate __negsf2
# define sf_to_df fptodp
# define dptofp dptofp
+ # define _unord_f2 __unordsf2
#else
# define add dpadd
# define sub dpsub
*************** typedef unsigned int UDItype __attribute
*** 258,263 ****
--- 259,265 ----
# define float_to_usi dptoul
# define negate __negdf2
# define df_to_sf dptofp
+ # define _unord_f2 __unorddf2
#endif
#else
# ifdef FLOAT
*************** _le_f2 (FLO_type arg_a, FLO_type arg_b)
*** 1401,1406 ****
--- 1403,1410 ----
}
#endif
+ #endif /* ! US_SOFTWARE_GOFAST */
+
#if defined(L_unord_sf) || defined(L_unord_df)
CMPtype
_unord_f2 (FLO_type arg_a, FLO_type arg_b)
*************** _unord_f2 (FLO_type arg_a, FLO_type arg_
*** 1418,1425 ****
return (isnan (&a) || isnan (&b));
}
#endif
-
- #endif /* ! US_SOFTWARE_GOFAST */
#if defined(L_si_to_sf) || defined(L_si_to_df)
FLO_type
--- 1422,1427 ----