diff options
author | 2025-04-01 03:45:36 +1100 | |
---|---|---|
committer | 2025-04-01 03:45:36 +1100 | |
commit | 1dca832b37381dab515452b9be6dfa4820e8cadb (patch) | |
tree | 14a8b92111b08c9ddec74d19067cb5b1ae20d8aa /src/devices/cpu/e132xs/e132xsdrc.cpp | |
parent | e0ea955d1b545e6b2c37c09efa0283941bdc778b (diff) |
-cpu/e132xs.cpp: Improved exception emulation:
* Fixed behaviour of exceptions in delay slots, and fixed recompiler not
updating ILC and P for some exceptions.
* Implemented privilege error exception on setting L in user mode for
interpreter.
-emu/debug, osd/modules/debugger: Added an option to show
exceptionpoints in breakpoints windows.
Diffstat (limited to 'src/devices/cpu/e132xs/e132xsdrc.cpp')
-rw-r--r-- | src/devices/cpu/e132xs/e132xsdrc.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/devices/cpu/e132xs/e132xsdrc.cpp b/src/devices/cpu/e132xs/e132xsdrc.cpp index 112a11821e4..a943e95082d 100644 --- a/src/devices/cpu/e132xs/e132xsdrc.cpp +++ b/src/devices/cpu/e132xs/e132xsdrc.cpp @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Ryan Holtz +// copyright-holders:Ryan Holtz, Vas Crabb #include "emu.h" #include "e132xs.h" @@ -799,17 +799,19 @@ void hyperstone_device::generate_sequence_instruction(drcuml_block &block, compi if (compiler.check_delay()) { // if PC is used in a delay instruction, the delayed PC should be used - const int nodelay = compiler.next_label(); + const int set_delay_pc = compiler.next_label(); const int done = compiler.next_label(); - UML_TEST(block, mem(&m_core->delay_slot), 1); - UML_JMPc(block, uml::COND_Z, nodelay); + UML_TEST(block, mem(&m_core->delay_slot), ~uint32_t(0)); + UML_JMPc(block, uml::COND_NZ, set_delay_pc); + + UML_ADD(block, DRC_PC, DRC_PC, desc->length); + UML_MOV(block, mem(&m_core->delay_slot_taken), 0); + UML_JMP(block, done); + + UML_LABEL(block, set_delay_pc); UML_MOV(block, DRC_PC, mem(&m_core->delay_pc)); UML_MOV(block, mem(&m_core->delay_slot), 0); UML_MOV(block, mem(&m_core->delay_slot_taken), 1); - UML_JMP(block, done); - UML_LABEL(block, nodelay); - UML_ADD(block, DRC_PC, DRC_PC, desc->length); - UML_MOV(block, mem(&m_core->delay_slot_taken), 0); UML_LABEL(block, done); } else |