From: Sven Schnelle <svens@stackframe.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org, Helge Deller <deller@gmx.de>,
Sven Schnelle <svens@stackframe.org>
Subject: [PATCH 3/3] target/hppa: add: fix trap on overflow for narrow mode
Date: Thu, 21 Mar 2024 19:42:28 +0100 [thread overview]
Message-ID: <20240321184228.611897-3-svens@stackframe.org> (raw)
In-Reply-To: <20240321184228.611897-1-svens@stackframe.org>
Signed-off-by: Sven Schnelle <svens@stackframe.org>
---
target/hppa/translate.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index 4d2b96f876..74a9ea0cd8 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -1122,6 +1122,9 @@ static void do_add(DisasContext *ctx, unsigned rt, TCGv_i64 in1,
if (is_tsv || cond_need_sv(c)) {
sv = do_add_sv(ctx, dest, in1, in2);
if (is_tsv) {
+ if (!d) {
+ tcg_gen_ext32s_i64(sv, sv);
+ }
/* ??? Need to include overflow from shift. */
gen_helper_tsv(tcg_env, sv);
}
--
2.43.2
next prev parent reply other threads:[~2024-03-21 18:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 18:42 [PATCH 1/3] target/hppa: add unit conditions for wide mode Sven Schnelle
2024-03-21 18:42 ` [PATCH 2/3] target/hppa: sub: fix trap on overflow for narrow mode Sven Schnelle
2024-03-21 20:03 ` Richard Henderson
2024-03-21 20:08 ` Sven Schnelle
2024-03-21 18:42 ` Sven Schnelle [this message]
2024-03-21 20:04 ` [PATCH 3/3] target/hppa: add: " Richard Henderson
2024-03-21 19:58 ` [PATCH 1/3] target/hppa: add unit conditions for wide mode Richard Henderson
2024-03-21 20:10 ` Sven Schnelle
2024-03-21 21:06 ` 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=20240321184228.611897-3-svens@stackframe.org \
--to=svens@stackframe.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.