qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 01/15] target/ppc: remove getVSR()


From: Richard Henderson
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 01/15] target/ppc: remove getVSR()/putVSR() from fpu_helper.c
Date: Wed, 12 Jun 2019 12:45:14 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0

On 6/2/19 4:08 AM, Mark Cave-Ayland wrote:
>  void helper_xvxsigsp(CPUPPCState *env, uint32_t opcode)
>  {
> -    ppc_vsr_t xt, xb;
> +    ppc_vsr_t *xt = &env->vsr[xT(opcode)];
> +    ppc_vsr_t *xb = &env->vsr[xB(opcode)];
> +    ppc_vsr_t t = *xt;
>      uint32_t exp, i, fraction;
>  
> -    getVSR(xB(opcode), &xb, env);
> -    memset(&xt, 0, sizeof(xt));

Change in behaviour -- zero init to copy init.

Note for future cleanup: most of these initializations do not need to happen,
because we overwrite all elements of T without consuming the previous value.


> @@ -3410,23 +3382,22 @@ void helper_xsrqpi(CPUPPCState *env, uint32_t opcode)
>          env->fp_status.float_exception_flags &= ~float_flag_inexact;
>      }
>  
> -    helper_compute_fprf_float128(env, xt.f128);
> +    helper_compute_fprf_float128(env, t.f128);
> +    *xt = t;
>      do_float_check_status(env, GETPC());
> -    putVSR(rD(opcode) + 32, &xt, env);

Change in behaviour -- writeback happens before do_float_check_status instead
of after.  This may well be a bug fix, but if so should happen separately.


r~



reply via email to

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