A couple of minor corrections to the JIT cleanup commit.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1280 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
magumagu9 2008-11-23 22:48:03 +00:00
parent ac7d6d47de
commit 28ec5031ee
2 changed files with 11 additions and 8 deletions

View File

@ -281,12 +281,9 @@ namespace Jit64
}
else
{
// HERE HOLDS: regs[i].away == true
//
//reg location must be simplereg or immediate
if (regs[i].location.IsSimpleReg()) {
xregs[RX(i)].dirty |= makeDirty;
}
// reg location must be simplereg; memory locations
// and immediates are taken care of above.
xregs[RX(i)].dirty |= makeDirty;
}
if (xlocks[RX(i)]) {
PanicAlert("Seriously WTF, this reg should have been flushed");

View File

@ -373,6 +373,9 @@ namespace Jit64
int a = inst.RA,
s = inst.RS;
gpr.LoadToX64(a, a == s, true);
// Always force moving to EAX because it isn't possible
// to refer to the lowest byte of some registers, at least in
// 32-bit mode.
MOV(32, R(EAX), gpr.R(s));
MOVSX(32, 8, gpr.RX(a), R(AL)); // watch out for ah and friends
if (inst.Rc) {
@ -390,8 +393,11 @@ namespace Jit64
INSTRUCTION_START;
int a = inst.RA, s = inst.RS;
gpr.LoadToX64(a, a == s, true);
MOV(32, R(EAX), gpr.R(s));
MOVSX(32, 16, gpr.RX(a), R(EAX));
// This looks a little dangerous, but it's safe because
// every 32-bit register has a 16-bit half at the same index
// as the 32-bit register.
gpr.KillImmediate(s);
MOVSX(32, 16, gpr.RX(a), gpr.R(s));
if (inst.Rc) {
MOV(32, R(EAX), gpr.R(a));
CALL((u8*)Asm::computeRc);