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

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Tue Nov 22 08:07:39 PST 2016


On 11/22/16 8:31 AM, Ilya Yaroshenko wrote:
> 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?

I wrote BitRange to help with cycle detection. It was related to using 
the btc/btr/bt functions on bit arrays (it's meant to wrap such a bit 
array), so that seemed like a natural place for it. Putting it in 
std.bitmanip would make it unavailable to druntime.

Why shouldn't it be public?

>
> 2. Why bsf and bsr do NOT use hardware instructions anymore?

They should unless there is no hardware instruction available. I believe 
the software implementation is only a fallback when this is the case.

-Steve


More information about the Digitalmars-d mailing list