From 4704ac9436c02c798cef7953aa786a4abe8cc85c Mon Sep 17 00:00:00 2001 From: arcum42 Date: Fri, 17 Apr 2009 00:35:55 +0000 Subject: [PATCH] Reduce compiler warnings to a more reasonable level in Linux. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@994 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/x86/ix86/implement/dwshift.h | 6 ++--- pcsx2/x86/ix86/implement/group1.h | 32 +++++++++++++------------- pcsx2/x86/ix86/implement/group2.h | 20 ++++++++--------- pcsx2/x86/ix86/implement/group3.h | 8 +++---- pcsx2/x86/ix86/implement/incdec.h | 6 ++--- pcsx2/x86/ix86/implement/movs.h | 36 +++++++++++++++--------------- 6 files changed, 54 insertions(+), 54 deletions(-) diff --git a/pcsx2/x86/ix86/implement/dwshift.h b/pcsx2/x86/ix86/implement/dwshift.h index 66a1b83088..2ad6e82903 100644 --- a/pcsx2/x86/ix86/implement/dwshift.h +++ b/pcsx2/x86/ix86/implement/dwshift.h @@ -32,7 +32,7 @@ class DwordShiftImpl : public ImplementationHelper< ImmType > protected: static void basesibform( bool isCL ) { - prefix16(); + ImplementationHelper::prefix16(); write8( 0x0f ); write8( (isCL ? 0xa5 : 0xa4) | (isShiftRight ? 0x8 : 0) ); } @@ -42,7 +42,7 @@ public: static __emitinline void Emit( const iRegister& to, const iRegister& from ) { - prefix16(); + ImplementationHelper::prefix16(); write16( 0xa50f | (isShiftRight ? 0x800 : 0) ); ModRM_Direct( from.Id, to.Id ); } @@ -50,7 +50,7 @@ public: static __emitinline void Emit( const iRegister& to, const iRegister& from, u8 imm ) { if( imm == 0 ) return; - prefix16(); + ImplementationHelper::prefix16(); write16( 0xa40f | (isShiftRight ? 0x800 : 0) ); ModRM_Direct( from.Id, to.Id ); write8( imm ); diff --git a/pcsx2/x86/ix86/implement/group1.h b/pcsx2/x86/ix86/implement/group1.h index 2837960f73..13215ebfb1 100644 --- a/pcsx2/x86/ix86/implement/group1.h +++ b/pcsx2/x86/ix86/implement/group1.h @@ -42,43 +42,43 @@ public: static __emitinline void Emit( const iRegister& to, const iRegister& from ) { - prefix16(); - iWrite( (Is8BitOperand() ? 0 : 1) | (InstType<<3) ); + ImplementationHelper::prefix16(); + iWrite( (ImplementationHelper::Is8BitOperand() ? 0 : 1) | (InstType<<3) ); ModRM_Direct( from.Id, to.Id ); } static __emitinline void Emit( const ModSibBase& sibdest, const iRegister& from ) { - prefix16(); - iWrite( (Is8BitOperand() ? 0 : 1) | (InstType<<3) ); + ImplementationHelper::prefix16(); + iWrite( (ImplementationHelper::Is8BitOperand() ? 0 : 1) | (InstType<<3) ); EmitSibMagic( from.Id, sibdest ); } static __emitinline void Emit( const iRegister& to, const ModSibBase& sibsrc ) { - prefix16(); - iWrite( (Is8BitOperand() ? 2 : 3) | (InstType<<3) ); + ImplementationHelper::prefix16(); + iWrite( (ImplementationHelper::Is8BitOperand() ? 2 : 3) | (InstType<<3) ); EmitSibMagic( to.Id, sibsrc ); } static __emitinline void Emit( void* dest, const iRegister& from ) { - prefix16(); - iWrite( (Is8BitOperand() ? 0 : 1) | (InstType<<3) ); + ImplementationHelper::prefix16(); + iWrite( (ImplementationHelper::Is8BitOperand() ? 0 : 1) | (InstType<<3) ); iWriteDisp( from.Id, dest ); } static __emitinline void Emit( const iRegister& to, const void* src ) { - prefix16(); - iWrite( (Is8BitOperand() ? 2 : 3) | (InstType<<3) ); + ImplementationHelper::prefix16(); + iWrite( (ImplementationHelper::Is8BitOperand() ? 2 : 3) | (InstType<<3) ); iWriteDisp( to.Id, src ); } static __emitinline void Emit( const iRegister& to, int imm ) { - prefix16(); - if( !Is8BitOperand() && is_s8( imm ) ) + ImplementationHelper::prefix16(); + if( !ImplementationHelper::Is8BitOperand() && is_s8( imm ) ) { iWrite( 0x83 ); ModRM_Direct( InstType, to.Id ); @@ -87,10 +87,10 @@ public: else { if( to.IsAccumulator() ) - iWrite( (Is8BitOperand() ? 4 : 5) | (InstType<<3) ); + iWrite( (ImplementationHelper::Is8BitOperand() ? 4 : 5) | (InstType<<3) ); else { - iWrite( Is8BitOperand() ? 0x80 : 0x81 ); + iWrite( ImplementationHelper::Is8BitOperand() ? 0x80 : 0x81 ); ModRM_Direct( InstType, to.Id ); } iWrite( imm ); @@ -99,7 +99,7 @@ public: static __emitinline void Emit( const ModSibStrict& sibdest, int imm ) { - if( Is8BitOperand() ) + if( ImplementationHelper::Is8BitOperand() ) { iWrite( 0x80 ); EmitSibMagic( InstType, sibdest ); @@ -107,7 +107,7 @@ public: } else { - prefix16(); + ImplementationHelper::prefix16(); iWrite( is_s8( imm ) ? 0x83 : 0x81 ); EmitSibMagic( InstType, sibdest ); if( is_s8( imm ) ) diff --git a/pcsx2/x86/ix86/implement/group2.h b/pcsx2/x86/ix86/implement/group2.h index 74979f8c91..f4153378d9 100644 --- a/pcsx2/x86/ix86/implement/group2.h +++ b/pcsx2/x86/ix86/implement/group2.h @@ -46,8 +46,8 @@ public: static __emitinline void Emit( const iRegister& to ) { - prefix16(); - iWrite( Is8BitOperand() ? 0xd2 : 0xd3 ); + ImplementationHelper::prefix16(); + iWrite( ImplementationHelper::Is8BitOperand() ? 0xd2 : 0xd3 ); ModRM_Direct( InstType, to.Id ); } @@ -55,16 +55,16 @@ public: { if( imm == 0 ) return; - prefix16(); + ImplementationHelper::prefix16(); if( imm == 1 ) { // special encoding of 1's - iWrite( Is8BitOperand() ? 0xd0 : 0xd1 ); + iWrite( ImplementationHelper::Is8BitOperand() ? 0xd0 : 0xd1 ); ModRM_Direct( InstType, to.Id ); } else { - iWrite( Is8BitOperand() ? 0xc0 : 0xc1 ); + iWrite( ImplementationHelper::Is8BitOperand() ? 0xc0 : 0xc1 ); ModRM_Direct( InstType, to.Id ); iWrite( imm ); } @@ -72,8 +72,8 @@ public: static __emitinline void Emit( const ModSibStrict& sibdest ) { - prefix16(); - iWrite( Is8BitOperand() ? 0xd2 : 0xd3 ); + ImplementationHelper::prefix16(); + iWrite( ImplementationHelper::Is8BitOperand() ? 0xd2 : 0xd3 ); EmitSibMagic( InstType, sibdest ); } @@ -81,16 +81,16 @@ public: { if( imm == 0 ) return; - prefix16(); + ImplementationHelper::prefix16(); if( imm == 1 ) { // special encoding of 1's - iWrite( Is8BitOperand() ? 0xd0 : 0xd1 ); + iWrite( ImplementationHelper::Is8BitOperand() ? 0xd0 : 0xd1 ); EmitSibMagic( InstType, sibdest ); } else { - iWrite( Is8BitOperand() ? 0xc0 : 0xc1 ); + iWrite( ImplementationHelper::Is8BitOperand() ? 0xc0 : 0xc1 ); EmitSibMagic( InstType, sibdest ); iWrite( imm ); } diff --git a/pcsx2/x86/ix86/implement/group3.h b/pcsx2/x86/ix86/implement/group3.h index 362b0186b8..41b4cdc625 100644 --- a/pcsx2/x86/ix86/implement/group3.h +++ b/pcsx2/x86/ix86/implement/group3.h @@ -39,15 +39,15 @@ public: static __emitinline void Emit( G3Type InstType, const iRegister& from ) { - prefix16(); - iWrite( Is8BitOperand() ? 0xf6 : 0xf7 ); + ImplementationHelper::prefix16(); + iWrite(ImplementationHelper::Is8BitOperand() ? 0xf6 : 0xf7 ); ModRM_Direct( InstType, from.Id ); } static __emitinline void Emit( G3Type InstType, const ModSibStrict& sibsrc ) { - prefix16(); - iWrite( Is8BitOperand() ? 0xf6 : 0xf7 ); + ImplementationHelper::prefix16(); + iWrite( ImplementationHelper::Is8BitOperand() ? 0xf6 : 0xf7 ); EmitSibMagic( InstType, sibsrc ); } }; diff --git a/pcsx2/x86/ix86/implement/incdec.h b/pcsx2/x86/ix86/implement/incdec.h index 0cf5a08c62..1570aa3768 100644 --- a/pcsx2/x86/ix86/implement/incdec.h +++ b/pcsx2/x86/ix86/implement/incdec.h @@ -31,21 +31,21 @@ public: { // There is no valid 8-bit form of direct register inc/dec, so fall // back on Mod/RM format instead: - if( Is8BitOperand() ) + if (ImplementationHelper::Is8BitOperand() ) { write8( 0xfe ); ModRM_Direct( isDec ? 1 : 0, to.Id ); } else { - prefix16(); + ImplementationHelper::prefix16(); write8( (isDec ? 0x48 : 0x40) | to.Id ); } } static __emitinline void Emit( bool isDec, const ModSibStrict& dest ) { - write8( Is8BitOperand() ? 0xfe : 0xff ); + write8( ImplementationHelper::Is8BitOperand() ? 0xfe : 0xff ); EmitSibMagic( isDec ? 1: 0, dest ); } }; diff --git a/pcsx2/x86/ix86/implement/movs.h b/pcsx2/x86/ix86/implement/movs.h index 1e079bc87d..7ac0dee7bf 100644 --- a/pcsx2/x86/ix86/implement/movs.h +++ b/pcsx2/x86/ix86/implement/movs.h @@ -33,27 +33,27 @@ public: { if( to == from ) return; // ignore redundant MOVs. - prefix16(); - iWrite( Is8BitOperand() ? 0x88 : 0x89 ); + ImplementationHelper::prefix16(); + iWrite( ImplementationHelper::Is8BitOperand() ? 0x88 : 0x89 ); ModRM( 3, from.Id, to.Id ); } // ------------------------------------------------------------------------ static __forceinline void Emit( const ModSibBase& dest, const iRegister& from ) { - prefix16(); + ImplementationHelper::prefix16(); // mov eax has a special from when writing directly to a DISP32 address // (sans any register index/base registers). if( from.IsAccumulator() && dest.Index.IsEmpty() && dest.Base.IsEmpty() ) { - iWrite( Is8BitOperand() ? 0xa2 : 0xa3 ); + iWrite( ImplementationHelper::Is8BitOperand() ? 0xa2 : 0xa3 ); iWrite( dest.Displacement ); } else { - iWrite( Is8BitOperand() ? 0x88 : 0x89 ); + iWrite( ImplementationHelper::Is8BitOperand() ? 0x88 : 0x89 ); EmitSibMagic( from.Id, dest ); } } @@ -61,19 +61,19 @@ public: // ------------------------------------------------------------------------ static __forceinline void Emit( const iRegister& to, const ModSibBase& src ) { - prefix16(); + ImplementationHelper::prefix16(); // mov eax has a special from when reading directly from a DISP32 address // (sans any register index/base registers). if( to.IsAccumulator() && src.Index.IsEmpty() && src.Base.IsEmpty() ) { - iWrite( Is8BitOperand() ? 0xa0 : 0xa1 ); + iWrite( ImplementationHelper::Is8BitOperand() ? 0xa0 : 0xa1 ); iWrite( src.Displacement ); } else { - iWrite( Is8BitOperand() ? 0x8a : 0x8b ); + iWrite( ImplementationHelper::Is8BitOperand() ? 0x8a : 0x8b ); EmitSibMagic( to.Id, src ); } } @@ -81,18 +81,18 @@ public: // ------------------------------------------------------------------------ static __forceinline void Emit( void* dest, const iRegister& from ) { - prefix16(); + ImplementationHelper::prefix16(); // mov eax has a special from when writing directly to a DISP32 address if( from.IsAccumulator() ) { - iWrite( Is8BitOperand() ? 0xa2 : 0xa3 ); + iWrite( ImplementationHelper::Is8BitOperand() ? 0xa2 : 0xa3 ); iWrite( (s32)dest ); } else { - iWrite( Is8BitOperand() ? 0x88 : 0x89 ); + iWrite( ImplementationHelper::Is8BitOperand() ? 0x88 : 0x89 ); iWriteDisp( from.Id, dest ); } } @@ -100,18 +100,18 @@ public: // ------------------------------------------------------------------------ static __forceinline void Emit( const iRegister& to, const void* src ) { - prefix16(); + ImplementationHelper::prefix16(); // mov eax has a special from when reading directly from a DISP32 address if( to.IsAccumulator() ) { - iWrite( Is8BitOperand() ? 0xa0 : 0xa1 ); + iWrite( ImplementationHelper::Is8BitOperand() ? 0xa0 : 0xa1 ); iWrite( (s32)src ); } else { - iWrite( Is8BitOperand() ? 0x8a : 0x8b ); + iWrite( ImplementationHelper::Is8BitOperand() ? 0x8a : 0x8b ); iWriteDisp( to.Id, src ); } } @@ -121,16 +121,16 @@ public: { // Note: MOV does not have (reg16/32,imm8) forms. - prefix16(); - iWrite( (Is8BitOperand() ? 0xb0 : 0xb8) | to.Id ); + ImplementationHelper::prefix16(); + iWrite( (ImplementationHelper::Is8BitOperand() ? 0xb0 : 0xb8) | to.Id ); iWrite( imm ); } // ------------------------------------------------------------------------ static __forceinline void Emit( ModSibStrict dest, ImmType imm ) { - prefix16(); - iWrite( Is8BitOperand() ? 0xc6 : 0xc7 ); + ImplementationHelper::prefix16(); + iWrite( ImplementationHelper::Is8BitOperand() ? 0xc6 : 0xc7 ); EmitSibMagic( 0, dest ); iWrite( imm ); }