x86 intrinsics for sale cheap

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Wed May 31 17:44:21 UTC 2023


A concern here is that inline assembly is unlikely (if at all) to inline.

So you're going to have to be pretty careful that what you do is 
actually worth the function call, because if it isn't simd, it just 
might not be doing enough work to justify using inline assembly.

If you are able to get a backend to generate the instruction you want 
using regular D code, then you're good to go. As that'll inline.

My general recommendation here is to not worry about specific 
instructions unless you really _really_ need to (very tiny percentage of 
code fits this, almost to the point of not being worth considering).

Instead focus on making your D code communicate to the backend what you 
intend. Even if it doesn't do the job today, in 2 years time it could 
generate significantly better assembly.


More information about the Digitalmars-d mailing list