Commit 4f400ab52009ed8f76fa541454a4368f9515f897
1 parent
9004627f
Cut the translation block after translating a break insn. This avoids an issue w…
…here 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
Showing
1 changed file
with
6 additions
and
1 deletions
target-cris/translate.c
... | ... | @@ -71,6 +71,8 @@ |
71 | 71 | #define BUG() (gen_BUG(dc, __FILE__, __LINE__)) |
72 | 72 | #define BUG_ON(x) ({if (x) BUG();}) |
73 | 73 | |
74 | +#define DISAS_SWI 5 | |
75 | + | |
74 | 76 | /* Used by the decoder. */ |
75 | 77 | #define EXTRACT_FIELD(src, start, end) \ |
76 | 78 | (((src) >> start) & ((1 << (end - start + 1)) - 1)) |
... | ... | @@ -2112,6 +2114,7 @@ static unsigned int dec_rfe_etc(DisasContext *dc) |
2112 | 2114 | gen_op_movl_pc_T0(); |
2113 | 2115 | /* Breaks start at 16 in the exception vector. */ |
2114 | 2116 | gen_op_break_im(dc->op1 + 16); |
2117 | + dc->is_jmp = DISAS_SWI; | |
2115 | 2118 | break; |
2116 | 2119 | default: |
2117 | 2120 | printf ("op2=%x\n", dc->op2); |
... | ... | @@ -2332,7 +2335,8 @@ gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb, |
2332 | 2335 | do |
2333 | 2336 | { |
2334 | 2337 | check_breakpoint(env, dc); |
2335 | - if (dc->is_jmp == DISAS_JUMP) | |
2338 | + if (dc->is_jmp == DISAS_JUMP | |
2339 | + || dc->is_jmp == DISAS_SWI) | |
2336 | 2340 | goto done; |
2337 | 2341 | |
2338 | 2342 | if (search_pc) { |
... | ... | @@ -2404,6 +2408,7 @@ gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb, |
2404 | 2408 | to find the next TB */ |
2405 | 2409 | tcg_gen_exit_tb(0); |
2406 | 2410 | break; |
2411 | + case DISAS_SWI: | |
2407 | 2412 | case DISAS_TB_JUMP: |
2408 | 2413 | /* nothing more to generate */ |
2409 | 2414 | break; | ... | ... |