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

tsbockman via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 23 11:57:15 PST 2016


On Wednesday, 23 November 2016 at 00:52:15 UTC, Walter Bright 
wrote:
> Consider the code:
>
>   import core.bitop;
>
>   int foo(int v) {
>     return core.bitop.bsf(v);
>   }
>
> Compiling:
>
>   dmd foo.d -c
>   obj2asm foo.obj
>
> yields:
>
>   _D5bug113fooFiZi        comdat
>                 bsf     EAX,AL
>                 ret
>
> Meaning the bsf() intrinsic is properly detected and used.

I did some additional testing, and it seems that the bsf and bsr 
intrinsics are only working *sometimes* on DMD master:
     https://issues.dlang.org/show_bug.cgi?id=16743



More information about the Digitalmars-d mailing list