new macro STARTING_FRAME_PHASE: alignment

Aldy Hernandez aldyh@redhat.com
Sat Jan 19 18:17:00 GMT 2002


On Sat, Jan 19, 2002 at 05:21:53PM -0500, David Edelsohn wrote:
> 	Excuse me, but there are more targets than Darwin and Altivec!
> 
> 	Where is the AIX stack aligned to 16 bytes?

the issue is not exactly, what is aix aligned to, but how much aix
is off from alignment when it starts the frame.

but you may be right it seems aix might have been adversely affected.  my
apologies.

from the definition of STACK_BOUNDARY, it seems AIX is 64 byte aligned.
so i tried this to see how much the frame is off by:

main()
{
        int foo2[24] __attribute__((aligned(16))) ;

	printf ("%ul\n", (unsigned long)foo2 % 8);
}

in my AIX system with gcc2.9, it prints 0, which means the AIX frame
is not out of phase with alignment.  whoops.  can you verify that the
current gcc is not out of phase?

if it isn't, then we'll have to change the macro to:

#define STARTING_FRAME_PHASE (TARGET_32BIT && !TARGET_AIX ? 8 : 0)

(i can provide a patch if you want me)

can you think of another variant that might *not* be out of phase (as 
darwin and linux were?).

sorry about that, i saw darwin and linux ppc out of phase, i assumed it
was a ppc anomaly.

ps. my patch probably didn't break anything because it added 8bytes (64bits)
so the aix frame would still be aligned ;-)

aldy



More information about the Gcc-patches mailing list