From dd8666036c76957f671a5740c9ea3276d37093f9 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Mon, 14 Apr 2014 21:02:36 +0200 Subject: [PATCH] pcsx2: sign compare mismatch 3/3 --- pcsx2/Hw.cpp | 2 +- pcsx2/Interpreter.cpp | 2 +- pcsx2/x86/ix86-32/iR5900LoadStore.cpp | 2 +- pcsx2/x86/ix86-32/iR5900Templates.cpp | 2 +- plugins/zzogl-pg/opengl/ZZoglShaders.cpp | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pcsx2/Hw.cpp b/pcsx2/Hw.cpp index 7017c78fdb..2f9b05d79c 100644 --- a/pcsx2/Hw.cpp +++ b/pcsx2/Hw.cpp @@ -157,7 +157,7 @@ __ri bool hwMFIFOWrite(u32 addr, const u128* data, uint qwc) pxAssert((dmacRegs.rbor.ADDR & 15) == 0); pxAssert((addr & 15) == 0); - if(qwc > ((dmacRegs.rbsr.RMSK + 16) >> 4)) DevCon.Warning("MFIFO Write bigger than MFIFO! QWC=%x FifoSize=%x", qwc, ((dmacRegs.rbsr.RMSK + 16) >> 4)); + if(qwc > ((dmacRegs.rbsr.RMSK + 16u) >> 4u)) DevCon.Warning("MFIFO Write bigger than MFIFO! QWC=%x FifoSize=%x", qwc, ((dmacRegs.rbsr.RMSK + 16) >> 4)); // DMAC Address resolution: FIFO can be placed anywhere in the *physical* memory map // for the PS2. Its probably a serious error for a PS2 app to have the buffer cross // valid/invalid page areas of ram, so realistically we only need to test the base address diff --git a/pcsx2/Interpreter.cpp b/pcsx2/Interpreter.cpp index 9744295304..19df3a5e4a 100644 --- a/pcsx2/Interpreter.cpp +++ b/pcsx2/Interpreter.cpp @@ -395,7 +395,7 @@ static void intExecute() while (cpuRegs.pc != EELOAD_START); eeloadReplaceOSDSYS(); } - if (ElfEntry != -1) { + if (ElfEntry != 0xFFFFFFFF) { do execI(); while (cpuRegs.pc != ElfEntry); diff --git a/pcsx2/x86/ix86-32/iR5900LoadStore.cpp b/pcsx2/x86/ix86-32/iR5900LoadStore.cpp index 4a4026e841..9548cf90ea 100644 --- a/pcsx2/x86/ix86-32/iR5900LoadStore.cpp +++ b/pcsx2/x86/ix86-32/iR5900LoadStore.cpp @@ -71,7 +71,7 @@ REC_FUNC(SQC2); __aligned16 u64 retValues[2]; -void _eeOnLoadWrite(int reg) +void _eeOnLoadWrite(u32 reg) { int regt; diff --git a/pcsx2/x86/ix86-32/iR5900Templates.cpp b/pcsx2/x86/ix86-32/iR5900Templates.cpp index 6eff174c3f..1558d3a717 100644 --- a/pcsx2/x86/ix86-32/iR5900Templates.cpp +++ b/pcsx2/x86/ix86-32/iR5900Templates.cpp @@ -106,7 +106,7 @@ void eeRecompileCode0(R5900FNPTR constcode, R5900FNPTR_INFO constscode, R5900FNP _addNeededGPRtoXMMreg(_Rt_); if( GPR_IS_CONST1(_Rs_) || GPR_IS_CONST1(_Rt_) ) { - int creg = GPR_IS_CONST1(_Rs_) ? _Rs_ : _Rt_; + u32 creg = GPR_IS_CONST1(_Rs_) ? _Rs_ : _Rt_; int vreg = creg == _Rs_ ? _Rt_ : _Rs_; // if(g_pCurInstInfo->regs[vreg]&EEINST_XMM) { diff --git a/plugins/zzogl-pg/opengl/ZZoglShaders.cpp b/plugins/zzogl-pg/opengl/ZZoglShaders.cpp index 0a68da3b84..e6601274bc 100644 --- a/plugins/zzogl-pg/opengl/ZZoglShaders.cpp +++ b/plugins/zzogl-pg/opengl/ZZoglShaders.cpp @@ -602,7 +602,7 @@ bool ZZshLoadExtraEffects() SHADERHEADER* header; bool bLoadSuccess = true; - const int vsshaders[4] = { SH_REGULARVS, SH_TEXTUREVS, SH_REGULARFOGVS, SH_TEXTUREFOGVS }; + const u32 vsshaders[4] = { SH_REGULARVS, SH_TEXTUREVS, SH_REGULARFOGVS, SH_TEXTUREFOGVS }; for(int i = 0; i < 4; ++i) { LOAD_VS(vsshaders[i], pvs[2*i]); @@ -690,7 +690,7 @@ FRAGMENTSHADER* ZZshLoadShadeEffect(int type, int texfilter, int fog, int testae else texwrap = TEXWRAP_REPEAT_CLAMP; - int index = GET_SHADER_INDEX(type, texfilter, texwrap, fog, s_bWriteDepth, testaem, exactcolor, context, 0); + u32 index = GET_SHADER_INDEX(type, texfilter, texwrap, fog, s_bWriteDepth, testaem, exactcolor, context, 0); assert( index < ArraySize(ppsTexture) ); FRAGMENTSHADER* pf = ppsTexture+index;