From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org
Cc: "Sven Schnelle" <svens@stackframe.org>,
"Helge Deller" <deller@gmx.de>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PATCH v2 1/2] target/hppa: Minor code movement
Date: Mon, 13 Dec 2021 19:56:09 +0100 [thread overview]
Message-ID: <20211213185610.1987974-2-f4bug@amsat.org> (raw)
In-Reply-To: <20211213185610.1987974-1-f4bug@amsat.org>
Move the 'a->r1 == 0' if ladder earlier, simply
to ease reviewing the next commit change.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/hppa/translate.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index 3b9744deb44..261e4c75c7c 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -3204,14 +3204,14 @@ static bool trans_shrpw_imm(DisasContext *ctx, arg_shrpw_imm *a)
dest = dest_gpr(ctx, a->t);
t2 = load_gpr(ctx, a->r2);
- if (a->r1 == a->r2) {
+ if (a->r1 == 0) {
+ tcg_gen_extract_reg(dest, t2, sa, 32 - sa);
+ } else if (a->r1 == a->r2) {
TCGv_i32 t32 = tcg_temp_new_i32();
tcg_gen_trunc_reg_i32(t32, t2);
tcg_gen_rotri_i32(t32, t32, sa);
tcg_gen_extu_i32_reg(dest, t32);
tcg_temp_free_i32(t32);
- } else if (a->r1 == 0) {
- tcg_gen_extract_reg(dest, t2, sa, 32 - sa);
} else {
TCGv_reg t0 = tcg_temp_new();
tcg_gen_extract_reg(t0, t2, sa, 32 - sa);
--
2.33.1
next prev parent reply other threads:[~2021-12-13 18:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-13 18:56 [PATCH v2 0/2] target/hppa: Fix deposit assert from trans_shrpw_imm Philippe Mathieu-Daudé
2021-12-13 18:56 ` Philippe Mathieu-Daudé [this message]
2021-12-13 18:56 ` [PATCH v2 2/2] " Philippe Mathieu-Daudé
2021-12-13 22:22 ` Philippe Mathieu-Daudé
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=20211213185610.1987974-2-f4bug@amsat.org \
--to=f4bug@amsat.org \
--cc=deller@gmx.de \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=svens@stackframe.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).