From 5c41496dd780fed67eadd64c59fc2cf21717ecf0 Mon Sep 17 00:00:00 2001 From: Sven Schnelle Date: Mon, 28 Jan 2019 17:53:33 +0100 Subject: target/hppa: fix setting registers via gdb While doing 'set $pcoqh=0xf0000000' i triggered the assertion below. The argument order for deposit64() is wrong, and val needs to be moved to the end. Signed-off-by: Sven Schnelle Message-Id: <20190128165333.3814-1-svens@stackframe.org> Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- target/hppa/gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target') diff --git a/target/hppa/gdbstub.c b/target/hppa/gdbstub.c index e2e9c4d..3157a69 100644 --- a/target/hppa/gdbstub.c +++ b/target/hppa/gdbstub.c @@ -266,7 +266,7 @@ int hppa_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) case 65 ... 127: { uint64_t *fr = &env->fr[(n - 64) / 2]; - *fr = deposit64(*fr, val, (n & 1 ? 0 : 32), 32); + *fr = deposit64(*fr, (n & 1 ? 0 : 32), 32, val); } break; default: -- cgit v1.1