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

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 23 07:29:48 PST 2016


On 2016-11-23 01:46, Walter Bright wrote:
> On 11/22/2016 5:31 AM, Ilya Yaroshenko wrote:
>> Please add a module (core.intrinsics ?) which will contain all DMD
>> intrinsics
>> similar to ldc.intrinsics. After each DMD release it is not clear what is
>> intrinsics and what is not. I need BSF intrinsics for Better C library
>> Mir
>> Random [1], which should work without linking with DRuntime and
>> Phobos. I can
>> use ldc.intrinsics for LDC, but have no idea about DMD. I want BSR and
>> BSF
>> instructions to be generated instead of current _software_
>> implementation in
>> core.bitop.
>>
>> ==================
>> Philosophical Questions:
>>
>> 1. Why hight level stuff like BitRange is in core.bitop, but not in
>> std.bitmanip? If it should be in core, why it is public?
>>
>> 2. Why bsf and bsr do NOT use hardware instructions anymore?
>> ==================
>>
>> Please ping me for Phobos and DRuntime PRs if they are related to math
>> and
>> numeric issues.
>
>
> The definitive list of dmd intrinsics is here:
>
>   https://github.com/dlang/dmd/blob/master/src/toir.d#L349

There's builtin.d [1] as well. When is which one used?

[1] https://github.com/dlang/dmd/blob/master/src/builtin.d

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list