summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/mb86233/mb86233.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/mb86233/mb86233.cpp')
-rw-r--r--src/devices/cpu/mb86233/mb86233.cpp37
1 files changed, 19 insertions, 18 deletions
diff --git a/src/devices/cpu/mb86233/mb86233.cpp b/src/devices/cpu/mb86233/mb86233.cpp
index 6a5451c0095..28fba63498e 100644
--- a/src/devices/cpu/mb86233/mb86233.cpp
+++ b/src/devices/cpu/mb86233/mb86233.cpp
@@ -256,18 +256,6 @@ void mb86233_device::pcs_pop()
m_pcs[i] = m_pcs[i+1];
}
-void mb86233_device::testdz()
-{
- if(m_d)
- m_st &= ~F_ZRD;
- else
- m_st |= F_ZRD;
- if(m_d & 0x80000000)
- m_st |= F_SGD;
- else
- m_st &= ~F_SGD;
-}
-
void mb86233_device::stset_set_sz_int(u32 val)
{
m_alu_stset = val ? (val & 0x80000000 ? F_SGD : 0) : F_ZRD;
@@ -324,7 +312,7 @@ void mb86233_device::alu_pre(u32 alu)
}
case 0x06: {
- // fmad
+ // fadd
m_alu_stmask = F_ZRD|F_SGD|F_CPD|F_OVD|F_DVZD;
m_alu_r1 = f2u(u2f(m_d) + u2f(m_a));
stset_set_sz_fp(m_alu_r1);
@@ -676,9 +664,9 @@ void mb86233_device::write_reg(u32 r, u32 v)
case 0x14: m_b = set_exp(m_b, v); break;
case 0x15: m_b = set_mant(m_b, v); break;
/* c */
- case 0x19: m_d = v; testdz(); break;
- case 0x1a: m_d = set_exp(m_d, v); testdz(); break;
- case 0x1b: m_d = set_mant(m_d, v); testdz(); break;
+ case 0x19: m_d = v; break;
+ case 0x1a: m_d = set_exp(m_d, v); break;
+ case 0x1b: m_d = set_mant(m_d, v); break;
case 0x1c: m_p = v; break;
case 0x1d: m_p = set_exp(m_p, v); break;
case 0x1e: m_p = set_mant(m_p, v); break;
@@ -812,6 +800,7 @@ void mb86233_device::execute_run()
u32 v = m_data.read_dword(ea);
if(m_stall) goto do_stall;
ea_post_0(r1);
+ alu_post(alu);
write_mem_io_1(r2, v);
break;
}
@@ -822,6 +811,7 @@ void mb86233_device::execute_run()
u32 v = m_data.read_dword(ea);
if(m_stall) goto do_stall;
ea_post_0(r1);
+ alu_post(alu);
write_mem_io_1(r2, v);
break;
}
@@ -832,6 +822,7 @@ void mb86233_device::execute_run()
u32 v = m_io.read_dword(ea);
if(m_stall) goto do_stall;
ea_post_0(r1);
+ alu_post(alu);
write_mem_internal_1(r2, v, false);
break;
}
@@ -842,6 +833,7 @@ void mb86233_device::execute_run()
u32 v = m_data.read_dword(ea);
if(m_stall) goto do_stall;
ea_post_0(r1);
+ alu_post(alu);
write_mem_internal_1(r2, v, true);
break;
}
@@ -852,6 +844,7 @@ void mb86233_device::execute_run()
u32 v = m_data.read_dword(ea);
if(m_stall) goto do_stall;
ea_post_0(r1);
+ alu_post(alu);
write_mem_internal_1(r2, v, false);
break;
}
@@ -862,6 +855,7 @@ void mb86233_device::execute_run()
u32 v = m_program.read_dword(ea);
if(m_stall) goto do_stall;
ea_post_0(r1);
+ alu_post(alu);
write_mem_internal_1(r2, v, false);
break;
}
@@ -872,6 +866,7 @@ void mb86233_device::execute_run()
// mov reg, mem
u32 v = read_reg(r2);
if(m_stall) goto do_stall;
+ alu_post(alu);
write_mem_internal_1(r1, v, false);
break;
}
@@ -880,6 +875,7 @@ void mb86233_device::execute_run()
// mov reg, mem (e)
u32 v = read_reg(r2);
if(m_stall) goto do_stall;
+ alu_post(alu);
write_mem_io_1(r1, v);
break;
}
@@ -890,6 +886,7 @@ void mb86233_device::execute_run()
u32 v = m_data.read_dword(ea);
if(m_stall) goto do_stall;
ea_post_1(r1);
+ alu_post(alu);
write_reg(r2, v);
break;
}
@@ -900,6 +897,7 @@ void mb86233_device::execute_run()
u32 v = m_data.read_dword(ea);
if(m_stall) goto do_stall;
ea_post_1(r1);
+ alu_post(alu);
write_reg(r2, v);
break;
}
@@ -910,6 +908,7 @@ void mb86233_device::execute_run()
u32 v = m_io.read_dword(ea);
if(m_stall) goto do_stall;
ea_post_1(r1);
+ alu_post(alu);
write_reg(r2, v);
break;
}
@@ -920,6 +919,7 @@ void mb86233_device::execute_run()
u32 v = m_program.read_dword(ea);
if(m_stall) goto do_stall;
ea_post_0(r1);
+ alu_post(alu);
write_reg(r2, v);
break;
}
@@ -928,11 +928,13 @@ void mb86233_device::execute_run()
// mov reg, reg
u32 v = read_reg(r1);
if(m_stall) goto do_stall;
+ alu_post(alu);
write_reg(r2, v);
break;
}
default:
+ alu_post(alu);
logerror("unhandled ld/mov subop 7/%x (%x)\n", r2 >> 6, m_ppc);
break;
}
@@ -940,11 +942,11 @@ void mb86233_device::execute_run()
}
default:
+ alu_post(alu);
logerror("unhandled ld/mov subop %x (%x)\n", op, m_ppc);
break;
}
- alu_post(alu);
break;
}
@@ -983,7 +985,6 @@ void mb86233_device::execute_run()
break;
case 3:
m_d = util::sext(opcode, 24);
- testdz();
break;
}
break;