Richard Henderson writes:

> On 07/13/2017 10:25 PM, Lluís Vilanova wrote:
>> +        /* Pass breakpoint hits to target for further processing */
>> +        if (unlikely(!QTAILQ_EMPTY(&cpu->breakpoints))) {
>> +            CPUBreakpoint *bp;
>> +            QTAILQ_FOREACH(bp, &cpu->breakpoints, entry) {
>> +                if (bp->pc == db->pc_next) {
>> +                    if (ops->breakpoint_check(db, cpu, bp)) {
>> +                        break;
>> +                    }
>> +                }
>> +            }
>> +
>> +            if (db->is_jmp == DISAS_NORETURN) {
>> +                break;
>> +            }
>> +        }

> You should accept any != DISAS_NEXT value here.
> (1) Because DISAS_NEXT == 0 and it's the quickest test, and
> (2) If you *require* NORETURN here, then you've also got to
> convert some of the backends to not use DISAS_TARGET_N, which
> as of [07/26] target/i386: [tcg] Port to breakpoint_check, I
> haven't seen happen.

No, arm has cases with both DISAS_TARGET_N and DISAS_NORETURN, where both end
the bp check loop, but only DISAS_NORETURN breaks the translation loop (the
previous goto done_generating).

And i386 has no DISAS_NORETURN simply because that's not the behaviour in its
original code.

Reply via email to