summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/sh
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2023-03-11 20:16:38 -0500
committer AJR <ajrhacker@users.noreply.github.com>2023-03-11 20:40:39 -0500
commit445e9e20aa6db377236a05d5ab034b2d766d7f2a (patch)
tree220435dc2e1838270adebe1383da48b263686942 /src/devices/cpu/sh
parent671434f7dac6a38a54a41417a994b7b8f47f6b49 (diff)
Interrupt callback rationalization
- Make CPUs pass interrupt return PC as a second argument to standard_irq_callback - Add interrupt return PC to "Stopped at interrupt" message produced by debugger 'gint' command - Add messages to trace logs whenever interrupts are accepted - Attempt to step over interrupt routines for applicable debugger commands - Eliminate standard_irq_callback_member wrapper method - Update many CPU cores to invoke standard_irq_callback at the start of or during interrupt processing, rather than at the end or when the input line changes - Remove IRQ callbacks for some input lines that never cause interrupts - mb88xx, mcs48: Add IRQ callbacks for internal interrupts
Diffstat (limited to 'src/devices/cpu/sh')
-rw-r--r--src/devices/cpu/sh/sh2.cpp4
-rw-r--r--src/devices/cpu/sh/sh4comn.cpp10
2 files changed, 7 insertions, 7 deletions
diff --git a/src/devices/cpu/sh/sh2.cpp b/src/devices/cpu/sh/sh2.cpp
index c117afadbe0..5da515fe422 100644
--- a/src/devices/cpu/sh/sh2.cpp
+++ b/src/devices/cpu/sh/sh2.cpp
@@ -801,12 +801,12 @@ void sh2_device::sh2_exception(const char *message, int irqline)
{
if(m_vecmd == true)
{
- vector = standard_irq_callback(irqline);
+ vector = standard_irq_callback(irqline, m_sh2_state->pc);
LOG("SH-2 exception #%d (external vector: $%x) after [%s]\n", irqline, vector, message);
}
else
{
- standard_irq_callback(irqline);
+ standard_irq_callback(irqline, m_sh2_state->pc);
vector = 64 + irqline/2;
LOG("SH-2 exception #%d (autovector: $%x) after [%s]\n", irqline, vector, message);
}
diff --git a/src/devices/cpu/sh/sh4comn.cpp b/src/devices/cpu/sh/sh4comn.cpp
index ca7f42dc766..b43d8b1d5c0 100644
--- a/src/devices/cpu/sh/sh4comn.cpp
+++ b/src/devices/cpu/sh/sh4comn.cpp
@@ -409,7 +409,7 @@ void sh34_base_device::sh4_exception(const char *message, int exception) // hand
vector = 0x600;
- standard_irq_callback(INPUT_LINE_NMI);
+ standard_irq_callback(INPUT_LINE_NMI, m_sh2_state->pc);
LOG(("SH-4 '%s' nmi exception after [%s]\n", tag(), message));
} else {
// if ((m_m[ICR] & 0x4000) && (m_nmi_line_state == ASSERT_LINE))
@@ -421,9 +421,9 @@ void sh34_base_device::sh4_exception(const char *message, int exception) // hand
m_m[INTEVT] = exception_codes[exception];
vector = 0x600;
if ((exception >= SH4_INTC_IRL0) && (exception <= SH4_INTC_IRL3))
- standard_irq_callback((exception-SH4_INTC_IRL0)+SH4_IRL0);
+ standard_irq_callback((exception-SH4_INTC_IRL0)+SH4_IRL0, m_sh2_state->pc);
else
- standard_irq_callback(SH4_IRL3+1);
+ standard_irq_callback(SH4_IRL3+1, m_sh2_state->pc);
LOG(("SH-4 '%s' interrupt exception #%d after [%s]\n", tag(), exception, message));
}
}
@@ -448,9 +448,9 @@ void sh34_base_device::sh4_exception(const char *message, int exception) // hand
vector = 0x600;
if ((exception >= SH4_INTC_IRL0) && (exception <= SH4_INTC_IRL3))
- standard_irq_callback((exception-SH4_INTC_IRL0)+SH4_IRL0);
+ standard_irq_callback((exception-SH4_INTC_IRL0)+SH4_IRL0, m_sh2_state->pc);
else
- standard_irq_callback(SH4_IRL3+1);
+ standard_irq_callback(SH4_IRL3+1, m_sh2_state->pc);
if (sh3_intevt2_exception_codes[exception]==-1)
fatalerror("sh3_intevt2_exception_codes unpopulated for exception %02x\n", exception);