提交 f756c7a7 编写于 作者: E Edgar E. Iglesias 提交者: Edgar E. Iglesias

cris: Add break support for v10.

Still no retb
Signed-off-by: NEdgar E. Iglesias <edgar@axis.com>
上级 7677e24f
......@@ -64,6 +64,7 @@
#define PR_NRP 12
#define PR_CCS 13
#define PR_USP 14
#define PRV10_BRP 14
#define PR_SPC 15
/* CPU flags. */
......
......@@ -121,14 +121,14 @@ static void do_interruptv10(CPUCRISState *env)
/* These exceptions are genereated by the core itself.
ERP should point to the insn following the brk. */
ex_vec = env->trap_vector;
env->pregs[PR_ERP] = env->pc;
env->pregs[PRV10_BRP] = env->pc;
break;
case EXCP_NMI:
/* NMI is hardwired to vector zero. */
ex_vec = 0;
env->pregs[PR_CCS] &= ~M_FLAG;
env->pregs[PR_NRP] = env->pc;
env->pregs[PRV10_BRP] = env->pc;
break;
case EXCP_BUSFAULT:
......
......@@ -1132,6 +1132,7 @@ static unsigned int dec10_ind(DisasContext *dc)
LOG_DIS("break %d\n", dc->src);
cris_evaluate_flags(dc);
tcg_gen_movi_tl(env_pc, dc->pc + 2);
t_gen_mov_env_TN(trap_vector, tcg_const_tl(dc->src + 2));
t_gen_raise_exception(EXCP_BREAK);
dc->is_jmp = DISAS_UPDATE;
return insn_len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册