qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [Qemu-devel] [PATCH 1/2] target/ppc: Use vector variable


From: Richard Henderson
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH 1/2] target/ppc: Use vector variable shifts for VSL, VSR, VSRA
Date: Mon, 20 May 2019 22:03:11 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 5/20/19 2:49 AM, Aleksandar Markovic wrote:
> 
> On May 18, 2019 9:21 PM, "Richard Henderson" <address@hidden
> <mailto:address@hidden>> wrote:
>>
>> The gvec expanders take care of masking the shift amount
>> against the element width.
>>
>> Signed-off-by: Richard Henderson <address@hidden
> <mailto:address@hidden>>
>> ---
>>  target/ppc/helper.h                 | 12 ----------
>>  target/ppc/int_helper.c             | 37 -----------------------------
>>  target/ppc/translate/vmx-impl.inc.c | 24 +++++++++----------
> 
> You changed the line
> 
> -GEN_VXFORM(vslw, 2, 6);
> 
> to be:
> 
> +GEN_VXFORM_V(vslw, MO_32, tcg_gen_gvec_shlv, 2, 6);
> 
> and left this line unchanged (even though it deals with the same vslw 
> instruction):
> 
> GEN_VXFORM_DUAL(vslw, PPC_ALTIVEC, PPC_NONE, \                 vrlwnm,
> PPC_NONE, PPC2_ISA300)
> 
> I just want to doublecheck - is this really what you wanted to do?

Yes, the macros do two different things.

The first defines a function using tcg_gen_gvec_shlv as the implementation.

The second defines a function that chooses between two overloaded encodings,
depending on whether PPC_ALTIVEC or PPC2_ISA300 is enabled.  If PPC_ALTIVEC, it
will forward the implementation to the function defined with the first macro.


r~



reply via email to

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