[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 06/11] target/arm: use gdb_get_reg helpers
From: |
Richard Henderson |
Subject: |
Re: [RFC PATCH 06/11] target/arm: use gdb_get_reg helpers |
Date: |
Mon, 18 Nov 2019 09:19:59 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
On 11/15/19 6:29 PM, Alex Bennée wrote:
> This is cleaner than poking memory directly and will make later
> clean-ups easier.
>
> Signed-off-by: Alex Bennée <address@hidden>
> ---
> target/arm/helper.c | 16 ++++++----------
> 1 file changed, 6 insertions(+), 10 deletions(-)
>
> diff --git a/target/arm/helper.c b/target/arm/helper.c
> index be67e2c66d6..bd821931b3d 100644
> --- a/target/arm/helper.c
> +++ b/target/arm/helper.c
> @@ -105,21 +105,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;
> - }
> + uint64_t *q = aa64_vfp_qreg(env, reg);
> + return gdb_get_reg128(buf, q[0], q[1]);
The elements of aa64_vfp_qreg are explicitly little-endian.
Since you defined gdb_get_reg128 as (buf, hi, lo), these
arguments are in the wrong order.
r~
- [RFC PATCH 00/11] gdbstub re-factor and SVE support, Alex Bennée, 2019/11/15
- [RFC PATCH 01/11] gdbstub: move allocation of GDBState to one place, Alex Bennée, 2019/11/15
- [RFC PATCH 06/11] target/arm: use gdb_get_reg helpers, Alex Bennée, 2019/11/15
- Re: [RFC PATCH 06/11] target/arm: use gdb_get_reg helpers,
Richard Henderson <=
- [RFC PATCH 05/11] gdbstub: add helper for 128 bit registers, Alex Bennée, 2019/11/15
- [RFC PATCH 04/11] gdbstub: move mem_buf to GDBState and use GByteArray, Alex Bennée, 2019/11/15
- [RFC PATCH 07/11] target/m68k: use gdb_get_reg helpers, Alex Bennée, 2019/11/15
- [RFC PATCH 03/11] gdbstub: move str_buf to GDBState and use GString, Alex Bennée, 2019/11/15
- [RFC PATCH 02/11] gdbstub: stop passing GDBState * around, Alex Bennée, 2019/11/15