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

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

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

revision 61 by william, Tue Sep 7 03:24:11 2010 UTC revision 62 by william, Tue Sep 7 11:08:22 2010 UTC
# Line 129  namespace x86Emitter Line 129  namespace x86Emitter
129          // forms are functionally equivalent to Mov reg,imm, and thus better written as MOVs          // forms are functionally equivalent to Mov reg,imm, and thus better written as MOVs
130          // instead.          // instead.
131    
132          extern void xLEA( xRegister32 to, const ModSibBase& src, bool preserve_flags=false );          extern void xLEA( xRegister32 to, const xIndirectVoid& src, bool preserve_flags=false );
133          extern void xLEA( xRegister16 to, const ModSibBase& src, bool preserve_flags=false );          extern void xLEA( xRegister16 to, const xIndirectVoid& src, bool preserve_flags=false );
134    
135          // ----- Push / Pop Instructions  -----          // ----- Push / Pop Instructions  -----
136          // Note: pushad/popad implementations are intentionally left out.  The instructions are          // Note: pushad/popad implementations are intentionally left out.  The instructions are
137          // invalid in x64, and are super slow on x32.  Use multiple Push/Pop instructions instead.          // invalid in x64, and are super slow on x32.  Use multiple Push/Pop instructions instead.
138    
139          extern void xPOP( const ModSibBase& from );          extern void xPOP( const xIndirectVoid& from );
140          extern void xPUSH( const ModSibBase& from );          extern void xPUSH( const xIndirectVoid& from );
141    
142          extern void xPOP( xRegister32 from );          extern void xPOP( xRegister32 from );
143    
# Line 185  namespace x86Emitter Line 185  namespace x86Emitter
185          // the target (efficient!)          // the target (efficient!)
186          //          //
187    
188          template< typename T > __forceinline void xJE( T* func )                { xJcc( Jcc_Equal, (void*)(uptr)func ); }          template< typename T > __fi void xJE( T* func )         { xJcc( Jcc_Equal, (void*)(uptr)func ); }
189          template< typename T > __forceinline void xJZ( T* func )                { xJcc( Jcc_Zero, (void*)(uptr)func ); }          template< typename T > __fi void xJZ( T* func )         { xJcc( Jcc_Zero, (void*)(uptr)func ); }
190          template< typename T > __forceinline void xJNE( T* func )               { xJcc( Jcc_NotEqual, (void*)(uptr)func ); }          template< typename T > __fi void xJNE( T* func )                { xJcc( Jcc_NotEqual, (void*)(uptr)func ); }
191          template< typename T > __forceinline void xJNZ( T* func )               { xJcc( Jcc_NotZero, (void*)(uptr)func ); }          template< typename T > __fi void xJNZ( T* func )                { xJcc( Jcc_NotZero, (void*)(uptr)func ); }
192    
193          template< typename T > __forceinline void xJO( T* func )                { xJcc( Jcc_Overflow, (void*)(uptr)func ); }          template< typename T > __fi void xJO( T* func )         { xJcc( Jcc_Overflow, (void*)(uptr)func ); }
194          template< typename T > __forceinline void xJNO( T* func )               { xJcc( Jcc_NotOverflow, (void*)(uptr)func ); }          template< typename T > __fi void xJNO( T* func )                { xJcc( Jcc_NotOverflow, (void*)(uptr)func ); }
195          template< typename T > __forceinline void xJC( T* func )                { xJcc( Jcc_Carry, (void*)(uptr)func ); }          template< typename T > __fi void xJC( T* func )         { xJcc( Jcc_Carry, (void*)(uptr)func ); }
196          template< typename T > __forceinline void xJNC( T* func )               { xJcc( Jcc_NotCarry, (void*)(uptr)func ); }          template< typename T > __fi void xJNC( T* func )                { xJcc( Jcc_NotCarry, (void*)(uptr)func ); }
197          template< typename T > __forceinline void xJS( T* func )                { xJcc( Jcc_Signed, (void*)(uptr)func ); }          template< typename T > __fi void xJS( T* func )         { xJcc( Jcc_Signed, (void*)(uptr)func ); }
198          template< typename T > __forceinline void xJNS( T* func )               { xJcc( Jcc_Unsigned, (void*)(uptr)func ); }          template< typename T > __fi void xJNS( T* func )                { xJcc( Jcc_Unsigned, (void*)(uptr)func ); }
199    
200          template< typename T > __forceinline void xJPE( T* func )               { xJcc( Jcc_ParityEven, (void*)(uptr)func ); }          template< typename T > __fi void xJPE( T* func )                { xJcc( Jcc_ParityEven, (void*)(uptr)func ); }
201          template< typename T > __forceinline void xJPO( T* func )               { xJcc( Jcc_ParityOdd, (void*)(uptr)func ); }          template< typename T > __fi void xJPO( T* func )                { xJcc( Jcc_ParityOdd, (void*)(uptr)func ); }
202    
203          template< typename T > __forceinline void xJL( T* func )                { xJcc( Jcc_Less, (void*)(uptr)func ); }          template< typename T > __fi void xJL( T* func )         { xJcc( Jcc_Less, (void*)(uptr)func ); }
204          template< typename T > __forceinline void xJLE( T* func )               { xJcc( Jcc_LessOrEqual, (void*)(uptr)func ); }          template< typename T > __fi void xJLE( T* func )                { xJcc( Jcc_LessOrEqual, (void*)(uptr)func ); }
205          template< typename T > __forceinline void xJG( T* func )                { xJcc( Jcc_Greater, (void*)(uptr)func ); }          template< typename T > __fi void xJG( T* func )         { xJcc( Jcc_Greater, (void*)(uptr)func ); }
206          template< typename T > __forceinline void xJGE( T* func )               { xJcc( Jcc_GreaterOrEqual, (void*)(uptr)func ); }          template< typename T > __fi void xJGE( T* func )                { xJcc( Jcc_GreaterOrEqual, (void*)(uptr)func ); }
207    
208          template< typename T > __forceinline void xJB( T* func )                { xJcc( Jcc_Below, (void*)(uptr)func ); }          template< typename T > __fi void xJB( T* func )         { xJcc( Jcc_Below, (void*)(uptr)func ); }
209          template< typename T > __forceinline void xJBE( T* func )               { xJcc( Jcc_BelowOrEqual, (void*)(uptr)func ); }          template< typename T > __fi void xJBE( T* func )                { xJcc( Jcc_BelowOrEqual, (void*)(uptr)func ); }
210          template< typename T > __forceinline void xJA( T* func )                { xJcc( Jcc_Above, (void*)(uptr)func ); }          template< typename T > __fi void xJA( T* func )         { xJcc( Jcc_Above, (void*)(uptr)func ); }
211          template< typename T > __forceinline void xJAE( T* func )               { xJcc( Jcc_AboveOrEqual, (void*)(uptr)func ); }          template< typename T > __fi void xJAE( T* func )                { xJcc( Jcc_AboveOrEqual, (void*)(uptr)func ); }
212    
213          // ------------------------------------------------------------------------          // ------------------------------------------------------------------------
214          // Forward Jump Helpers (act as labels!)          // Forward Jump Helpers (act as labels!)
# Line 305  namespace x86Emitter Line 305  namespace x86Emitter
305          // ------------------------------------------------------------------------          // ------------------------------------------------------------------------
306    
307          extern void xEMMS();          extern void xEMMS();
308          extern void xSTMXCSR( const ModSib32& dest );          extern void xSTMXCSR( const xIndirect32& dest );
309          extern void xLDMXCSR( const ModSib32& src );          extern void xLDMXCSR( const xIndirect32& src );
310          extern void xFXSAVE( const ModSibBase& dest );          extern void xFXSAVE( const xIndirectVoid& dest );
311          extern void xFXRSTOR( const ModSibBase& src );          extern void xFXRSTOR( const xIndirectVoid& src );
312    
313          extern void xMOVDZX( const xRegisterSSE& to, const xRegister32& from );          extern void xMOVDZX( const xRegisterSSE& to, const xRegister32& from );
314          extern void xMOVDZX( const xRegisterSSE& to, const ModSibBase& src );          extern void xMOVDZX( const xRegisterSSE& to, const xIndirectVoid& src );
315    
316          extern void xMOVDZX( const xRegisterMMX& to, const xRegister32& from );          extern void xMOVDZX( const xRegisterMMX& to, const xRegister32& from );
317          extern void xMOVDZX( const xRegisterMMX& to, const ModSibBase& src );          extern void xMOVDZX( const xRegisterMMX& to, const xIndirectVoid& src );
318    
319          extern void xMOVD( const xRegister32& to, const xRegisterSSE& from );          extern void xMOVD( const xRegister32& to, const xRegisterSSE& from );
320          extern void xMOVD( const ModSibBase& dest, const xRegisterSSE& from );          extern void xMOVD( const xIndirectVoid& dest, const xRegisterSSE& from );
321    
322          extern void xMOVD( const xRegister32& to, const xRegisterMMX& from );          extern void xMOVD( const xRegister32& to, const xRegisterMMX& from );
323          extern void xMOVD( const ModSibBase& dest, const xRegisterMMX& from );          extern void xMOVD( const xIndirectVoid& dest, const xRegisterMMX& from );
324    
325          extern void xMOVQ( const xRegisterMMX& to, const xRegisterMMX& from );          extern void xMOVQ( const xRegisterMMX& to, const xRegisterMMX& from );
326          extern void xMOVQ( const xRegisterMMX& to, const xRegisterSSE& from );          extern void xMOVQ( const xRegisterMMX& to, const xRegisterSSE& from );
327          extern void xMOVQ( const xRegisterSSE& to, const xRegisterMMX& from );          extern void xMOVQ( const xRegisterSSE& to, const xRegisterMMX& from );
328    
329          extern void xMOVQ( const ModSibBase& dest, const xRegisterSSE& from );          extern void xMOVQ( const xIndirectVoid& dest, const xRegisterSSE& from );
330          extern void xMOVQ( const ModSibBase& dest, const xRegisterMMX& from );          extern void xMOVQ( const xIndirectVoid& dest, const xRegisterMMX& from );
331          extern void xMOVQ( const xRegisterMMX& to, const ModSibBase& src );          extern void xMOVQ( const xRegisterMMX& to, const xIndirectVoid& src );
332    
333          extern void xMOVQZX( const xRegisterSSE& to, const ModSibBase& src );          extern void xMOVQZX( const xRegisterSSE& to, const xIndirectVoid& src );
334          extern void xMOVQZX( const xRegisterSSE& to, const xRegisterSSE& from );          extern void xMOVQZX( const xRegisterSSE& to, const xRegisterSSE& from );
335    
336          extern void xMOVSS( const xRegisterSSE& to, const xRegisterSSE& from );          extern void xMOVSS( const xRegisterSSE& to, const xRegisterSSE& from );
337          extern void xMOVSS( const ModSibBase& to, const xRegisterSSE& from );          extern void xMOVSS( const xIndirectVoid& to, const xRegisterSSE& from );
338          extern void xMOVSD( const xRegisterSSE& to, const xRegisterSSE& from );          extern void xMOVSD( const xRegisterSSE& to, const xRegisterSSE& from );
339          extern void xMOVSD( const ModSibBase& to, const xRegisterSSE& from );          extern void xMOVSD( const xIndirectVoid& to, const xRegisterSSE& from );
340    
341          extern void xMOVSSZX( const xRegisterSSE& to, const ModSibBase& from );          extern void xMOVSSZX( const xRegisterSSE& to, const xIndirectVoid& from );
342          extern void xMOVSDZX( const xRegisterSSE& to, const ModSibBase& from );          extern void xMOVSDZX( const xRegisterSSE& to, const xIndirectVoid& from );
343    
344          extern void xMOVNTDQA( const xRegisterSSE& to, const ModSibBase& from );          extern void xMOVNTDQA( const xRegisterSSE& to, const xIndirectVoid& from );
345          extern void xMOVNTDQA( const ModSibBase& to, const xRegisterSSE& from );          extern void xMOVNTDQA( const xIndirectVoid& to, const xRegisterSSE& from );
346    
347          extern void xMOVNTPD( const ModSibBase& to, const xRegisterSSE& from );          extern void xMOVNTPD( const xIndirectVoid& to, const xRegisterSSE& from );
348          extern void xMOVNTPS( const ModSibBase& to, const xRegisterSSE& from );          extern void xMOVNTPS( const xIndirectVoid& to, const xRegisterSSE& from );
349          extern void xMOVNTQ( const ModSibBase& to, const xRegisterMMX& from );          extern void xMOVNTQ( const xIndirectVoid& to, const xRegisterMMX& from );
350    
351          extern void xMOVMSKPS( const xRegister32& to, const xRegisterSSE& from );          extern void xMOVMSKPS( const xRegister32& to, const xRegisterSSE& from );
352          extern void xMOVMSKPD( const xRegister32& to, const xRegisterSSE& from );          extern void xMOVMSKPD( const xRegister32& to, const xRegisterSSE& from );
# Line 386  namespace x86Emitter Line 386  namespace x86Emitter
386          extern const xImplSimd_DestRegSSE xMOVSHDUP;          extern const xImplSimd_DestRegSSE xMOVSHDUP;
387    
388          extern void xINSERTPS( const xRegisterSSE& to, const xRegisterSSE& from, u8 imm8 );          extern void xINSERTPS( const xRegisterSSE& to, const xRegisterSSE& from, u8 imm8 );
389          extern void xINSERTPS( const xRegisterSSE& to, const ModSib32& from, u8 imm8 );          extern void xINSERTPS( const xRegisterSSE& to, const xIndirect32& from, u8 imm8 );
390    
391          extern void xEXTRACTPS( const xRegister32& to, const xRegisterSSE& from, u8 imm8 );          extern void xEXTRACTPS( const xRegister32& to, const xRegisterSSE& from, u8 imm8 );
392          extern void xEXTRACTPS( const ModSib32& dest, const xRegisterSSE& from, u8 imm8 );          extern void xEXTRACTPS( const xIndirect32& dest, const xRegisterSSE& from, u8 imm8 );
393    
394          // ------------------------------------------------------------------------          // ------------------------------------------------------------------------
395    
# Line 423  namespace x86Emitter Line 423  namespace x86Emitter
423          //          //
424          //          //
425          extern void xCVTDQ2PD( const xRegisterSSE& to, const xRegisterSSE& from );          extern void xCVTDQ2PD( const xRegisterSSE& to, const xRegisterSSE& from );
426          extern void xCVTDQ2PD( const xRegisterSSE& to, const ModSib64& from );          extern void xCVTDQ2PD( const xRegisterSSE& to, const xIndirect64& from );
427          extern void xCVTDQ2PS( const xRegisterSSE& to, const xRegisterSSE& from );          extern void xCVTDQ2PS( const xRegisterSSE& to, const xRegisterSSE& from );
428          extern void xCVTDQ2PS( const xRegisterSSE& to, const ModSib128& from );          extern void xCVTDQ2PS( const xRegisterSSE& to, const xIndirect128& from );
429    
430          extern void xCVTPD2DQ( const xRegisterSSE& to, const xRegisterSSE& from );          extern void xCVTPD2DQ( const xRegisterSSE& to, const xRegisterSSE& from );
431          extern void xCVTPD2DQ( const xRegisterSSE& to, const ModSib128& from );          extern void xCVTPD2DQ( const xRegisterSSE& to, const xIndirect128& from );
432          extern void xCVTPD2PI( const xRegisterMMX& to, const xRegisterSSE& from );          extern void xCVTPD2PI( const xRegisterMMX& to, const xRegisterSSE& from );
433          extern void xCVTPD2PI( const xRegisterMMX& to, const ModSib128& from );          extern void xCVTPD2PI( const xRegisterMMX& to, const xIndirect128& from );
434          extern void xCVTPD2PS( const xRegisterSSE& to, const xRegisterSSE& from );          extern void xCVTPD2PS( const xRegisterSSE& to, const xRegisterSSE& from );
435          extern void xCVTPD2PS( const xRegisterSSE& to, const ModSib128& from );          extern void xCVTPD2PS( const xRegisterSSE& to, const xIndirect128& from );
436    
437          extern void xCVTPI2PD( const xRegisterSSE& to, const xRegisterMMX& from );          extern void xCVTPI2PD( const xRegisterSSE& to, const xRegisterMMX& from );
438          extern void xCVTPI2PD( const xRegisterSSE& to, const ModSib64& from );          extern void xCVTPI2PD( const xRegisterSSE& to, const xIndirect64& from );
439          extern void xCVTPI2PS( const xRegisterSSE& to, const xRegisterMMX& from );          extern void xCVTPI2PS( const xRegisterSSE& to, const xRegisterMMX& from );
440          extern void xCVTPI2PS( const xRegisterSSE& to, const ModSib64& from );          extern void xCVTPI2PS( const xRegisterSSE& to, const xIndirect64& from );
441    
442          extern void xCVTPS2DQ( const xRegisterSSE& to, const xRegisterSSE& from );          extern void xCVTPS2DQ( const xRegisterSSE& to, const xRegisterSSE& from );
443          extern void xCVTPS2DQ( const xRegisterSSE& to, const ModSib128& from );          extern void xCVTPS2DQ( const xRegisterSSE& to, const xIndirect128& from );
444          extern void xCVTPS2PD( const xRegisterSSE& to, const xRegisterSSE& from );          extern void xCVTPS2PD( const xRegisterSSE& to, const xRegisterSSE& from );
445          extern void xCVTPS2PD( const xRegisterSSE& to, const ModSib64& from );          extern void xCVTPS2PD( const xRegisterSSE& to, const xIndirect64& from );
446          extern void xCVTPS2PI( const xRegisterMMX& to, const xRegisterSSE& from );          extern void xCVTPS2PI( const xRegisterMMX& to, const xRegisterSSE& from );
447          extern void xCVTPS2PI( const xRegisterMMX& to, const ModSib64& from );          extern void xCVTPS2PI( const xRegisterMMX& to, const xIndirect64& from );
448    
449          extern void xCVTSD2SI( const xRegister32& to, const xRegisterSSE& from );          extern void xCVTSD2SI( const xRegister32& to, const xRegisterSSE& from );
450          extern void xCVTSD2SI( const xRegister32& to, const ModSib64& from );          extern void xCVTSD2SI( const xRegister32& to, const xIndirect64& from );
451          extern void xCVTSD2SS( const xRegisterSSE& to, const xRegisterSSE& from );          extern void xCVTSD2SS( const xRegisterSSE& to, const xRegisterSSE& from );
452          extern void xCVTSD2SS( const xRegisterSSE& to, const ModSib64& from );          extern void xCVTSD2SS( const xRegisterSSE& to, const xIndirect64& from );
453          extern void xCVTSI2SD( const xRegisterMMX& to, const xRegister32& from );          extern void xCVTSI2SD( const xRegisterMMX& to, const xRegister32& from );
454          extern void xCVTSI2SD( const xRegisterMMX& to, const ModSib32& from );          extern void xCVTSI2SD( const xRegisterMMX& to, const xIndirect32& from );
455          extern void xCVTSI2SS( const xRegisterSSE& to, const xRegister32& from );          extern void xCVTSI2SS( const xRegisterSSE& to, const xRegister32& from );
456          extern void xCVTSI2SS( const xRegisterSSE& to, const ModSib32& from );          extern void xCVTSI2SS( const xRegisterSSE& to, const xIndirect32& from );
457    
458          extern void xCVTSS2SD( const xRegisterSSE& to, const xRegisterSSE& from );          extern void xCVTSS2SD( const xRegisterSSE& to, const xRegisterSSE& from );
459          extern void xCVTSS2SD( const xRegisterSSE& to, const ModSib32& from );          extern void xCVTSS2SD( const xRegisterSSE& to, const xIndirect32& from );
460          extern void xCVTSS2SI( const xRegister32& to, const xRegisterSSE& from );          extern void xCVTSS2SI( const xRegister32& to, const xRegisterSSE& from );
461          extern void xCVTSS2SI( const xRegister32& to, const ModSib32& from );          extern void xCVTSS2SI( const xRegister32& to, const xIndirect32& from );
462    
463          extern void xCVTTPD2DQ( const xRegisterSSE& to, const xRegisterSSE& from );          extern void xCVTTPD2DQ( const xRegisterSSE& to, const xRegisterSSE& from );
464          extern void xCVTTPD2DQ( const xRegisterSSE& to, const ModSib128& from );          extern void xCVTTPD2DQ( const xRegisterSSE& to, const xIndirect128& from );
465          extern void xCVTTPD2PI( const xRegisterMMX& to, const xRegisterSSE& from );          extern void xCVTTPD2PI( const xRegisterMMX& to, const xRegisterSSE& from );
466          extern void xCVTTPD2PI( const xRegisterMMX& to, const ModSib128& from );          extern void xCVTTPD2PI( const xRegisterMMX& to, const xIndirect128& from );
467          extern void xCVTTPS2DQ( const xRegisterSSE& to, const xRegisterSSE& from );          extern void xCVTTPS2DQ( const xRegisterSSE& to, const xRegisterSSE& from );
468          extern void xCVTTPS2DQ( const xRegisterSSE& to, const ModSib128& from );          extern void xCVTTPS2DQ( const xRegisterSSE& to, const xIndirect128& from );
469          extern void xCVTTPS2PI( const xRegisterMMX& to, const xRegisterSSE& from );          extern void xCVTTPS2PI( const xRegisterMMX& to, const xRegisterSSE& from );
470          extern void xCVTTPS2PI( const xRegisterMMX& to, const ModSib64& from );          extern void xCVTTPS2PI( const xRegisterMMX& to, const xIndirect64& from );
471    
472          extern void xCVTTSD2SI( const xRegister32& to, const xRegisterSSE& from );          extern void xCVTTSD2SI( const xRegister32& to, const xRegisterSSE& from );
473          extern void xCVTTSD2SI( const xRegister32& to, const ModSib64& from );          extern void xCVTTSD2SI( const xRegister32& to, const xIndirect64& from );
474          extern void xCVTTSS2SI( const xRegister32& to, const xRegisterSSE& from );          extern void xCVTTSS2SI( const xRegister32& to, const xRegisterSSE& from );
475          extern void xCVTTSS2SI( const xRegister32& to, const ModSib32& from );          extern void xCVTTSS2SI( const xRegister32& to, const xIndirect32& from );
476    
477          // ------------------------------------------------------------------------          // ------------------------------------------------------------------------
478    

Legend:
Removed from v.61  
changed lines
  Added in v.62

  ViewVC Help
Powered by ViewVC 1.1.22