[Pythonmac-SIG] calldll: float values?

Jack Jansen jack@oratrix.nl
Mon, 29 Nov 1999 12:36:59 +0100


> At 10:49 -0800 11/26/99, John W Baxter wrote:
> >At 16:52 +0100 11/26/99, Jack Jansen wrote:
> >>I didn't do floats for calldll because the PPC calling convention for
> >>floating
> >>point arguments is different from that for integer arguments. If I remember
> >>correctly (but it's been some time) the float arguments are passed in
> >>floating
> >>registers in stead of in int registers.
> >
> >Almost:  float registers in addition to int ones (inherited from IBM and
> >POWER, and I suppose IBM had a reason...it seems pretty strange to this
> >poor old country programmer).  --John
> 
> Actually, IBM did have a reason:  K&R C, where the compiler can't tell
> what's going on.  At least, I think that was it.

And printf again: the scheme given here means that all arguments, including 
floats, are passed in integer registers, so printf() can obtain any value from 
an int parameter.

Unfortunately this doesn't solve our problem: how do we pass floats to 
routines via calldll. I would like to refrain from writing assembler (is 
anyone here familiar with PowerPC assembler?), but I can't see a way to trick 
this in C. All ideas are welcome...
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm