1
0
mirror of https://github.com/prirun/p50em.git synced 2026-01-13 15:17:32 +00:00

Fix crash executing from registers during boot

In slow mode (compiled without -DFAST), Rev. 19 would crash during
boot.  On investigation, the code was branching to '4 after setting
up an instruction there.  However, instruction fetch found a '0
instead of the expected instruction.

Instructions might be fetched from registers via trap.  Fast iget16()
checks for fault.  Slow iget16() does not, and just calls get16() which
does not check.
This commit is contained in:
Dennis Boone 2020-04-18 01:48:22 -04:00
parent 4a1bfefa4a
commit 1d8476a807

2
em.c
View File

@ -1322,7 +1322,7 @@ static inline unsigned short iget16(ea_t ea) {
}
#else
#define iget16(ea) get16((ea))
#define iget16(ea) get16t((ea))
#define iget16t(ea) get16t((ea))
#endif