Save registers before calls in x86-32 JIT.
I have no idea what the person who added RegistersInUse() was thinking, but not correctly saving registers is an easy way to end up with crashes.
This commit is contained in:
parent
4eab240e25
commit
ca4e0495c0
|
@ -726,7 +726,6 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
|
|||
|
||||
u32 Jit64::RegistersInUse()
|
||||
{
|
||||
#if _M_X86_64
|
||||
u32 result = 0;
|
||||
for (int i = 0; i < NUMXREGS; i++)
|
||||
{
|
||||
|
@ -736,8 +735,4 @@ u32 Jit64::RegistersInUse()
|
|||
result |= (1 << (16 + i));
|
||||
}
|
||||
return result;
|
||||
#else
|
||||
// not needed
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -61,7 +61,6 @@ struct RegInfo {
|
|||
};
|
||||
|
||||
static u32 regsInUse(RegInfo& R) {
|
||||
#if _M_X86_64
|
||||
u32 result = 0;
|
||||
for (unsigned i = 0; i < MAX_NUMBER_OF_REGS; i++)
|
||||
{
|
||||
|
@ -71,10 +70,6 @@ static u32 regsInUse(RegInfo& R) {
|
|||
result |= (1 << (16 + i));
|
||||
}
|
||||
return result;
|
||||
#else
|
||||
// not needed
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void regMarkUse(RegInfo& R, InstLoc I, InstLoc Op, unsigned OpNum) {
|
||||
|
|
Loading…
Reference in New Issue