Commit 595af1a2 authored by Jan Holthuis's avatar Jan Holthuis
Browse files

Merge pull request #753 from reicast/holzhaus/small-code-fixes

Fix some compiler warnings
parents f6c167b2 5ab3d7b5
......@@ -216,7 +216,7 @@ void DYNACALL WriteMem_area0(u32 addr,T data)
const u32 base=(addr>>16);
//map 0x0000 to 0x001F
if ((base >=0x0000) && (base <=0x001F) /*&& (addr<=0x001FFFFF)*/)// :MPX System/Boot ROM
if ((base <=0x001F) /*&& (addr<=0x001FFFFF)*/)// :MPX System/Boot ROM
{
//EMUERROR4("Write to [MPX System/Boot ROM] is not possible, addr=%x,data=%x,size=%d",addr,data,sz);
WriteBios(addr,data,sz);
......
......@@ -1178,7 +1178,7 @@ _end:
//Small-n-simple idle loop detector :p
if (state.info.has_readm && !state.info.has_writem && !state.info.has_fpu && blk->guest_opcodes<6)
{
if (blk->BlockType==BET_Cond_0 || blk->BlockType==BET_Cond_1 && blk->BranchBlock<=blk->addr)
if (blk->BlockType==BET_Cond_0 || (blk->BlockType==BET_Cond_1 && blk->BranchBlock<=blk->addr))
{
blk->guest_cycles*=3;
}
......
......@@ -697,7 +697,7 @@ void dejcond(RuntimeBlockInfo* blk)
if (found)
{
if (op->rd.is_reg() && op->rd._reg==reg_sr_T || op->op==shop_ifb)
if ((op->rd.is_reg() && op->rd._reg==reg_sr_T) || op->op==shop_ifb)
{
found=false;
}
......@@ -840,9 +840,9 @@ void srt_waw(RuntimeBlockInfo* blk)
if (found)
{
if (op->rs1.is_reg() && op->rs1._reg==reg_sr_T
|| op->rs2.is_reg() && op->rs2._reg==reg_sr_T
|| op->rs3.is_reg() && op->rs3._reg==reg_sr_T
if ((op->rs1.is_reg() && op->rs1._reg==reg_sr_T)
|| (op->rs2.is_reg() && op->rs2._reg==reg_sr_T)
|| (op->rs3.is_reg() && op->rs3._reg==reg_sr_T)
|| op->op==shop_ifb)
{
found=false;
......
......@@ -177,7 +177,7 @@ public:
mov(call_regs[0], op.rs3._imm);
call(OpDesc[op.rs3._imm]->oph);
call((void*)OpDesc[op.rs3._imm]->oph);
break;
case shop_jcond:
......@@ -228,19 +228,19 @@ public:
u32 size = op.flags & 0x7f;
if (size == 1) {
call(ReadMem8);
call((void*)ReadMem8);
movsx(rcx, al);
}
else if (size == 2) {
call(ReadMem16);
call((void*)ReadMem16);
movsx(rcx, ax);
}
else if (size == 4) {
call(ReadMem32);
call((void*)ReadMem32);
mov(rcx, rax);
}
else if (size == 8) {
call(ReadMem64);
call((void*)ReadMem64);
mov(rcx, rax);
}
else {
......@@ -266,13 +266,13 @@ public:
sh_to_reg(op.rs2, mov, call_regs64[1]);
if (size == 1)
call(WriteMem8);
call((void*)WriteMem8);
else if (size == 2)
call(WriteMem16);
call((void*)WriteMem16);
else if (size == 4)
call(WriteMem32);
call((void*)WriteMem32);
else if (size == 8)
call(WriteMem64);
call((void*)WriteMem64);
else {
die("1..8 bytes");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment