mirror of
https://github.com/qemu/qemu.git
synced 2024-11-30 23:33:51 +08:00
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>
This commit is contained in:
parent
34a5cb6d84
commit
a01491a238
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user