diff mbox series

[2/2] target/rx: gdbstub add acc register operation.

Message ID 20210909120459.2199223-3-ysato@users.sourceforge.jp
State New
Headers show
Series RX target update | expand

Commit Message

Yoshinori Sato Sept. 9, 2021, 12:04 p.m. UTC
I added it because the operation of the acc register was not implemented.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
 target/rx/gdbstub.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Peter Maydell Sept. 9, 2021, 12:41 p.m. UTC | #1
On Thu, 9 Sept 2021 at 13:08, Yoshinori Sato <ysato@users.sourceforge.jp> wrote:
>
> I added it because the operation of the acc register was not implemented.
>
> Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
> ---
>  target/rx/gdbstub.c | 3 ++-

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM
diff mbox series

Patch

diff --git a/target/rx/gdbstub.c b/target/rx/gdbstub.c
index c811d4810b..b5da5c42cb 100644
--- a/target/rx/gdbstub.c
+++ b/target/rx/gdbstub.c
@@ -47,7 +47,7 @@  int rx_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
     case 24:
         return gdb_get_regl(mem_buf, env->fpsw);
     case 25:
-        return 0;
+        return gdb_get_reg64(mem_buf, env->acc);
     }
     return 0;
 }
@@ -103,6 +103,7 @@  int rx_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
         env->fpsw = ldl_p(mem_buf);
         break;
     case 25:
+        env->acc = ldq_p(mem_buf);
         return 8;
     default:
         return 0;