Commit 6ad7365a81ef9b0857e0964190e34e21814bd3b0
1 parent
30e7a22e
target-ppc: fix fsel instruction
Fix fsel instruction. Eliminate unneeded temporaries while we're at it, too. Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6026 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
3 additions
and
5 deletions
target-ppc/op_helper.c
| ... | ... | @@ -1592,16 +1592,14 @@ uint64_t helper_frsqrte (uint64_t arg) |
| 1592 | 1592 | /* fsel - fsel. */ |
| 1593 | 1593 | uint64_t helper_fsel (uint64_t arg1, uint64_t arg2, uint64_t arg3) |
| 1594 | 1594 | { |
| 1595 | - CPU_DoubleU farg1, farg2, farg3; | |
| 1595 | + CPU_DoubleU farg1; | |
| 1596 | 1596 | |
| 1597 | 1597 | farg1.ll = arg1; |
| 1598 | - farg2.ll = arg2; | |
| 1599 | - farg3.ll = arg3; | |
| 1600 | 1598 | |
| 1601 | 1599 | if (!fpisneg(farg1.d) || iszero(farg1.d)) |
| 1602 | - return farg2.ll; | |
| 1600 | + return arg2; | |
| 1603 | 1601 | else |
| 1604 | - return farg2.ll; | |
| 1602 | + return arg3; | |
| 1605 | 1603 | } |
| 1606 | 1604 | |
| 1607 | 1605 | uint32_t helper_fcmpu (uint64_t arg1, uint64_t arg2) | ... | ... |