[fpc-pascal] CPU registers and function calls, unclear explanation in the docs
Jonas Maebe
jonas.maebe at elis.ugent.be
Sat Dec 17 01:59:46 CET 2011
On 17 Dec 2011, at 01:46, Bernd wrote:
> Is there maybe any other document somewhere that describes what
> *exactly* is expected by the compiler to happen with the registers
> during a function call or maybe somebody can show me where in the FPC
> sources I have to look to see for myself what exactly is going on?
On i386 with the "register" calling convention,
* eax, ecx and edx are volatile (= caller can overwrite them without saving them)
* ebx, esi, edi, ebp and esp and non-volatile (= caller must save/restore them if it overwrites them)
On other platforms (including x86-64), all calling conventions follow the official platform ABI as far as volatile/non-volatile registers are concerned.
Jonas
More information about the fpc-pascal
mailing list