diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-14 11:12:10 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-14 11:12:10 +0000 |
commit | 6ad7365a81ef9b0857e0964190e34e21814bd3b0 (patch) | |
tree | 599d1ed9c7f00c74a244f63c66efe1f6d903dac6 | |
parent | 30e7a22eba59bcf92c761400c93d35b902878b46 (diff) |
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
-rw-r--r-- | target-ppc/op_helper.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index a9b7f73bb0..cd88bb6075 100644 --- a/target-ppc/op_helper.c +++ b/target-ppc/op_helper.c @@ -1592,16 +1592,14 @@ uint64_t helper_frsqrte (uint64_t arg) /* fsel - fsel. */ uint64_t helper_fsel (uint64_t arg1, uint64_t arg2, uint64_t arg3) { - CPU_DoubleU farg1, farg2, farg3; + CPU_DoubleU farg1; farg1.ll = arg1; - farg2.ll = arg2; - farg3.ll = arg3; if (!fpisneg(farg1.d) || iszero(farg1.d)) - return farg2.ll; + return arg2; else - return farg2.ll; + return arg3; } uint32_t helper_fcmpu (uint64_t arg1, uint64_t arg2) |