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: i370 port - 3.4.6 to 4.4 upgrade attempt


Paul Edwards wrote:

> > I can see one significant change: the GCC middle-end now no
> > longer supports base-16 floating point at all.  The old i370
> > port was the only user of this feature, and some time after
> > the port was removed, the middle-end support was removed as
> > well in order to simplify floating-point handling code.
> > 
> > The s390 port uses IEEE float instead of hex float throughout,
> > so it is not affected by this change.
> 
> I found that if I didn't define anything for this at all, it still worked.
> I'm not sure when the lack of "hex float" will actually start
> affecting me.  I got it to generate code like:
> 
> LD 0,=D'5.5999999...e+0'
> 
> which will only require minor modifications to be acceptable to 
> HLASM.  And in fact, that's basically the same code that was
> being generated with GCC 3.4.6 anyway.

Well, there's two main points where lack of hex float support
in the compiler may cause problems.  The one is if you were
to rely on the compiler to convert float constants into the
binary representation.  But from your sample above it seems
that you're instead asking the assembler to do this, so it
should not be an issue.

The second problem is that whenever the compiler performs
compile-time computations of floating point values, it will
use the IEEE semantics, which means it might arrive at 
different results than what target code running on the
mainframe would.  This can manifest in the same source code
leading to different results when compiled with optimizations
as compared to without optimizations, for example.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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