diff options
author | 2018-07-06 16:11:13 +0700 | |
---|---|---|
committer | 2018-07-06 11:11:13 +0200 | |
commit | 06700b3c52df0134dc1b159cfba5712d1d9568d4 (patch) | |
tree | ad692f1653671fb1198dc57dcf92561356dc4a12 /src/devices/cpu/clipper/clipper.cpp | |
parent | f3ccd1f7f2fa8d8eef77a8ef1cfd69398e3a21fb (diff) |
clipper: minor bugfix (nw) (#3731)
This enables SoftPC to run.
Diffstat (limited to 'src/devices/cpu/clipper/clipper.cpp')
-rw-r--r-- | src/devices/cpu/clipper/clipper.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/devices/cpu/clipper/clipper.cpp b/src/devices/cpu/clipper/clipper.cpp index adddfff71e5..4a6217eadd3 100644 --- a/src/devices/cpu/clipper/clipper.cpp +++ b/src/devices/cpu/clipper/clipper.cpp @@ -1265,12 +1265,12 @@ void clipper_device::execute_instruction() // saved0..saved7: push registers fN:f7 // store fi at sp - 8 * (8 - i) - for (int i = R2; i < 8 && !m_exception; i++) + for (int i = m_info.subopcode & 0x7; i < 8 && !m_exception; i++) get_dcammu().store<float64>(m_ssw, m_r[15] - 8 * (8 - i), get_fp64(i)); // decrement sp after push to allow restart on exceptions if (!m_exception) - m_r[15] -= 8 * (8 - R2); + m_r[15] -= 8 * (8 - m_info.subopcode & 0x7); // TRAPS: A,P,W break; case 0x28: case 0x29: case 0x2a: case 0x2b: @@ -1278,12 +1278,12 @@ void clipper_device::execute_instruction() // restd0..restd7: pop registers fN:f7 // load fi from sp + 8 * (i - N) - for (int i = R2; i < 8 && !m_exception; i++) - get_dcammu().load<float64>(m_ssw, m_r[15] + 8 * (i - R2), [this, i](float64 v) { set_fp(i, v, F_NONE); }); + for (int i = m_info.subopcode & 0x7; i < 8 && !m_exception; i++) + get_dcammu().load<float64>(m_ssw, m_r[15] + 8 * (i - m_info.subopcode & 0x7), [this, i](float64 v) { set_fp(i, v, F_NONE); }); // increment sp after pop to allow restart on exceptions if (!m_exception) - m_r[15] += 8 * (8 - R2); + m_r[15] += 8 * (8 - m_info.subopcode & 0x7); // TRAPS: C,U,A,P,R break; case 0x30: |