This is the mail archive of the
mailing list for the GDB project.
Re: [RFC] Linux-specific ppc32 ABI
On Fri, 2008-01-11 at 19:25 -0200, Luis Machado wrote:
> > > > How about an extra flag inside the gdbarch_tdep structure that
> > > > you'll be using inside the push dummy call? It would be a shame
> > > > duplicate this function when most of it is common.
> Actually, we won't need to go through the flag. I've checked and the
> PPC/Linux ABI conforms with the PPC/SysV ABI regarding Calling Sequences
> and the Stack layout.
> The SysV ABI says we should promote exceeding float parameters (the ones
> that should go to the stack) to double, and store then with 8 bytes
> alignment in the stack.
> GCC (XLC as well) doesn't promote floats to doubles and does not align
> them to 8 bytes in the stack. Actually, it just aligns the prototyped
> float parameters to 4 bytes in the stack.
> This is something that needs to be improved in the ABI text.
> The patch follows, with a minor change in the ABI handling for PPC32 and
> a testcase Thiago wrote to verify the problem.
It would be nice if someone could test this patch in other systems which
use the SysV ppc32 ABI, to see if they actually implement what is in the
ABI specification or if they also do what Linux actually does. If the
former, this patch could go in. If the latter, we could use the
suggested flag in gdbarch_tdep to restrict this fix only to Linux.
Thiago Jung Bauermann
IBM Linux Technology Center