Subject: Re: -mieee option
To: Todd Vierling <tv@pobox.com>
From: Chris G. Demetriou <cgd@netbsd.org>
List: current-users
Date: 01/14/1999 09:27:37
Todd Vierling <tv@pobox.com> writes:
> : Does "-mieee" option not work for the egcs on NetBSD Alpha?
> 
> Actually, it's a no-op; the float format is already IEEE.

That reply would make sense, but for the fact that the "-mfloat-vax"
and "-mfloat-ieee" flags seem to control the floating point format.

-mieee seems to try to make gcc generate code that, in conjunction
with the hardware that is in the CPU and software that should be in
the OS and/or library, produces mostly IEEE-conformant results.

to excerpt from alpha.h:

    {"ieee-conformant", MASK_IEEE_CONFORMANT},  \
    {"ieee", MASK_IEEE|MASK_IEEE_CONFORMANT},   \
    {"ieee-with-inexact", MASK_IEEE_WITH_INEXACT|MASK_IEEE_CONFORMANT}, \

    {"float-vax", MASK_FLOAT_VAX},              \
    {"float-ieee", -MASK_FLOAT_VAX},            \

The definitinos of those flags:

/* This means that we should mark procedures as IEEE conformant. */

#define MASK_IEEE_CONFORMANT 8
#define TARGET_IEEE_CONFORMANT  (target_flags & MASK_IEEE_CONFORMANT)

/* This means we should be IEEE-compliant except for inexact.  */

#define MASK_IEEE       16
#define TARGET_IEEE     (target_flags & MASK_IEEE)

/* This means we should be fully IEEE-compliant.  */

#define MASK_IEEE_WITH_INEXACT 32
#define TARGET_IEEE_WITH_INEXACT (target_flags & MASK_IEEE_WITH_INEXACT)


/* This means we handle floating points in VAX F- (float)
   or G- (double) Format.  */
   
#define MASK_FLOAT_VAX 512
#define TARGET_FLOAT_VAX (target_flags & MASK_FLOAT_VAX)


Indeed, NetBSD/alpha does not support IEEE-conformant arithmetic.
Having dicussed this with the port maintainer on occasion, i don't
think that he's ever tried to make it DTRT; he's proclaimed a strong
dislike for IEEE math.  (I never tried when i was developing the code,
because i basically have no clue whatsoever about floating point, and
never had the time to learn.  8-)


cgd
-- 
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.