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]

Re: exotic floating point formats test


On Fri, Mar 09, 2001 at 05:34:54PM -0500, David Edelsohn wrote:
> >>>>> "Zack Weinberg" writes:
> 
> Zack> I'd appreciate knowing what this program prints on a VAX (or an Alpha
> Zack> asked to use VAX floating point), an IBM mainframe target, and a C4x
> Zack> processor.  For reference:
> 
> 	Linux for S/390 prints:
> 
> 3.25098346789696250880e+01      40404142 43444546       @@AB CDEF

big-endian IEEE - that matches i370/xm-linux.h; good.

> 	The C compiler on OS/390 USS (aka z/OS) prints:
> 
> 3.25098346789696300000e+01      42208284 86888a8c       ..bd fh..

Aha, this is what GCC means by IBM_FLOAT_FORMAT.  Interesting how the
latter six bytes have all been multiplied by two (rounding?) - and
then the EBCDIC conversion changes the letter values around; 0x82
isn't ascii anything...

If you have time and patience, could you see if you can come up with a
floating-point literal that translates to eight printable characters?
(*not* @@ABCDEF) This is eventually going to wind up as autoconf doing
greps on an object file, and I'd really rather not deal with
unprintable bytes in the middle of the pattern.  Finding one is not
hard if you have a compiler that supports C99 hexadecimal float
literals (I need it in decimal at the end, though).

zw


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