[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH v2 04/15] target/ppc: introduce separate VSX_CMP m
From: |
Richard Henderson |
Subject: |
Re: [Qemu-ppc] [PATCH v2 04/15] target/ppc: introduce separate VSX_CMP macro for xvcmp* instructions |
Date: |
Tue, 11 Jun 2019 21:22:15 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
On 6/11/19 6:52 PM, David Gibson wrote:
> On Sun, Jun 02, 2019 at 12:08:52PM +0100, Mark Cave-Ayland wrote:
>> Rather than perform the VSR register decoding within the helper itself,
>> introduce a new VSX_CMP macro which performs the decode based upon xT, xA
>> and xB at translation time.
>>
>> Subsequent commits will make the same changes for other instructions however
>> the xvcmp* instructions are different in that they return a set of flags to
>> be
>> optionally written back to the crf[6] register. Move this logic from the
>> helper function to the generator function, along with the
>> float_status update.
>
> What's the advantage of this. Since we still have a helper, don't we
> suffer the cost of the helper call *plus* the now-generated
> instructions?
Not as such.
The generated instructions are all of the form
lea offset+x*16(env), reg
which is cheaper than
mov $x, reg
and then
shl $4, reg
lea offset(env, reg), reg
within the helper.
r~
[Qemu-ppc] [PATCH v2 03/15] target/ppc: remove getVSR()/putVSR() from int_helper.c, Mark Cave-Ayland, 2019/06/02
[Qemu-ppc] [PATCH v2 02/15] target/ppc: remove getVSR()/putVSR() from mem_helper.c, Mark Cave-Ayland, 2019/06/02