[fpc-devel] Successful implementation of inline supportforpureassembler routines on x86

J. Gareth Moreton gareth at moreton-family.com
Mon Mar 18 10:13:02 CET 2019

 I didn't mean for a particular intrinsic to be cross-platform, but
implementing intrinsics for every single instruction on a particular
platform, and then doing the same for the other platforms supported by Free
Pascal - that is, composing intrinsics for the 1000+ instructions on
x86_64, testing to see if they properly expand into the assembler commands
that they're advertised to do, and then doing the same for ARM etc.  Hence
the maintenance factor.

 Gareth aka. Kit

 On Mon 18/03/19 07:03 , "Sven Barth" pascaldragon at googlemail.com sent:
 J. Gareth Moreton  schrieb am So., 17. März 2019, 22:26:
  I do have a slight concern when it comes to intrinsic support, because
support will be needed to be added for all platforms, (virtually) all
instructions and tested to see if they expand into the expected
instruction, along with determining what happens when you string several
intrinsics together (i.e. passing the result of one such intrinsic into the
actual parameter of another).  I want to say that it will require just as
much, if not more, maintenance than permitting inlined assembler routines
under limited circumstances, including adding intrinsics for every
individual platform's assembly language and showing that it works. 
 No, intrinsics can be CPU specific. So if you'd use the intrinsic for
AESENC then you'd get a compile time error on non-x86 CPUs. No need to try
to implement them for all platforms. 
 Regards, Sven   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190318/62a2e61d/attachment.html>

More information about the fpc-devel mailing list