From: Max Filippov Date: Sun, 15 Apr 2012 21:47:06 +0000 (+0400) Subject: target-xtensa: fix LOOPNEZ/LOOPGTZ translation X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~4176^2~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b18b37f7c5bc96dabdb08bcfb699b339a76104bf;p=sdk%2Femulator%2Fqemu.git target-xtensa: fix LOOPNEZ/LOOPGTZ translation Translation of LOOP instructions used to call LEND SR write handler to update LEND and invalidate relevant TBs. Now that LEND SR write handler ends TB, LOOPNEZ and LOOPGTZ generate wrong code (same as for simple LOOP). Fix it by calling wsr_lend helper directly. Signed-off-by: Max Filippov Signed-off-by: Blue Swirl --- diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c index 6900123..521c0e6 100644 --- a/target-xtensa/translate.c +++ b/target-xtensa/translate.c @@ -2278,7 +2278,7 @@ static void disas_xtensa_insn(DisasContext *dc) tcg_gen_subi_i32(cpu_SR[LCOUNT], cpu_R[RRI8_S], 1); tcg_gen_movi_i32(cpu_SR[LBEG], dc->next_pc); - gen_wsr_lend(dc, LEND, tmp); + gen_helper_wsr_lend(tmp); tcg_temp_free(tmp); if (BRI8_R > 8) {