/[pcsx2_0.9.7]/trunk/common/include/x86emitter/internal.h
ViewVC logotype

Diff of /trunk/common/include/x86emitter/internal.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/common/include/x86emitter/internal.h	2010/09/07 06:28:05	61
+++ trunk/common/include/x86emitter/internal.h	2010/09/07 11:08:22	62
@@ -18,58 +18,58 @@
 #include "x86types.h"
 #include "instructions.h"
 
-#define OpWriteSSE( pre, op )		xOpWrite0F( pre, op, to, from )
 
 namespace x86Emitter {
 
-extern void SimdPrefix( u8 prefix, u16 opcode );
-extern void EmitSibMagic( uint regfield, const void* address );
-extern void EmitSibMagic( uint regfield, const ModSibBase& info );
-extern void EmitSibMagic( uint reg1, const xRegisterBase& reg2 );
-extern void EmitSibMagic( const xRegisterBase& reg1, const xRegisterBase& reg2 );
-extern void EmitSibMagic( const xRegisterBase& reg1, const void* src );
-extern void EmitSibMagic( const xRegisterBase& reg1, const ModSibBase& sib );
-
-extern void _xMovRtoR( const xRegisterInt& to, const xRegisterInt& from );
-extern void _g1_EmitOp( G1Type InstType, const xRegisterInt& to, const xRegisterInt& from );
-
-template< typename T > inline
-void xWrite( T val )
-{
-	*(T*)x86Ptr = val;
-	x86Ptr += sizeof(T);
-}
-
-template< typename T1, typename T2 > __emitinline
-void xOpWrite( u8 prefix, u8 opcode, const T1& param1, const T2& param2 )
-{
-	if( prefix != 0 )
-		xWrite16( (opcode<<8) | prefix );
-	else
-		xWrite8( opcode );
-
-	EmitSibMagic( param1, param2 );
-}
-
-template< typename T1, typename T2 > __emitinline
-void xOpWrite0F( u8 prefix, u16 opcode, const T1& param1, const T2& param2 )
-{
-	SimdPrefix( prefix, opcode );
-	EmitSibMagic( param1, param2 );
-}
+#define OpWriteSSE( pre, op )		xOpWrite0F( pre, op, to, from )
 
-template< typename T1, typename T2 > __emitinline
-void xOpWrite0F( u8 prefix, u16 opcode, const T1& param1, const T2& param2, u8 imm8 )
-{
-	xOpWrite0F( prefix, opcode, param1, param2 );
-	xWrite8( imm8 );
-}
+	extern void SimdPrefix( u8 prefix, u16 opcode );
+	extern void EmitSibMagic( uint regfield, const void* address );
+	extern void EmitSibMagic( uint regfield, const xIndirectVoid& info );
+	extern void EmitSibMagic( uint reg1, const xRegisterBase& reg2 );
+	extern void EmitSibMagic( const xRegisterBase& reg1, const xRegisterBase& reg2 );
+	extern void EmitSibMagic( const xRegisterBase& reg1, const void* src );
+	extern void EmitSibMagic( const xRegisterBase& reg1, const xIndirectVoid& sib );
+
+	extern void _xMovRtoR( const xRegisterInt& to, const xRegisterInt& from );
+
+	template< typename T > inline
+		void xWrite( T val )
+	{
+		*(T*)x86Ptr = val;
+		x86Ptr += sizeof(T);
+	}
+
+	template< typename T1, typename T2 > __emitinline
+		void xOpWrite( u8 prefix, u8 opcode, const T1& param1, const T2& param2 )
+	{
+		if( prefix != 0 )
+			xWrite16( (opcode<<8) | prefix );
+		else
+			xWrite8( opcode );
+
+		EmitSibMagic( param1, param2 );
+	}
+
+	template< typename T1, typename T2 > __emitinline
+		void xOpWrite0F( u8 prefix, u16 opcode, const T1& param1, const T2& param2 )
+	{
+		SimdPrefix( prefix, opcode );
+		EmitSibMagic( param1, param2 );
+	}
+
+	template< typename T1, typename T2 > __emitinline
+		void xOpWrite0F( u8 prefix, u16 opcode, const T1& param1, const T2& param2, u8 imm8 )
+	{
+		xOpWrite0F( prefix, opcode, param1, param2 );
+		xWrite8( imm8 );
+	}
 
-template< typename T1, typename T2 > __emitinline
-void xOpWrite0F( u16 opcode, const T1& param1, const T2& param2 )			{ xOpWrite0F( 0, opcode, param1, param2 ); }
+	template< typename T1, typename T2 > __emitinline
+		void xOpWrite0F( u16 opcode, const T1& param1, const T2& param2 )			{ xOpWrite0F( 0, opcode, param1, param2 ); }
 
-template< typename T1, typename T2 > __emitinline
-void xOpWrite0F( u16 opcode, const T1& param1, const T2& param2, u8 imm8 )	{ xOpWrite0F( 0, opcode, param1, param2, imm8 ); }
+	template< typename T1, typename T2 > __emitinline
+		void xOpWrite0F( u16 opcode, const T1& param1, const T2& param2, u8 imm8 )	{ xOpWrite0F( 0, opcode, param1, param2, imm8 ); }
 
 }
 

 

  ViewVC Help
Powered by ViewVC 1.1.22