Skip to content

Commit

Permalink
Merge pull request #18080 from unknownbrackets/x86jit-minor
Browse files Browse the repository at this point in the history
x86jit: Correct jitbase range comparison
  • Loading branch information
hrydgard committed Sep 6, 2023
2 parents 6c3547d + 0fc337c commit f2512e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/MIPS/x86/X64IRAsm.cpp
Expand Up @@ -58,13 +58,13 @@ void X64JitBackend::GenerateFixedCode(MIPSState *mipsState) {
int jitbaseCtxDisp = 0;
// We pre-bake the MIPS_EMUHACK_OPCODE subtraction into our jitbase value.
intptr_t jitbase = (intptr_t)GetBasePtr() - MIPS_EMUHACK_OPCODE;
if ((jitbase < -0x80000000ULL || jitbase > 0x7FFFFFFFULL) && !Accessible((const u8 *)&mipsState->f[0], GetBasePtr())) {
if ((jitbase < -0x80000000LL || jitbase > 0x7FFFFFFFLL) && !Accessible((const u8 *)&mipsState->f[0], GetBasePtr())) {
jo.reserveR15ForAsm = true;
jitbaseInR15 = true;
} else {
jo.downcountInRegister = true;
jo.reserveR15ForAsm = true;
if (jitbase < -0x80000000ULL || jitbase > 0x7FFFFFFFULL) {
if (jitbase < -0x8000000ULL || jitbase > 0x7FFFFFFFLL) {
jitbaseCtxDisp = (int)(jitbase - (intptr_t)&mipsState->f[0]);
}
}
Expand Down

0 comments on commit f2512e0

Please sign in to comment.