Skip to content

Commit

Permalink
target/hppa: fix setting registers via gdb
Browse files Browse the repository at this point in the history
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 <svens@stackframe.org>
Message-Id: <20190128165333.3814-1-svens@stackframe.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
svenschnelle authored and rth7680 committed Feb 6, 2019
1 parent 84b41e6 commit 5c41496
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target/hppa/gdbstub.c
Expand Up @@ -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:
Expand Down

0 comments on commit 5c41496

Please sign in to comment.