This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
cross-compiled floating point constants broken
- To: Jim Wilson <wilson at cygnus dot com>
- Subject: cross-compiled floating point constants broken
- From: Stephen L Moshier <moshier at mediaone dot net>
- Date: Fri, 29 Jan 1999 15:25:45 -0500 (EST)
- cc: egcs-bugs at cygnus dot com
- Reply-To: moshier at mediaone dot net
> Mon Dec 14 16:23:27 1998 Jim Wilson <wilson@cygnus.com>
>
> * real.c (endian): Disable last change unless
> HOST_BITS_PER_WIDE_INT is greater than 32.
>
> Thu Dec 10 16:02:06 1998 Jim Wilson <wilson@cygnus.com>
> ...
> * real.c (endian): Sign-extend 32 bit output values on a 64 bit
> host.
The above change has broken cross compilations from 64-bit to 32-bit
machines. It generates assembly language output that cannot be
assembled by many, if not most, 32-bit assemblers. For example,
the source line
long double y = -1.3L;
compiles to
_y:
.long 0xffffffffbfff0000,0xffffffffa6666666,0x66666666
using a current egcs alpha-to-68k cross compiler. The 32-bit native 68k
assembler chokes on values with so many hex digits as
0xffffffffbfff0000 .
I believe that gen_lowpart_common is the only place in gcc that pays
any attention to the output from `endian', other than just to print it.
If you want those integer values sign extended, look for
REAL_VALUE_FROM_TARGET_SINGLE, REAL_VALUE_FROM_TARGET_DOUBLE in
emit-rtl.c and see if doing the sign extensions there doesn't solve
your problem. If you still need something that does the sign
extension, we should write a new function that doesn't get used by the
printf-sensitive ASM_OUTPUT_DOUBLE etc. tm.h macros.