November 23, 2016 Re: !!!Please add intrinsics module for DMD DRuntime!!! | ||||
---|---|---|---|---|
| ||||
Posted in reply to ketmar | On 2016-11-23 18:04, ketmar wrote: > On Wednesday, 23 November 2016 at 15:29:48 UTC, Jacob Carlborg wrote: >> There's builtin.d [1] as well. When is which one used? > > builtin is used for CTFE. Aha, I see, thanks. -- /Jacob Carlborg |
November 23, 2016 Re: !!!Please add intrinsics module for DMD DRuntime!!! | ||||
---|---|---|---|---|
| ||||
Posted in reply to tsbockman | 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
|
November 23, 2016 Re: !!!Please add intrinsics module for DMD DRuntime!!! | ||||
---|---|---|---|---|
| ||||
Posted in reply to tsbockman | On 11/23/2016 11:57 AM, tsbockman wrote:
> 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
Yeah, you're right. Will fix.
|
Copyright © 1999-2021 by the D Language Foundation