fix crazy codegen bug and unban R12 from register allocators

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2295 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2009-02-17 22:18:21 +00:00
parent 73a6ae2592
commit 41ce35deb3
4 changed files with 11 additions and 13 deletions

View File

@ -186,7 +186,7 @@ enum NormalSSEOps
else if (scale >= 1)
{
//Ah good, no scaling.
if (scale == SCALE_ATREG && !((_offsetOrBaseReg&7) == 4 || (_offsetOrBaseReg&7) == 5))
if (scale == SCALE_ATREG && !((_offsetOrBaseReg & 7) == 4 || (_offsetOrBaseReg & 7) == 5))
{
//Okay, we're good. No SIB necessary.
int ioff = (int)offset;
@ -216,10 +216,10 @@ enum NormalSSEOps
SIB = true;
}
if (scale == SCALE_ATREG && _offsetOrBaseReg == 4)
if (scale == SCALE_ATREG && ((_offsetOrBaseReg & 7) == 4))
{
SIB = true;
ireg = 4;
ireg = _offsetOrBaseReg;
}
//Okay, we're fine. Just disp encoding.

View File

@ -114,8 +114,6 @@ struct OpArg
operandReg = 0;
scale = (u8)_scale;
offsetOrBaseReg = (u8)rmReg;
if (rmReg == R12)
PanicAlert("Codegen for R12 known buggy");
indexReg = (u8)scaledReg;
//if scale == 0 never mind offseting
offset = _offset;