mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-11-12 12:20:12 +01:00
[common] rework BitField and BitUtil, use concepts whenever possible (#4076)
test no regressions especially on Liiinux Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4076 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
parent
c2e74a9380
commit
41762940d6
31 changed files with 529 additions and 757 deletions
|
|
@ -268,8 +268,8 @@ constexpr bool IsWithin2G(uintptr_t ref, uintptr_t target) noexcept {
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
requires std::is_pointer_v<T>
|
||||
inline void CallFarFunction(Xbyak::CodeGenerator& code, const T f) {
|
||||
static_assert(std::is_pointer_v<T>, "Argument must be a (function) pointer.");
|
||||
uintptr_t addr = uintptr_t(f);
|
||||
if (IsWithin2G(uintptr_t(code.getCurr()), addr)) {
|
||||
code.call(f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue