mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-12-15 07:15:01 +00:00
common: Add function for checking word alignment to alignment.h
This will be used in a following change to svcArbitrateLock() and svcArbitrateUnlock()
This commit is contained in:
parent
d27f4a4928
commit
541e9624eb
|
@ -25,4 +25,10 @@ constexpr bool Is4KBAligned(T value) {
|
||||||
return (value & 0xFFF) == 0;
|
return (value & 0xFFF) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
constexpr bool IsWordAligned(T value) {
|
||||||
|
static_assert(std::is_unsigned_v<T>, "T must be an unsigned value.");
|
||||||
|
return (value & 0b11) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Common
|
} // namespace Common
|
||||||
|
|
Loading…
Reference in a new issue