[fpc-devel] Registers allocation technique
Sven Barth
pascaldragon at googlemail.com
Tue Sep 30 21:34:15 CEST 2014
On 30.09.2014 18:37, Lag Programming wrote:
> 1) "Unless a function calls another function, the function result
> register will always be in rax. Calling for inlined functions doesn't
> change this behaviour as it's not a real function call."
RAX will only then be used for the function result when it is really
needed (e.g. the last assignment in a function). Before that the
compiler might reuse RAX as it pleases.
Please note that a function result might also be returned by memory
(managed types and large records), by SSE register (floating point
values) or in RAX AND RDX (records of which the size is less or equal to
16 Byte).
Regards,
Sven
More information about the fpc-devel
mailing list