diff options
| author | magumagu <magumagu9@gmail.com> | 2014-03-25 20:50:14 -0700 |
|---|---|---|
| committer | magumagu <magumagu9@gmail.com> | 2014-03-25 20:50:14 -0700 |
| commit | ca4e0495c03b72cb2e2cf47f093db54409cb3937 (patch) | |
| tree | 8b8cff8990c0084fc805a17c707a61805bf9b603 | |
| parent | 4eab240e259b48c7a15e2021363165cb5112dbf0 (diff) | |
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.
| -rw-r--r-- | Source/Core/Core/PowerPC/Jit64/Jit.cpp | 5 | ||||
| -rw-r--r-- | Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp | 5 |
2 files changed, 0 insertions, 10 deletions
diff --git a/Source/Core/Core/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/PowerPC/Jit64/Jit.cpp index 686805bce2..9e1eeec222 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit.cpp @@ -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 } diff --git a/Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp b/Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp index 689b4c48bd..53d0323c71 100644 --- a/Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp +++ b/Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp @@ -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) { |
