From 5b920549236a6f0aa3273cb0ffe727cc805f98c0 Mon Sep 17 00:00:00 2001 From: "Jake.Stine" Date: Sun, 4 Oct 2009 21:49:23 +0000 Subject: [PATCH] Better fix for zmuldefs. Less warnings in MSVC and GCC both. :) git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1957 96395faa-99c1-11dd-bbfe-3dabce05a288 --- common/include/x86emitter/x86types.h | 4 ++-- common/src/Utilities/Linux/LnxMisc.cpp | 7 +++++-- pcsx2/x86/iVif.cpp | 8 +++++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/common/include/x86emitter/x86types.h b/common/include/x86emitter/x86types.h index 7b8d16a663..379d34f645 100644 --- a/common/include/x86emitter/x86types.h +++ b/common/include/x86emitter/x86types.h @@ -379,8 +379,8 @@ __forceinline void xWrite( T val ) return *this; } - __forceinline inline ModSibBase operator+( const s32 imm ) const { return ModSibBase( *this ).Add( imm ); } - __forceinline inline ModSibBase operator-( const s32 imm ) const { return ModSibBase( *this ).Add( -imm ); } + __forceinline ModSibBase operator+( const s32 imm ) const { return ModSibBase( *this ).Add( imm ); } + __forceinline ModSibBase operator-( const s32 imm ) const { return ModSibBase( *this ).Add( -imm ); } protected: void Reduce(); diff --git a/common/src/Utilities/Linux/LnxMisc.cpp b/common/src/Utilities/Linux/LnxMisc.cpp index 0b5f00b8b4..60cb8f6882 100644 --- a/common/src/Utilities/Linux/LnxMisc.cpp +++ b/common/src/Utilities/Linux/LnxMisc.cpp @@ -19,8 +19,11 @@ #include #include -extern "C" PCSX2_ALIGNED16( u8 _xmm_backup[16*2] ) = {0}; -extern "C" PCSX2_ALIGNED16( u8 _mmx_backup[8*4] ) = {0}; +extern "C" PCSX2_ALIGNED16( u8 _xmm_backup[16*2] ); +extern "C" PCSX2_ALIGNED16( u8 _mmx_backup[8*4] ); + +u8 _xmm_backup[16*2]; +u8 _mmx_backup[8*4]; void InitCPUTicks() { diff --git a/pcsx2/x86/iVif.cpp b/pcsx2/x86/iVif.cpp index 3064e10a5e..dfd8555e7f 100644 --- a/pcsx2/x86/iVif.cpp +++ b/pcsx2/x86/iVif.cpp @@ -1,6 +1,6 @@ /* PCSX2 - PS2 Emulator for PCs * Copyright (C) 2002-2009 PCSX2 Dev Team - * + * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- * ation, either version 3 of the License, or (at your option) any later version. @@ -49,7 +49,9 @@ static PCSX2_ALIGNED16(u32 s_maskarr[16][4]) = { extern u8 s_maskwrite[256]; -extern "C" PCSX2_ALIGNED16(u32 s_TempDecompress[4]) = {0}; +extern "C" PCSX2_ALIGNED16(u32 s_TempDecompress[4]); + +u32 s_TempDecompress[4] = {0}; #ifdef __LINUX__ static void __forceinline UseOldMaskCode(u32* &vif1masks, u32 &mask); @@ -65,7 +67,7 @@ void __fastcall SetNewMask(u32* vif1masks, u32* hasmask, u32 mask, u32 oldmask) prev |= s_maskwrite[mask&0xff]; hasmask[i] = prev; - if ((mask&0xff) != (oldmask&0xff)) + if ((mask&0xff) != (oldmask&0xff)) #ifdef __LINUX__ if (mask == 0) // Temporary workaround for a bug causing a segfault. UseOldMaskCode(vif1masks, mask);