[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] tcg/arm: Factor out code to emit immediate
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] tcg/arm: Factor out code to emit immediate or reg-reg op |
Date: |
Thu, 27 Sep 2012 14:01:41 +0100 |
On 26 September 2012 20:46, Peter Maydell <address@hidden> wrote:
> On 26 September 2012 20:01, Richard Henderson <address@hidden> wrote:
>> The patch itself is fine. But as a followup, if movcc is no longer "free",
>> then perhaps the setcond sequence is better as
>>
>> cmp
>> mov
>> movcc
>>
>> i.e. the second move is unconditional? A register renaming OOO core could
>> then schedule the mov before the cmp.
>
> Well, maybe. But my bar for changing existing code requires more
> proof that it's worth making the change (basically in both cases
> I'm optimising for convenience of development). My suspicion
> (entirely unbenchmarked) is that at the moment both these sequences
> will pan out about the same cost, so we might as well pick the
> one that's easiest to code.
Apparently there is really very little in it but if we did change then
the recommendation would be to try something like:
MOV dest, #0
CMP c1, c2
ADDcc dest, dest, #1
I could tell you why, but then I'd have to kill you :-)
-- PMM