On 26 September 2012 20:46, Peter Maydell <peter.mayd...@linaro.org> wrote: > On 26 September 2012 20:01, Richard Henderson <r...@twiddle.net> 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