----- Reply to message ----- Subject: Re: [fpc-devel] Successful implementation of inline supportforpureassembler routines on x86 Date: 2019. gada 18. marts 00:28:10 From: J. Gareth Moreton <gar...@moreton-family.com> To: FPC developers' list <fpc-devel@lists.freepascal.org>
> To use the integer clamp function as an example (if x < 0 then x := 0): > { Microsoft x64 calling convention... X is in ECX } > function ClampInt(X: LongInt): LongInt; assembler; nostackframe; inline; > asm > XOR EAX, EAX > TEST ECX, ECX > CMOVG EAX, ECX > end; try code: y:=0; if x < 0 then x:=y; _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel