qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Sven Schnelle <svens@stackframe.org>
To: Richard Henderson <richard.henderson@linaro.org>,
	Helge Deller <deller@gmx.de>
Cc: qemu-devel@nongnu.org, Sven Schnelle <svens@stackframe.org>
Subject: [PATCH 3/3] target/hppa: mask CR_SAR register writes to 5/6 bit in gdbstub
Date: Wed, 28 Feb 2024 21:14:33 +0100	[thread overview]
Message-ID: <20240228201434.1515893-4-svens@stackframe.org> (raw)
In-Reply-To: <20240228201434.1515893-1-svens@stackframe.org>

Signed-off-by: Sven Schnelle <svens@stackframe.org>
---
 target/hppa/gdbstub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/hppa/gdbstub.c b/target/hppa/gdbstub.c
index a5b2c80c07..049b2d6381 100644
--- a/target/hppa/gdbstub.c
+++ b/target/hppa/gdbstub.c
@@ -184,7 +184,7 @@ int hppa_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
         env->gr[n] = val;
         break;
     case 32:
-        env->cr[CR_SAR] = val;
+        env->cr[CR_SAR] = val & (hppa_is_pa20(env) ? 63 : 31);
         break;
     case 33:
         env->iaoq_f = val;
-- 
2.43.2



  parent reply	other threads:[~2024-02-28 20:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-28 20:14 [PATCH 0/3] 64 Bit support for hppa gdbstub Sven Schnelle
2024-02-28 20:14 ` [PATCH 1/3] Revert "target/hppa: Drop attempted gdbstub support for hppa64" Sven Schnelle
2024-02-28 20:14 ` [PATCH 2/3] target/hppa: add 64 bit support to gdbstub Sven Schnelle
2024-02-28 20:14 ` Sven Schnelle [this message]
2024-02-29 18:36   ` [PATCH 3/3] target/hppa: mask CR_SAR register writes to 5/6 bit in gdbstub Richard Henderson
2024-03-18  6:32 ` [PATCH 0/3] 64 Bit support for hppa gdbstub Sven Schnelle
2024-03-18 17:09   ` Richard Henderson
2024-03-18 17:24     ` Sven Schnelle

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=20240228201434.1515893-4-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 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).