Closed robinsonb5 closed 11 years ago
The microcode seems to attempt to avoid running when the 2ndOPC is set to zero, but enough of the movem operation runs to cause havok.
On write, the stack pointer seems to get replaced with the Program Counter!
On read, if the existing test for zero 2nd-opcode is removed, it appears to work as expected.
Fixed by TobiFlexx's recent updates to the CPU core.
[Reported by Gerhard Suttner]
there is a bug in the TG68 softcore concerning the following opcodes:
MOVEM.L ,-(A7) (hex 48E7 0000) and MOVEM.L (A7)+, (hex 4CDF 0000)
There seems to be no sense in these opcodes, but the Aztec-C-compiler generates these codes when there are no registeres to be saved in a subroutine.
On original 68000 hardware both instructions have no effect. The softcore instead thrashes the stack when executing MOVEM.L ,-(A7) and overwrites the opcode when executing MOVEM.L (A7)+, .