From c4e5ae4e41a00720f926cf7641bf56cb122946aa Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Sun, 13 Jul 2008 07:03:30 +0000 Subject: [PATCH] Fixed edge case in the DRC front-end that would incorrectly tag the end of a sequence as "return to start" even if the last instruction did not abet the starting instruction. --- src/emu/cpu/drcfe.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/emu/cpu/drcfe.c b/src/emu/cpu/drcfe.c index f625d4f6ec6..336c3733c34 100644 --- a/src/emu/cpu/drcfe.c +++ b/src/emu/cpu/drcfe.c @@ -397,7 +397,11 @@ static opcode_desc **build_sequence(drcfe_state *drcfe, opcode_desc **tailptr, i /* if we are the last instruction, indicate end-of-sequence and redispatch */ if (nextdesc == NULL) - curdesc->flags |= OPFLAG_END_SEQUENCE | endflag; + { + curdesc->flags |= OPFLAG_END_SEQUENCE; + if (endflag != OPFLAG_RETURN_TO_START || nextdescnum == end) + curdesc->flags |= endflag; + } /* otherwise, do some analysis based on the next instruction */ else