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:
magumagu9 2008-12-26 10:04:42 +00:00
parent 1413a40944
commit 3669d711a2
1 changed files with 3 additions and 3 deletions

View File

@ -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));