mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2025-12-28 10:15:00 +01:00
block_of_code: Make CallFunction accept function pointers only
This commit is contained in:
parent
249a2be786
commit
ea6a4e82b5
3 changed files with 36 additions and 32 deletions
|
|
@ -128,17 +128,6 @@ void BlockOfCode::SwitchMxcsrOnExit() {
|
|||
ldmxcsr(dword[r15 + offsetof(JitState, save_host_MXCSR)]);
|
||||
}
|
||||
|
||||
void BlockOfCode::CallFunction(const void* fn) {
|
||||
u64 distance = u64(fn) - (getCurr<u64>() + 5);
|
||||
if (distance >= 0x0000000080000000ULL && distance < 0xFFFFFFFF80000000ULL) {
|
||||
// Far call
|
||||
mov(rax, u64(fn));
|
||||
call(rax);
|
||||
} else {
|
||||
call(fn);
|
||||
}
|
||||
}
|
||||
|
||||
void BlockOfCode::nop(size_t size) {
|
||||
switch (size) {
|
||||
case 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue