[Top][All Lists]

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

Re: [qemu-s390x] [Qemu-devel] [PATCH v1 1/5] s390x/tcg: Implement VECTOR

From: Alex Bennée
Subject: Re: [qemu-s390x] [Qemu-devel] [PATCH v1 1/5] s390x/tcg: Implement VECTOR FIND ANY ELEMENT EQUAL
Date: Thu, 23 May 2019 11:58:17 +0100
User-agent: mu4e 1.3.2; emacs 26.1

David Hildenbrand <address@hidden> writes:

> On 22.05.19 13:09, Richard Henderson wrote:
>> On 5/22/19 7:01 AM, David Hildenbrand wrote:
>>>> I also think that, if we create a bunch more of these wrappers:
>>>>> +DEF_VFAE_HELPER(16)
>>>>> +DEF_VFAE_HELPER(32)
>>>> then RT and ZS can be passed in as constant parameters to the above, and 
>>>> then
>>>> the compiler will fold away all of the stuff that's not needed for each
>>>> different case.  Which, I think, is significant.  These are practically
>>>> different instructions with the different modifiers.
>>> So, we have 4 flags, resulting in 16 variants. Times 3 element sizes ...
>>> 48 helpers in total. Do we really want to go down that path?
>> Maybe?
> Hope my fingers won't bleed from all the copy-pasting ;)

An alternative is to generalise the code into a helper and then just use
macros to instantiate a series of calls to it (c.f. softfloat). The idea
is you can use flatten/inline to keep it efficient but you don't have a
bunch of logic obscured by macro stuff.

Alex Bennée

reply via email to

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