RFC: backend support for __float80 and __float128 on IA64

Jim Wilson wilson@specifixinc.com
Fri Sep 26 08:49:00 GMT 2003


Zack Weinberg wrote:
> This patch arranges for the ia64 back end and the optimizers to
> support simultaneous use of 80-bit (XFmode) and 128-bit (TFmode)
> floating point types.  The changes to machine-independent code are

I didn't give any good examples for the unaligned access problem, so I 
took another look at this.

gcc.c-torture/execute/20020413-1.  It has only one long double local 
variable.  I get 4 unaligned accesses when I compile it with -O0.

First of all, there is a XFmode constant pool entry which is 12 bytes 
long and has alignment 4.  This can't work.  It needs to be 16 bytes 
long with alignment 16.

The second problem is with alignment of stack slots.  We have two local 
variables.  A long double which is put at offset 0, and a long which is 
put at offset 16.  The next stack slot gets used for a const_double 
which gets forced to the stack.  It gets stored at offset 24, 
immediately after the long.  This is not OK, as we need 16-byte 
alignment for a long double constant in memory.

Both of these happen because GET_MODE_SIZE (XFmode) == 12.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



More information about the Gcc-patches mailing list