This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Floating Point Representation in libgcc (is IEEE?)


On Tue, 2010-06-15 at 13:28 +0100, Paulo J. Matos wrote:
> Hi all,
> 
> I am implementing some function for conversion between modes (QI ->
> HF, SF -> HI, etc). For this it would be useful to know the floating
> point representation using in libgcc. However, I can't find any
> description of it anywhere. Is it using IEEE floating point
> representation?


I might be very wrong (back-ends & floating points are things I don't
really know much about), but I would imagine that libgcc implement the
minimal runtime code -used to run your applications compiled by GCC-
useful for floating point. If this is true, then libgcc implement the
floating point number as provided, supported, or suggested by the target
hardware & system [which is different on Vax & on x86, for instance].

Within the GCC compiler, floating points are represented by the struct
real_value defined in gcc/real.h, and not by the native double numbers
of the host system (the one running GCC). This is probably needed to
permit bizarre GCC uses like cross-compiling from an IBM Serie Z (the
successor to IBM 370 etc.) to e.g. a Dec Alpha.

Of course, most GCC users probably run it on some x86 under Linux or
Cygwin (and perhaps cross-compile for an ARM target), but GCC is
designed to support very strange hosts & targets, in particular systems
with non IEEE 754 floating point numbers.

Cheers.
-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]