[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH 01/14] target/ppc: remove getVSR()/pu
From: |
Richard Henderson |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH 01/14] target/ppc: remove getVSR()/putVSR() from fpu_helper.c |
Date: |
Sun, 5 May 2019 07:31:14 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 5/5/19 2:27 AM, Mark Cave-Ayland wrote:
> I've spent a bit of time today going through the functions and it seems that
> all
> functions which have an xt parameter, minus a couple of the TEST macros,
> require the
> result to be calculated in a local variable first.
>
> I think the best solution is still to remove getVSR()/putVSR() but replace
> them with
> macros for copying and zeroing like this:
>
> #define VSRCPY(d, s) (memcpy(d, s, sizeof(ppc_vsr_t)))
> #define VSRZERO(d) (memset(d, 0, sizeof(ppc_vsr_t)))
Local variable, yes. But I see no reason for macros.
ppc_vsr_t res = { };
...
*xt = res;
r~