Commit 8fcc55f9de36354a8dcae1b47cadf45e8bba5cca

Authored by aurel32
1 parent 9d1b494a

target-alpha: stop translation if too long

Signed-off-by: Tristan Gingold <gingold@adacore.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7027 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 9 additions and 5 deletions
target-alpha/translate.c
... ... @@ -2404,16 +2404,20 @@ static always_inline void gen_intermediate_code_internal (CPUState *env,
2404 2404 /* if we reach a page boundary or are single stepping, stop
2405 2405 * generation
2406 2406 */
2407   - if (((ctx.pc & (TARGET_PAGE_SIZE - 1)) == 0) ||
2408   - num_insns >= max_insns) {
2409   - break;
2410   - }
2411   -
2412 2407 if (env->singlestep_enabled) {
2413 2408 gen_excp(&ctx, EXCP_DEBUG, 0);
2414 2409 break;
2415 2410 }
2416 2411  
  2412 + if ((ctx.pc & (TARGET_PAGE_SIZE - 1)) == 0)
  2413 + break;
  2414 +
  2415 + if (gen_opc_ptr >= gen_opc_end)
  2416 + break;
  2417 +
  2418 + if (num_insns >= max_insns)
  2419 + break;
  2420 +
2417 2421 if (singlestep) {
2418 2422 break;
2419 2423 }
... ...