Commit b8b45b68 authored by Rabin Vincent's avatar Rabin Vincent Committed by Paul Brook
Browse files

target-arm: implement Thumb-2 exception return



Support the "subs pc, lr" Thumb-2 exception return instruction.
Signed-off-by: default avatarRabin Vincent <rabin@rab.in>
Signed-off-by: default avatarPaul Brook <paul@codesourcery.com>
parent fa26df03
......@@ -8001,8 +8001,16 @@ static int disas_thumb2_insn(CPUState *env, DisasContext *s, uint16_t insn_hw1)
gen_bx(s, tmp);
break;
case 5: /* Exception return. */
/* Unpredictable in user mode. */
goto illegal_op;
if (IS_USER(s)) {
goto illegal_op;
}
if (rn != 14 || rd != 15) {
goto illegal_op;
}
tmp = load_reg(s, rn);
tcg_gen_subi_i32(tmp, tmp, insn & 0xff);
gen_exception_return(s, tmp);
break;
case 6: /* mrs cpsr. */
tmp = new_tmp();
if (IS_M(env)) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment