Skip to content

Commit

Permalink
target/hppa: Return zero for r0 from load_gpr
Browse files Browse the repository at this point in the history
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Nov 7, 2023
1 parent a4db4a7 commit bc3da3c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions target/hppa/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,7 @@ static void cond_free(DisasCond *cond)
static TCGv_i64 load_gpr(DisasContext *ctx, unsigned reg)
{
if (reg == 0) {
TCGv_i64 t = tcg_temp_new_i64();
tcg_gen_movi_i64(t, 0);
return t;
return ctx->zero;
} else {
return cpu_gr[reg];
}
Expand Down

0 comments on commit bc3da3c

Please sign in to comment.