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

Ilya Yaroshenko via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 23 13:57:51 PST 2016


On Wednesday, 23 November 2016 at 19:57:15 UTC, tsbockman wrote:
> 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

Thank you for filling the bug


More information about the Digitalmars-d mailing list