qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 0/2] target sh4 and tricore patches
@ 2022-12-18 17:50 Richard Henderson
  2022-12-18 17:50 ` [PULL 1/2] target/sh4: Mask restore of env->flags from tb->flags Richard Henderson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Richard Henderson @ 2022-12-18 17:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell

The following changes since commit 562d4af32ec2213061f844b3838223fd7711b56a:

  Merge tag 'pull-loongarch-20221215' of https://gitlab.com/gaosong/qemu into staging (2022-12-18 13:53:29 +0000)

are available in the Git repository at:

  https://gitlab.com/rth7680/qemu.git tags/pull-misc-20221218

for you to fetch changes up to 3b1371159cdb6f31d87fbb339853cc6a963ea6a1:

  target/tricore: Fix gdbstub write to address registers (2022-12-18 09:39:17 -0800)

----------------------------------------------------------------
Fix tricore gdbstub.
Fix superh_cpu_synchronize_from_tb.

----------------------------------------------------------------
Guenter Roeck (1):
      target/sh4: Mask restore of env->flags from tb->flags

Richard Henderson (1):
      target/tricore: Fix gdbstub write to address registers

 target/sh4/cpu.c         | 2 +-
 target/tricore/gdbstub.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PULL 1/2] target/sh4: Mask restore of env->flags from tb->flags
  2022-12-18 17:50 [PULL 0/2] target sh4 and tricore patches Richard Henderson
@ 2022-12-18 17:50 ` Richard Henderson
  2022-12-18 17:50 ` [PULL 2/2] target/tricore: Fix gdbstub write to address registers Richard Henderson
  2022-12-19 15:09 ` [PULL 0/2] target sh4 and tricore patches Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2022-12-18 17:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Guenter Roeck, qemu-stable

From: Guenter Roeck <linux@roeck-us.net>

The values in env->flags are a subset of tb->flags.
Restore only the bits that belong.

Cc: qemu-stable@nongnu.org
Fixes: ab419fd8a035 ("target/sh4: Fix TB_FLAG_UNALIGN")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Message-ID: <20221212011345.GA2235238@roeck-us.net>
[rth: Reduce to only the the superh_cpu_synchronize_from_tb change]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/sh4/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c
index 951eb6b9c8..f0934b20fa 100644
--- a/target/sh4/cpu.c
+++ b/target/sh4/cpu.c
@@ -47,7 +47,7 @@ static void superh_cpu_synchronize_from_tb(CPUState *cs,
     SuperHCPU *cpu = SUPERH_CPU(cs);
 
     cpu->env.pc = tb_pc(tb);
-    cpu->env.flags = tb->flags;
+    cpu->env.flags = tb->flags & TB_FLAG_ENVFLAGS_MASK;
 }
 
 static void superh_restore_state_to_opc(CPUState *cs,
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PULL 2/2] target/tricore: Fix gdbstub write to address registers
  2022-12-18 17:50 [PULL 0/2] target sh4 and tricore patches Richard Henderson
  2022-12-18 17:50 ` [PULL 1/2] target/sh4: Mask restore of env->flags from tb->flags Richard Henderson
@ 2022-12-18 17:50 ` Richard Henderson
  2022-12-19 15:09 ` [PULL 0/2] target sh4 and tricore patches Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2022-12-18 17:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Philippe Mathieu-Daudé

Typo had double-writes to data registers.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1363
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/tricore/gdbstub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/tricore/gdbstub.c b/target/tricore/gdbstub.c
index ebf32defde..3a27a7e65d 100644
--- a/target/tricore/gdbstub.c
+++ b/target/tricore/gdbstub.c
@@ -130,7 +130,7 @@ int tricore_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
     if (n < 16) { /* data registers */
         env->gpr_d[n] = tmp;
     } else if (n < 32) { /* address registers */
-        env->gpr_d[n - 16] = tmp;
+        env->gpr_a[n - 16] = tmp;
     } else {
         tricore_cpu_gdb_write_csfr(env, n, tmp);
     }
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PULL 0/2] target sh4 and tricore patches
  2022-12-18 17:50 [PULL 0/2] target sh4 and tricore patches Richard Henderson
  2022-12-18 17:50 ` [PULL 1/2] target/sh4: Mask restore of env->flags from tb->flags Richard Henderson
  2022-12-18 17:50 ` [PULL 2/2] target/tricore: Fix gdbstub write to address registers Richard Henderson
@ 2022-12-19 15:09 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2022-12-19 15:09 UTC (permalink / raw)
  To: Richard Henderson; +Cc: qemu-devel

On Sun, 18 Dec 2022 at 17:50, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> The following changes since commit 562d4af32ec2213061f844b3838223fd7711b56a:
>
>   Merge tag 'pull-loongarch-20221215' of https://gitlab.com/gaosong/qemu into staging (2022-12-18 13:53:29 +0000)
>
> are available in the Git repository at:
>
>   https://gitlab.com/rth7680/qemu.git tags/pull-misc-20221218
>
> for you to fetch changes up to 3b1371159cdb6f31d87fbb339853cc6a963ea6a1:
>
>   target/tricore: Fix gdbstub write to address registers (2022-12-18 09:39:17 -0800)
>
> ----------------------------------------------------------------
> Fix tricore gdbstub.
> Fix superh_cpu_synchronize_from_tb.
>


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/8.0
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-19 15:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-18 17:50 [PULL 0/2] target sh4 and tricore patches Richard Henderson
2022-12-18 17:50 ` [PULL 1/2] target/sh4: Mask restore of env->flags from tb->flags Richard Henderson
2022-12-18 17:50 ` [PULL 2/2] target/tricore: Fix gdbstub write to address registers Richard Henderson
2022-12-19 15:09 ` [PULL 0/2] target sh4 and tricore patches Peter Maydell

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).