block_of_code: Make CallFunction accept function pointers only

This commit is contained in:
Lioncash 2016-08-31 16:09:26 -04:00 committed by MerryMage
parent 249a2be786
commit ea6a4e82b5
3 changed files with 36 additions and 32 deletions

View file

@ -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: