mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-05 22:18:16 +01: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:
parent
680395a803
commit
7a673a8a43
10 changed files with 71 additions and 56 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue