diff --git a/pcsx2/x86/ix86/Makefile.am b/pcsx2/x86/ix86/Makefile.am index ad3403e2b3..7f76f134be 100644 --- a/pcsx2/x86/ix86/Makefile.am +++ b/pcsx2/x86/ix86/Makefile.am @@ -1,5 +1,4 @@ INCLUDES = -I@srcdir@/.. -I@srcdir@/../../ -I@srcdir@/../../../common/include -I@srcdir@/../../../3rdparty noinst_LIBRARIES = libix86.a -libix86_a_SOURCES = ix86_tools.cpp ix86_3dnow.cpp ix86.cpp ix86_cpudetect.cpp ix86_fpu.cpp ix86.h ix86_sse.cpp ix86_mmx.cpp - +libix86_a_SOURCES = ix86.cpp ix86.inl ix86_3dnow.inl ix86.h ix86_fpu.inl ix86_mmx.inl ix86_sse.inl ix86_tools.cpp ix86_cpudetect.cpp ix86_macros.h \ No newline at end of file diff --git a/pcsx2/x86/ix86/ix86.h b/pcsx2/x86/ix86/ix86.h index 17a4525dfd..e91f51f844 100644 --- a/pcsx2/x86/ix86/ix86.h +++ b/pcsx2/x86/ix86/ix86.h @@ -75,7 +75,7 @@ emitterT void write64( u64 val ){ x86Ptr[I] += 8; } //------------------------------------------------------------------ -/* + //------------------------------------------------------------------ // jump/align functions //------------------------------------------------------------------ @@ -104,7 +104,23 @@ emitterT u8* J8Rel( int cc, int to ); emitterT u32* J32Rel( int cc, u32 to ); emitterT u64 GetCPUTick( void ); //------------------------------------------------------------------ -*/ + +emitterT void eMOV32RtoR( x86IntRegType to, x86IntRegType from ); +emitterT u32* eJMP32( uptr to ); +emitterT u8* eJMP8( u8 to ); +emitterT void eCALL32( u32 to ); +emitterT void eLEA32RtoR(x86IntRegType to, x86IntRegType from, u32 offset); +emitterT void eLEA32RStoR(x86IntRegType to, x86IntRegType from, u32 scale); +emitterT void eNOP( void ); +emitterT void eAND32I8toR( x86IntRegType to, u8 from ); +emitterT void eAND32ItoM( uptr to, u32 from ); +emitterT void eLEA32RRtoR(x86IntRegType to, x86IntRegType from0, x86IntRegType from1); +emitterT void eAND32I8toM( uptr to, u8 from ); +emitterT void eLEA32RStoR(x86IntRegType to, x86IntRegType from, u32 scale); + + + + #define MMXONLY(code) code #define _MM_MK_INSERTPS_NDX(srcField, dstField, zeroMask) (((srcField)<<6) | ((dstField)<<4) | (zeroMask)) diff --git a/pcsx2/x86/ix86/ix86.inl b/pcsx2/x86/ix86/ix86.inl index f09cb3b1bb..8e087c155e 100644 --- a/pcsx2/x86/ix86/ix86.inl +++ b/pcsx2/x86/ix86/ix86.inl @@ -30,6 +30,10 @@ // ix86 instructions //------------------------------------------------------------------ +#include "PrecompiledHeader.h" +#include "System.h" +#include "ix86.h" + emitterT void WriteRmOffset(x86IntRegType to, s32 offset) { if( (to&7) == ESP ) { @@ -244,7 +248,7 @@ emitterT void ex86AlignExecutable( int align ) { case 0: break; - case 1: eeNOP(); break; + case 1: eNOP(); break; case 2: eMOV32RtoR( ESI, ESI ); break; case 3: write8(0x08D); write8(0x024); write8(0x024); break; case 5: eNOP(); // falls through to 4... @@ -256,7 +260,7 @@ emitterT void ex86AlignExecutable( int align ) default: { // for larger alignments, just use a JMP... - u8* aligned_target = eJMP8(0); + u8* aligned_target = eJMP8(0); x86Ptr[I] = (u8*)newx86; ex86SetJ8( aligned_target ); }