Memory: Fixed a bug on tlb read for LB and LH
This commit is contained in:
parent
b2f7f67dc2
commit
72b708850b
|
@ -349,7 +349,6 @@ void CMipsMemoryVM::Compile_LB ( x86Reg Reg, DWORD VAddr, BOOL SignExtend) {
|
||||||
MoveConstToX86reg(VAddr,AddrReg);
|
MoveConstToX86reg(VAddr,AddrReg);
|
||||||
MoveVariableDispToX86Reg(m_TLB_ReadMap,"m_TLB_ReadMap",TlbMappReg,TlbMappReg,4);
|
MoveVariableDispToX86Reg(m_TLB_ReadMap,"m_TLB_ReadMap",TlbMappReg,TlbMappReg,4);
|
||||||
CompileReadTLBMiss(AddrReg,TlbMappReg);
|
CompileReadTLBMiss(AddrReg,TlbMappReg);
|
||||||
AddX86RegToX86Reg(TlbMappReg,AddrReg);
|
|
||||||
if (SignExtend) {
|
if (SignExtend) {
|
||||||
MoveSxByteX86regPointerToX86reg(AddrReg, TlbMappReg,Reg);
|
MoveSxByteX86regPointerToX86reg(AddrReg, TlbMappReg,Reg);
|
||||||
} else {
|
} else {
|
||||||
|
@ -406,7 +405,6 @@ void CMipsMemoryVM::Compile_LH ( x86Reg Reg, DWORD VAddr, BOOL SignExtend) {
|
||||||
MoveConstToX86reg(VAddr,AddrReg);
|
MoveConstToX86reg(VAddr,AddrReg);
|
||||||
MoveVariableDispToX86Reg(m_TLB_ReadMap,"m_TLB_ReadMap",TlbMappReg,TlbMappReg,4);
|
MoveVariableDispToX86Reg(m_TLB_ReadMap,"m_TLB_ReadMap",TlbMappReg,TlbMappReg,4);
|
||||||
CompileReadTLBMiss(AddrReg,TlbMappReg);
|
CompileReadTLBMiss(AddrReg,TlbMappReg);
|
||||||
AddX86RegToX86Reg(TlbMappReg,AddrReg);
|
|
||||||
if (SignExtend) {
|
if (SignExtend) {
|
||||||
MoveSxHalfX86regPointerToX86reg(AddrReg, TlbMappReg,Reg);
|
MoveSxHalfX86regPointerToX86reg(AddrReg, TlbMappReg,Reg);
|
||||||
} else {
|
} else {
|
||||||
|
@ -2628,7 +2626,7 @@ void CMipsMemoryVM::Compile_LB (void)
|
||||||
|
|
||||||
if (IsConst(Opcode.base)) {
|
if (IsConst(Opcode.base)) {
|
||||||
DWORD Address = (GetMipsRegLo(Opcode.base) + (short)Opcode.offset) ^ 3;
|
DWORD Address = (GetMipsRegLo(Opcode.base) + (short)Opcode.offset) ^ 3;
|
||||||
Map_GPR_32bit(Opcode.rt,TRUE,0);
|
Map_GPR_32bit(Opcode.rt,TRUE,-1);
|
||||||
Compile_LB(GetMipsRegMapLo(Opcode.rt),Address,TRUE);
|
Compile_LB(GetMipsRegMapLo(Opcode.rt),Address,TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2673,7 +2671,7 @@ void CMipsMemoryVM::Compile_LBU (void)
|
||||||
|
|
||||||
if (IsConst(Opcode.base)) {
|
if (IsConst(Opcode.base)) {
|
||||||
DWORD Address = (GetMipsRegLo(Opcode.base) + (short)Opcode.offset) ^ 3;
|
DWORD Address = (GetMipsRegLo(Opcode.base) + (short)Opcode.offset) ^ 3;
|
||||||
Map_GPR_32bit(Opcode.rt,FALSE,0);
|
Map_GPR_32bit(Opcode.rt,FALSE,-1);
|
||||||
Compile_LB(GetMipsRegMapLo(Opcode.rt),Address,FALSE);
|
Compile_LB(GetMipsRegMapLo(Opcode.rt),Address,FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2718,7 +2716,7 @@ void CMipsMemoryVM::Compile_LH (void)
|
||||||
|
|
||||||
if (IsConst(Opcode.base)) {
|
if (IsConst(Opcode.base)) {
|
||||||
DWORD Address = (GetMipsRegLo(Opcode.base) + (short)Opcode.offset) ^ 2;
|
DWORD Address = (GetMipsRegLo(Opcode.base) + (short)Opcode.offset) ^ 2;
|
||||||
Map_GPR_32bit(Opcode.rt,TRUE,0);
|
Map_GPR_32bit(Opcode.rt,TRUE,-1);
|
||||||
Compile_LH(GetMipsRegMapLo(Opcode.rt),Address,TRUE);
|
Compile_LH(GetMipsRegMapLo(Opcode.rt),Address,TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2763,7 +2761,7 @@ void CMipsMemoryVM::Compile_LHU (void)
|
||||||
|
|
||||||
if (IsConst(Opcode.base)) {
|
if (IsConst(Opcode.base)) {
|
||||||
DWORD Address = (GetMipsRegLo(Opcode.base) + (short)Opcode.offset) ^ 2;
|
DWORD Address = (GetMipsRegLo(Opcode.base) + (short)Opcode.offset) ^ 2;
|
||||||
Map_GPR_32bit(Opcode.rt,FALSE,0);
|
Map_GPR_32bit(Opcode.rt,FALSE,-1);
|
||||||
Compile_LH(GetMipsRegMapLo(Opcode.rt),Address,FALSE);
|
Compile_LH(GetMipsRegMapLo(Opcode.rt),Address,FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue