target/arm: use gdb_get_reg helpers
This is cleaner than poking memory directly and will make later clean-ups easier. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200316172155.971-12-alex.bennee@linaro.org>
This commit is contained in:
parent
532cc1fb44
commit
8b1ca58c3b
@ -106,21 +106,17 @@ static int aarch64_fpu_gdb_get_reg(CPUARMState *env, uint8_t *buf, int reg)
|
||||
{
|
||||
switch (reg) {
|
||||
case 0 ... 31:
|
||||
/* 128 bit FP register */
|
||||
{
|
||||
uint64_t *q = aa64_vfp_qreg(env, reg);
|
||||
stq_le_p(buf, q[0]);
|
||||
stq_le_p(buf + 8, q[1]);
|
||||
return 16;
|
||||
}
|
||||
{
|
||||
/* 128 bit FP register - quads are in LE order */
|
||||
uint64_t *q = aa64_vfp_qreg(env, reg);
|
||||
return gdb_get_reg128(buf, q[1], q[0]);
|
||||
}
|
||||
case 32:
|
||||
/* FPSR */
|
||||
stl_p(buf, vfp_get_fpsr(env));
|
||||
return 4;
|
||||
return gdb_get_reg32(buf, vfp_get_fpsr(env));
|
||||
case 33:
|
||||
/* FPCR */
|
||||
stl_p(buf, vfp_get_fpcr(env));
|
||||
return 4;
|
||||
return gdb_get_reg32(buf,vfp_get_fpcr(env));
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user