[kaffe] HAVE_move_float_const

Gerlando Falauto iurly@writeme.com
Mon Jun 30 04:25:01 2003


Hi Kiyo,

On Mon, 30 Jun 2003, Kiyo Inaba wrote:

> Hi Gerlando,
>
> >void _slot_slot_fconst(SlotInfo*, SlotInfo*, double, ifunc, int)
> >shouldn't there be a float instead?
>
> I am hesitate to reply for this, but if old story is still true, any
> c function arguments are converted to double from float. See, pp.137
> of "C a reference manual".

Don't have that manual at hand, but I think that very much depends on the
compiler and/or the runtime architecture. I can assure you my (old, ugly,
buggy, horrible, non-standard, fp-less, whatever) compiler and
architecture do not make such a conversion. If a parameter is a float,
it's passed in one register (or memory slot), if it's a double, it takes
two registers/slots.

And if there isn't any particular reason beyond my sight why there has to
be a double in there, I would keep it consistent and make it a float.
Might save you (or someone else) time in the future.

cheers,
Gerlando