target-ppc: optimize cmp translation
authorpbonzini@redhat.com <pbonzini@redhat.com>
Sun, 17 Dec 2017 05:49:53 +0000 (06:49 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Sat, 20 Jan 2018 06:15:05 +0000 (17:15 +1100)
commitb62b368627ea160d2bfd7886aa690047480036a0
treef2e634c99553800b972d1f7b0f86168becf83a23
parent9012a53f067a78022947e18050b145c34a3dc599
target-ppc: optimize cmp translation

We know that only one bit (in addition to SO) is going to be set in
the condition register, so do two movconds instead of three setconds,
three shifts and two ORs.

For ppc64-linux-user, the code size reduction is around 5% and the
performance improvement slightly less than 10%.  For softmmu, the
improvement is around 5%.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target/ppc/translate.c