LLVM asm with constraints, and 2 operands

Guillaume Piolat first.name at domain.tld
Mon Jul 19 21:50:11 UTC 2021


On Monday, 19 July 2021 at 17:20:21 UTC, kinke wrote:
>
> You know that asm is to be avoided whenever possible, but 
> unfortunately, AFAIK intel-intrinsics doesn't fit the usual 
> 'don't worry, simply compile all your code with an appropriate 
> -mattr/-mcpu option' recommendation, as it employs runtime 
> detection of available CPU instructions.

intel-intrinsics employs compile-time detection of CPU 
instructions.
If not available, it will work anyway(tm) with alternate slower 
pathes (and indeed need the right -mattr, so this is the one 
worry you do get).

So, not using @target("feature") right now,  figured it would be 
helpful for runtime dispatch, but that means literring the code 
with __traits(targetHasFeature).


More information about the Digitalmars-d-learn mailing list