mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
add __builtin__popcount() for ImportC (#20790)
This commit is contained in:
parent
ea9ead9cae
commit
94714307ec
1 changed files with 6 additions and 0 deletions
|
@ -86,6 +86,12 @@ version (DigitalMars)
|
|||
return core.bitop.bswap(value);
|
||||
}
|
||||
|
||||
uint __builtin__popcount()(ulong value)
|
||||
{
|
||||
import core.bitop;
|
||||
return core.bitop._popcnt(value);
|
||||
}
|
||||
|
||||
// Lazily imported on first use
|
||||
private alias c_long = imported!"core.stdc.config".c_long;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue