mirror of
https://github.com/azahar-emu/dynarmic
synced 2025-11-16 12:00:01 +01:00
u128: Add u128::Bit
This commit is contained in:
parent
3e62fea003
commit
5566fab29a
@ -32,6 +32,16 @@ struct u128 {
|
||||
|
||||
u64 lower = 0;
|
||||
u64 upper = 0;
|
||||
|
||||
template<size_t bit_position>
|
||||
bool Bit() {
|
||||
static_assert(bit_position < 128);
|
||||
if constexpr (bit_position < 64) {
|
||||
return Common::Bit<bit_position>(lower);
|
||||
} else {
|
||||
return Common::Bit<bit_position - 64>(upper);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
static_assert(Common::BitSize<u128>() == 128);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user