This is the mail archive of the
mailing list for the GCC project.
Re: Irix6 long doubles implemented wrong? (27_io/ostream_inserter_arith)
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: aoliva at redhat dot com
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, oldham at codesourcery dot com, ro at TechFak dot Uni-Bielefeld dot DE, rth at redhat dot com
- Date: Mon, 3 Feb 2003 10:18:44 -0500 (EST)
- Subject: Re: Irix6 long doubles implemented wrong? (27_io/ostream_inserter_arith)
- References: <email@example.com> <200301261700.MAA15626@caip.rutgers.edu> <200301270502.AAA04637@caip.rutgers.edu> <firstname.lastname@example.org> <200301280219.VAA24441@caip.rutgers.edu> <email@example.com> <200301281710.MAA00143@caip.rutgers.edu> <200301281731.MAA04631@caip.rutgers.edu> <15926.49701.3!59482.666471@xayide.TechFak.Uni-Bielefeld.DE> <200301290132.UAA12941@caip.rutgers.edu> <20030129072657.GB20774@redhat.com> <200301300207.VAA11232@caip.rutgers.edu> <firstname.lastname@example.org>
> From: Alexandre Oliva <email@example.com>
> On Jan 30, 2003, "Kaveh R. Ghazi" <firstname.lastname@example.org> wrote:
> >> From: Richard Henderson <email@example.com>
> >> >
> >> > unordtf2_libfunc
> >> This one may be a problem. We don't know what the actual
> >> return values are for the comparison functions. By rights
> >> it ought to be a tri-state value off of EQ or NE.
> > I'm not sure what you mean. Are you saying that all the gcc
> > comparison functions are tri-state (-1,0,1) or just the unord one?
> There is L_compare_[sdt]f, that is tri-state, but none of the others
> are, it's just that you sometimes can't distinguish unord from false
> on the others, such as those of gofast. If there's no equivalent to
> the tri-state compare on IRIX, just set the corresponding entry in
> optabs NULL, and GCC will find other ways to implement it, using eq,
> ne, gt, ge, lt and le.
Sorry, I'm seeing something different. First looking at fp-bit.c, all
of the comparison ops (e.g. _eq_f2) call __fpcmp_parts which returns a
tri-state value. I.e. it's not just L_compare_[sdt]f.
Second, looking at prepare_float_lib_cmp in optabs.c if the optabs are
NULL, it'll only swap GE <-> LE and GT <-> LT in both directions. So
if at least one or the other isn't defined how will it work?
Anyway, I just found FLOAT_LIB_COMPARE_RETURNS_BOOL in tm.texi which,
judging by the name, appears to be exactly what I need. :-)
Kaveh R. Ghazi firstname.lastname@example.org