target-ppc: fix fsel instruction
PATCH 1/1 target-ppc: fix fsel instruction
Fix fsel instruction. Eliminate unneeded temporaries while we're at it, too.
Signed-off-by Nathan Froyd <[email protected]>
--- target-ppc/op_helper.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-)
target-ppc/op_helper.c +3 -5
@@ -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)
Signature · 1 line
1.6.0.5
Aurelien Jarno
AppliedQuoted 4 lines · Nathan Froyd
Fix fsel instruction. Eliminate unneeded temporaries while we're at it, too.
Signed-off-by Nathan Froyd <[email protected]>
Thanks, applied.
Quoted 34 lines
--- target-ppc/op_helper.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-)target-ppc/op_helper.c +3
-5@@ -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)Signature · 1 line
1.6.0.5
Signature · 4 lines
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' [email protected] | [email protected] `- people.debian.org/~aurel32 | www.aurel32.net