Skip to content

Commit a01491a

Browse files
committed
target/hppa: Fix 64-bit SHRPD instruction
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>
1 parent 34a5cb6 commit a01491a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

target/hppa/translate.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3438,9 +3438,9 @@ static bool trans_shrp_sar(DisasContext *ctx, arg_shrp_sar *a)
34383438
TCGv_i64 n = tcg_temp_new_i64();
34393439

34403440
tcg_gen_xori_i64(n, cpu_sar, 63);
3441-
tcg_gen_shl_i64(t, src2, n);
3441+
tcg_gen_shl_i64(t, src1, n);
34423442
tcg_gen_shli_i64(t, t, 1);
3443-
tcg_gen_shr_i64(dest, src1, cpu_sar);
3443+
tcg_gen_shr_i64(dest, src2, cpu_sar);
34443444
tcg_gen_or_i64(dest, dest, t);
34453445
} else {
34463446
TCGv_i64 t = tcg_temp_new_i64();

0 commit comments

Comments
 (0)