mirror of https://github.com/PCSX2/pcsx2.git
changed the functions 64bit was having trouble with, to be the same for 64bit and 32bit without using the 64hack macro.
not sure yet why part of ADD32ItoM() was breaking 64bit, so i just commented that out. git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@190 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
parent
8d23a6c6ab
commit
1d23c27200
|
@ -400,6 +400,7 @@ int SysPageFaultExceptionFilter(struct _EXCEPTION_POINTERS* eps)
|
|||
s_psVuMem.aVFNs[1] = addr&~0xfff;
|
||||
SysMapUserPhysicalPages((void*)addr, 1, s_psVuMem.aPFNs, 1);
|
||||
|
||||
//SysPrintf("Exception: vumem\n");
|
||||
return EXCEPTION_CONTINUE_EXECUTION;
|
||||
}
|
||||
OtherException:
|
||||
|
@ -412,6 +413,7 @@ OtherException:
|
|||
if( ExceptionRecord->ExceptionInformation[0] ) {
|
||||
//SKIP_WRITE();
|
||||
// shouldn't be writing
|
||||
SysPrintf("Exception: Write\n"); // Naruto Ultimate Ninja 3 crashes right after a write!
|
||||
}
|
||||
else {
|
||||
SysPrintf("vmhack ");
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
|
||||
#ifdef __x86_64__
|
||||
|
||||
#define _64_BIT_HACK
|
||||
#ifdef _MSC_VER
|
||||
// visual studio calling convention
|
||||
x86IntRegType g_x86savedregs[] = { RBX, RBP, RSI, RDI, R12, R13, R14, R15 };
|
||||
|
@ -1140,16 +1139,14 @@ _inline void ADD32ItoR( x86IntRegType to, u32 from )
|
|||
/* add imm32 to m32 */
|
||||
_inline void ADD32ItoM( uptr to, u32 from )
|
||||
{
|
||||
#ifndef _64_BIT_HACK // Stops any games from running in the 64 bit version
|
||||
if(from < 0x80)
|
||||
/*if(from < 0x80) // crashes games in 64bit build; TODO: figure out why.
|
||||
{
|
||||
write8( 0x83 );
|
||||
ModRM( 0, 0, DISP32 );
|
||||
write32( MEMADDR(to, 8) );
|
||||
write8( from );
|
||||
}
|
||||
else
|
||||
#endif
|
||||
else*/
|
||||
{
|
||||
write8( 0x81 );
|
||||
ModRM( 0, 0, DISP32 );
|
||||
|
@ -1214,14 +1211,8 @@ _inline void ADD16RtoR( x86IntRegType to , x86IntRegType from )
|
|||
/* add imm16 to r16 */
|
||||
_inline void ADD16ItoR( x86IntRegType to, u16 from )
|
||||
{
|
||||
#ifndef _64_BIT_HACK
|
||||
// Breaks loading saved gaves in Kingdom Hearts with "Assertion `s_vu1esp == 0' failed." in the 64 bit version
|
||||
RexB(0,to);
|
||||
write8( 0x66 );
|
||||
#else
|
||||
write8( 0x66 );
|
||||
RexB(0,to);
|
||||
#endif
|
||||
|
||||
if ( to == EAX)
|
||||
{
|
||||
|
@ -1505,7 +1496,8 @@ _inline void SBB32ItoR( x86IntRegType to, u32 from ) {
|
|||
RexB(0,to);
|
||||
if ( to == EAX ) {
|
||||
write8( 0x1D );
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
write8( 0x81 );
|
||||
ModRM( 3, 3, to );
|
||||
}
|
||||
|
@ -2430,14 +2422,8 @@ _inline void AND16RtoR( x86IntRegType to, x86IntRegType from )
|
|||
/* and imm16 to r16 */
|
||||
_inline void AND16ItoR( x86IntRegType to, u16 from )
|
||||
{
|
||||
#ifndef _64_BIT_HACK
|
||||
// Given what happened with ADD16ItoR, I'll change this back as a precaution.
|
||||
RexB(0,to);
|
||||
write8(0x66);
|
||||
#else
|
||||
write8(0x66);
|
||||
RexB(0,to);
|
||||
#endif
|
||||
|
||||
if ( to == EAX ) {
|
||||
write8( 0x25 );
|
||||
|
|
Loading…
Reference in New Issue