mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-25 13:18:43 +00:00
fp: Change FPUnpacked to a normalized representation
Having a known position for the highest set bit makes writing algorithms easier
This commit is contained in:
@@ -150,7 +150,7 @@ inline size_t BitCount(Integral value) {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline int HighestSetBit(T value) {
|
||||
constexpr int HighestSetBit(T value) {
|
||||
auto x = static_cast<std::make_unsigned_t<T>>(value);
|
||||
int result = -1;
|
||||
while (x != 0) {
|
||||
|
||||
Reference in New Issue
Block a user