[fpc-devel] Bug with R+ and assembler functionsHi,
peter at freepascal.org
Thu Nov 3 12:54:44 CET 2005
> Jonas Maebe wrote:
>> No, in eax. "movl %eax, %esi" means "move the contents of eax into esi".
>> This is AT&T assembler notation, not Intel.
> ops, i worked 10 years with intel assembler style, so i mixed this. sorry.
>> No. At least one problem is that in your assembler function, you use esi
>> and ebx without saving/restoring them. ebx, esi and edi are callee-saved
>> registers in the new default calling convention of FPC 2.0 (register
>> calling), just like in C/C++.
> Is there any docmentation about this? Must the eax register be saved,
> too? I thouht
> end ['EAX', 'EBX', 'ESI'];
> Is enough and tells the compiler, that these registers are changeing. In
> the current documentation i could not found information, about saving
That works only for assembler blocks inside functions. For functions
itself the standard calling conventions need to be followed. For i386
these are the same as delphi.
More information about the fpc-devel