Skip to content

Commit

Permalink
target/hppa: Fix 64-bit SHRPD instruction
Browse files Browse the repository at this point in the history
When shifting the two joined 64-bit registers right, shift the upper
64-bit register to the left and the lower 64-bit register to the right
before merging them with OR.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
hdeller committed Nov 17, 2023
1 parent 34a5cb6 commit a01491a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions target/hppa/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -3438,9 +3438,9 @@ static bool trans_shrp_sar(DisasContext *ctx, arg_shrp_sar *a)
TCGv_i64 n = tcg_temp_new_i64();

tcg_gen_xori_i64(n, cpu_sar, 63);
tcg_gen_shl_i64(t, src2, n);
tcg_gen_shl_i64(t, src1, n);
tcg_gen_shli_i64(t, t, 1);
tcg_gen_shr_i64(dest, src1, cpu_sar);
tcg_gen_shr_i64(dest, src2, cpu_sar);
tcg_gen_or_i64(dest, dest, t);
} else {
TCGv_i64 t = tcg_temp_new_i64();
Expand Down

0 comments on commit a01491a

Please sign in to comment.