target-arm: A64: Trap ERET from EL0 at translation time

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1400980132-25949-19-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Edgar E. Iglesias 2014-05-27 17:09:54 +01:00 committed by Peter Maydell
parent 7ab6c10d00
commit 14c521d45e

View File

@ -1507,6 +1507,10 @@ static void disas_uncond_b_reg(DisasContext *s, uint32_t insn)
tcg_gen_movi_i64(cpu_reg(s, 30), s->pc);
break;
case 4: /* ERET */
if (s->current_pl == 0) {
unallocated_encoding(s);
return;
}
gen_helper_exception_return(cpu_env);
s->is_jmp = DISAS_JUMP;
return;