gcc-2.7.1 patch available

David Mosberger-Tang (davidm@AZStarNet.com)
Tue, 19 Dec 1995 15:19:43 -0700


A patch for gcc-2.7.1 is now available at:

ftp://ftp.azstarnet.com/pub/linux/axp/misc/axpsrc-gcc-2.7.1.patch.gz

It contains everything that's necessary to get gcc running under
Linux/Alpha. In addition, gcc now supports three new options:

-mieee Request the generation of (almost) fully compliant IEEE
math. In particular, non-finite numbers are supported.

-mieee-with-inexact
Like -mieee, but in addition the IEEE INEXACT flag is
supported.

-mfp-rounding-mode=[n|m|c|d]
Generate code that uses a particular IEEE rounding mode.
Supported rounding modes are 'n' (normal, round towards
nearest), 'c' (chopped, round towards zero), 'm'
(round towards minus-infinity), and 'd' (dynamic rounding
mode). In the last case, the rounding mode is controlled
by two bits in the floating-point control register (FPCR,
see any Alpha architecture manual). Future releases of
libc initialize the FPCR such that, by default, dynamic
rounding mode will use round towards plus infinity.
If you don't specify this option, round towards nearest
is used, as usual.

Notice that rounding modes 'm' and 'd' with round towards plus
infinity are going to be slow on EV4 or EV45 chips as they don't
support these modes in hardware. In a similar vein, gcc currently
generates *safe* IEEE code, but the quality of the emitted code is
rather poor (that's all my fault, not gcc's).

Finally, in order to support -mieee etc, it is necessary to have a
Linux kernel that has the math emulator built in (see my recent kernel
patch announcment). Similarly, there used to be a bug in "gas" that
prevented IEEE math code from compiling properly. Thus, you'll need
binutils-2.6axp or later as well.

Enjoy,
--david