From 658079af557b76b1d9379fd478b633a7d08c96ec Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Fri, 2 Jan 2015 15:32:54 +0300 Subject: [PATCH] Compilation fix 2 --- rpcs3/Emu/ARMv7/ARMv7Interpreter.cpp | 4 +++- rpcs3/Emu/SysCalls/lv2/sys_cond.cpp | 2 +- rpcs3/Emu/SysCalls/lv2/sys_lwcond.cpp | 2 +- rpcs3/Emu/SysCalls/lv2/sys_rwlock.cpp | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/ARMv7/ARMv7Interpreter.cpp b/rpcs3/Emu/ARMv7/ARMv7Interpreter.cpp index fb56e1a8eb..aa963e583b 100644 --- a/rpcs3/Emu/ARMv7/ARMv7Interpreter.cpp +++ b/rpcs3/Emu/ARMv7/ARMv7Interpreter.cpp @@ -169,6 +169,7 @@ template T ARMv7_instrs::Shift_C(T value, SRType type, s32 amount, b case SRType_ASR: return ASR_C(value, amount, carry_out); case SRType_ROR: return ROR_C(value, amount, carry_out); case SRType_RRX: return RRX_C(value, carry_in, carry_out); + default: throw __FUNCTION__; } } @@ -710,6 +711,7 @@ void ARMv7_instrs::B(ARMv7Thread* thr, const ARMv7_encoding type) jump = 1 + 4 + sign<26, u32>((thr->code.data & 0xffffff) << 2); break; } + default: throw __FUNCTION__; } if (ConditionPassed(thr, cond)) @@ -1410,7 +1412,7 @@ void ARMv7_instrs::LSL_IMM(ARMv7Thread* thr, const ARMv7_encoding type) if (ConditionPassed(thr, cond)) { bool carry; - const u32 res = Shift_C(thr->read_gpr(m), SRType_LSL, shift_n, thr->APSR.C, carry); + const u32 res = Shift_C(thr->read_gpr(m), SRType_LSL, shift_n, thr->APSR.C, carry); thr->write_gpr(d, res); if (set_flags) { diff --git a/rpcs3/Emu/SysCalls/lv2/sys_cond.cpp b/rpcs3/Emu/SysCalls/lv2/sys_cond.cpp index ca44d4f0b8..580fbc2fa6 100644 --- a/rpcs3/Emu/SysCalls/lv2/sys_cond.cpp +++ b/rpcs3/Emu/SysCalls/lv2/sys_cond.cpp @@ -152,7 +152,7 @@ s32 sys_cond_wait(PPUThread& CPU, u32 cond_id, u64 timeout) bool pushed_in_sleep_queue = false, signaled = false; while (true) { - if (signaled = signaled || cond->queue.pop(tid, mutex->protocol)) // check if signaled + if ((signaled = signaled || cond->queue.pop(tid, mutex->protocol))) // check if signaled { if (mutex->owner.compare_and_swap_test(0, tid)) // try to lock { diff --git a/rpcs3/Emu/SysCalls/lv2/sys_lwcond.cpp b/rpcs3/Emu/SysCalls/lv2/sys_lwcond.cpp index fac0f91ac3..6670f797e6 100644 --- a/rpcs3/Emu/SysCalls/lv2/sys_lwcond.cpp +++ b/rpcs3/Emu/SysCalls/lv2/sys_lwcond.cpp @@ -169,7 +169,7 @@ s32 sys_lwcond_wait(PPUThread& CPU, vm::ptr lwcond, u64 timeout) bool signaled = false; while (true) { - if (signaled = signaled || lw->queue.pop(tid, mutex->attribute)) // check signaled threads + if ((signaled = signaled || lw->queue.pop(tid, mutex->attribute))) // check signaled threads { s32 res = mutex->lock(tid, timeout ? get_system_time() - start_time : 0); // this is bad if (res == CELL_OK) diff --git a/rpcs3/Emu/SysCalls/lv2/sys_rwlock.cpp b/rpcs3/Emu/SysCalls/lv2/sys_rwlock.cpp index bf89dc723d..d1b17416e4 100644 --- a/rpcs3/Emu/SysCalls/lv2/sys_rwlock.cpp +++ b/rpcs3/Emu/SysCalls/lv2/sys_rwlock.cpp @@ -49,7 +49,7 @@ s32 sys_rwlock_destroy(u32 rw_lock_id) return CELL_ESRCH; } - if (!rw->sync.compare_and_swap_test({ 0, 0 }, { ~0, ~0 })) // check if locked and make unusable + if (!rw->sync.compare_and_swap_test({ 0, 0 }, { ~0u, ~0u })) // check if locked and make unusable { return CELL_EBUSY; }