[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: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PATCH v2 04/15] target/ppc: introduce separate VSX_CMP macro for xvcmp* instructions |
Date: |
Wed, 12 Jun 2019 15:16:05 +1000 |
User-agent: |
Mutt/1.11.4 (2019-03-13) |
On Tue, Jun 11, 2019 at 09:22:15PM -0700, Richard Henderson wrote:
> 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.
Fair enough. Richard, I was kind of hoping for an A-b or R-b on the
series from you, but didn't see one..?
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
[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
[Qemu-ppc] [PATCH v2 09/15] target/ppc: introduce GEN_VSX_HELPER_X1 macro to fpu_helper.c, Mark Cave-Ayland, 2019/06/02