qemu-ppc
[Top][All Lists]
Advanced

[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: Mark Cave-Ayland
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH 01/14] target/ppc: remove getVSR()/putVSR() from fpu_helper.c
Date: Sun, 5 May 2019 16:46:31 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 05/05/2019 15:31, Richard Henderson wrote:

> 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;

Ah thanks for the hint - I wasn't aware that this could be done in a consistent 
way
for structs across all compilers. I'll implement this in the next version of 
the series.


ATB,

Mark.



reply via email to

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