> Cc: Michael Clark <m...@sifive.com>
> Cc: Palmer Dabbelt <pal...@sifive.com>
> Cc: Sagar Karandikar <sag...@eecs.berkeley.edu>
> Cc: Bastian Koppelmann <kbast...@mail.uni-paderborn.de>
> 
> Signed-off-by: Emilio G. Cota <c...@braap.org>
> ---
>  target/riscv/translate.c | 72 
> +++++++++++++++++++-----------------------------
>  1 file changed, 28 insertions(+), 44 deletions(-)

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>


> @@ -1345,12 +1339,12 @@ static void gen_system(CPURISCVState *env, 
> DisasContext *ctx, uint32_t opc,
>              /* always generates U-level ECALL, fixed in do_interrupt handler 
> */
>              generate_exception(ctx, RISCV_EXCP_U_ECALL);
>              tcg_gen_exit_tb(0); /* no chaining */
> -            ctx->bstate = BS_BRANCH;
> +            ctx->is_jmp = DISAS_NORETURN;
>              break;
>          case 0x1: /* EBREAK */
>              generate_exception(ctx, RISCV_EXCP_BREAKPOINT);
>              tcg_gen_exit_tb(0); /* no chaining */
> -            ctx->bstate = BS_BRANCH;
> +            ctx->is_jmp = DISAS_NORETURN;
>              break;

Not for Emilio, but for the RISCV guys as a follow-up, exit_tb after
generate_exception is dead code -- we have already exited via longjmp.  There
are more than these two instances.


r~

Reply via email to