From: deller@kernel.org
To: qemu-devel@nongnu.org, Richard Henderson <richard.henderson@linaro.org>
Cc: Helge Deller <deller@gmx.de>
Subject: [PATCH v2 1/2] target/hppa: Fix 64-bit SHRPD instruction
Date: Fri, 17 Nov 2023 11:53:08 +0100 [thread overview]
Message-ID: <20231117105309.149225-2-deller@kernel.org> (raw)
In-Reply-To: <20231117105309.149225-1-deller@kernel.org>
From: Helge Deller <deller@gmx.de>
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>
---
target/hppa/translate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index 4a4830c3e3..3ef39b1bd7 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -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();
--
2.41.0
next prev parent reply other threads:[~2023-11-17 10:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-17 10:53 [PATCH v2 0/2] HPPA64-PATCHES-for-8.2 deller
2023-11-17 10:53 ` deller [this message]
2023-11-17 16:42 ` [PATCH v2 1/2] target/hppa: Fix 64-bit SHRPD instruction Richard Henderson
2023-11-17 10:53 ` [PATCH v2 2/2] disas/hppa: Show hexcode of instruction along with disassembly deller
2023-11-17 16:45 ` Richard Henderson
2023-11-17 17:33 ` Helge Deller
2023-11-17 19:52 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231117105309.149225-2-deller@kernel.org \
--to=deller@kernel.org \
--cc=deller@gmx.de \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).