J. Gareth Moreton <gar...@moreton-family.com> schrieb am Fr., 15. März 2019, 12:33:
> P.S. Though this feature can be used for implementing intrinsics, it is > not a direct replacement for them because instructions like SHUFPS cannot > be flexibly encoded due to its immediate operand (i.e. it has to be a raw > number... it can't take its value from a parameter). > That could maybe be managed once the support for constants as parameter for generics is added (note: I don't know right now how SHUFPS works, so take the following as pseudo code): === code begin === generic function ShufPS<const N: Integer>(aArg: Whatever): Whatever; inline; begin asm SHUFPS %xmm1, %xmm2, N end; end; === code end === As long as the assembler reader correctly handles constants for those parameters this could work as for each N the compiler creates a new function... Regards, Sven >
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel