[fpc-devel] Generated code of constant parameters of double type

Jonas Maebe jonas.maebe at elis.ugent.be
Sun Nov 16 14:58:53 CET 2008


On 16 Nov 2008, at 14:52, Florian Klaempfl wrote:

> Luiz Americo Pereira Camara schrieb:
>> Maybe the documentation (http://www.freepascal.org/docs-html/ref/refsu50.html#x126-13300011.4.4 
>> ) can be modified to clarify this since the statement:
>> "A constant argument is passed by reference if its size is larger  
>> than a pointer."
>> leads to the conclusion that double types (8 bytes) would be passed  
>> as reference in 32bit code.
>
> Well, the bigger problem is that this is target dependent.

And calling convention dependent. In most cases, how exactly constant  
and value parameters are handled by the compiler is a private  
implementation detail. You cannot count on how it is exactly  
implemented.


Jonas



More information about the fpc-devel mailing list