aboutsummaryrefslogtreecommitdiff
path: root/target-cris
diff options
context:
space:
mode:
authoredgar_igl <edgar_igl@c046a42c-6fe2-441c-8c8c-71466251a162>2008-02-28 09:37:58 +0000
committeredgar_igl <edgar_igl@c046a42c-6fe2-441c-8c8c-71466251a162>2008-02-28 09:37:58 +0000
commit4f400ab52009ed8f76fa541454a4368f9515f897 (patch)
treecc82807ee9aab079a1ef2156d9c256ac2bc935c3 /target-cris
parent9004627f9b913085e9a6926d76c065c7372815ab (diff)
Cut the translation block after translating a break insn. This avoids an issue where QEMU finds an illegal CRIS insn while the guest is returning through a signal return trampoline.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3997 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-cris')
-rw-r--r--target-cris/translate.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/target-cris/translate.c b/target-cris/translate.c
index 4150737f82..e653afd942 100644
--- a/target-cris/translate.c
+++ b/target-cris/translate.c
@@ -71,6 +71,8 @@
#define BUG() (gen_BUG(dc, __FILE__, __LINE__))
#define BUG_ON(x) ({if (x) BUG();})
+#define DISAS_SWI 5
+
/* Used by the decoder. */
#define EXTRACT_FIELD(src, start, end) \
(((src) >> start) & ((1 << (end - start + 1)) - 1))
@@ -2112,6 +2114,7 @@ static unsigned int dec_rfe_etc(DisasContext *dc)
gen_op_movl_pc_T0();
/* Breaks start at 16 in the exception vector. */
gen_op_break_im(dc->op1 + 16);
+ dc->is_jmp = DISAS_SWI;
break;
default:
printf ("op2=%x\n", dc->op2);
@@ -2332,7 +2335,8 @@ gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb,
do
{
check_breakpoint(env, dc);
- if (dc->is_jmp == DISAS_JUMP)
+ if (dc->is_jmp == DISAS_JUMP
+ || dc->is_jmp == DISAS_SWI)
goto done;
if (search_pc) {
@@ -2404,6 +2408,7 @@ gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb,
to find the next TB */
tcg_gen_exit_tb(0);
break;
+ case DISAS_SWI:
case DISAS_TB_JUMP:
/* nothing more to generate */
break;