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~

Reply via email to