[fpc-pascal]Default calling convention

Florian Klaempfl fpk at gmx.org
Fri Jul 2 13:54:09 CEST 2004


Thomas Schatzl wrote:
> 
> In this case
> 
>   procedure nx_fill(P: PLongword; Count: Longint; Value: Longword);
>   assembler;
>   asm
>           pushl   %edi
>           movl    P,%edi  // edi <- P
>           movl    Value,%eax  // eax <- Value
>           movl    Count,%ecx  // ecx <- Count
>           rep
>           stosl
>           popl    %edi
>   end;
> 
> works both as embedded and non-embedded assembler procedure because the 
> order of assignments is ok in both cases.
> 
> Btw, there's already a method in the system unit which does the same 
> thing as your routine: filldword()...

... and with better instruction selection ;)




More information about the fpc-pascal mailing list