qemu-arm
[Top][All Lists]
Advanced

[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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]