[RFA] Fix float argument passing in inferior function calls for ppc64

Thiago Jung Bauermann bauerman@br.ibm.com
Tue Jan 15 20:34:00 GMT 2008


On Tue, 2008-01-15 at 15:39 -0200, Thiago Jung Bauermann wrote:
> > Is the first word used for anything in the new ABI?  If not, you could
> > support both ABIs by copying the value into both the first and the
> > second word.
> 
> Great idea. I will resend the patch using that approach then.

What about this patch?

> > > I didn't touch the code which writes the float to a general register in
> > > the first word because I'm not sure how to test it. It is probably
> > > related to soft-float, I guess.
> > 
> > Actually, it may be related to varargs.  Or perhaps it is a leftover
> > from the 32-bit ABI code that was copied.
> 
> I'll play with varargs and see if I can trigger that code and create a
> test for it.

I tried it, but turns out it's not possible to pass a 32-bit float to a
variadic function, you need to explicitly promote it to double first. So
if that if code writing to a general register is not used by soft-float,
then it may be dead code as you suggested.
-- 
[]'s
Thiago Jung Bauermann
Software Engineer
IBM Linux Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ppc64-abi-float-fix.diff
Type: text/x-patch
Size: 3276 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20080115/ee0f5fa9/attachment.bin>


More information about the Gdb-patches mailing list