MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / _BitScanReverse

Function _BitScanReverse

common/BitUtils.h:17–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15#else
16
17static inline int _BitScanReverse(unsigned long* const Index, const unsigned long Mask)
18{
19 if (Mask == 0)
20 return 0;
21
22 // For some reason, clang won't emit bsr if we use std::countl_zeros()...
23 *Index = 31 - __builtin_clz(Mask);
24 return 1;
25}
26
27#endif
28

Callers 9

BitScanMSBFunction · 0.85
clzllFunction · 0.85
VmaBitScanMSBFunction · 0.85
VmaBitScanMSBFunction · 0.85
bit_lengthFunction · 0.85
clzFunction · 0.85
clzllFunction · 0.85
UsesRegionRepeatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected