Finish generalizing Safe/UnsafeWriteRegToReg, including warning about
unsafe uses. I was going to use this for stbx, but it appears that JIT'ing it is actually visibly slower (!). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1676 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
1413a40944
commit
3669d711a2
|
@ -92,10 +92,10 @@ void Jit64::SafeLoadRegToEAX(X64Reg reg, int accessSize, s32 offset, bool signEx
|
|||
|
||||
void Jit64::UnsafeWriteRegToReg(X64Reg reg_value, X64Reg reg_addr, int accessSize, s32 offset)
|
||||
{
|
||||
if (accessSize != 32) {
|
||||
PanicAlert("UnsafeWriteRegToReg can't handle %i byte accesses", accessSize);
|
||||
if (accessSize == 8 && reg_value >= 4) {
|
||||
PanicAlert("WARNING: likely incorrect use of UnsafeWriteRegToReg!");
|
||||
}
|
||||
BSWAP(32, reg_value);
|
||||
BSWAP(accessSize, reg_value);
|
||||
#ifdef _M_IX86
|
||||
AND(32, R(reg_addr), Imm32(Memory::MEMVIEW32_MASK));
|
||||
MOV(accessSize, MDisp(reg_addr, (u32)Memory::base + offset), R(reg_value));
|
||||
|
|
Loading…
Reference in New Issue