!!!Please add intrinsics module for DMD DRuntime!!!

Ilya Yaroshenko via Digitalmars-d digitalmars-d at puremagic.com
Tue Nov 22 09:05:20 PST 2016


On Tuesday, 22 November 2016 at 16:36:13 UTC, Andrei Alexandrescu 
wrote:
> On 11/22/2016 11:28 AM, Ilya Yaroshenko wrote:
>> They are always software
>> https://github.com/dlang/druntime/blob/master/src/core/bitop.d 
>> --Ilya
>
> The intent is to have the compiler detect the pattern and 
> insert the code. dmd does that IIRC (why is asm.dlang.org not 
> working again?) and so does gdc: https://godbolt.org/g/WspkIX. 
> -- Andrei

GDC and LDC can not detect it, I don't think DMD can. Proof - 
https://godbolt.org/g/bsAFU8 .
Your link refers to GDC with an old DRuntime, which have bsr 
intrinsics instead of current software code.

In addition, i need to be sure that an intrinsics function is 
always inlined (without -inline flag too).
--Ilya


More information about the Digitalmars-d mailing list