提交 6ad7365a 编写于 作者: A aurel32

target-ppc: fix fsel instruction

Fix fsel instruction.  Eliminate unneeded temporaries while we're at it,
too.
Signed-off-by: NNathan Froyd <froydnj@codesourcery.com>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6026 c046a42c-6fe2-441c-8c8c-71466251a162
上级 30e7a22e
...@@ -1592,16 +1592,14 @@ uint64_t helper_frsqrte (uint64_t arg) ...@@ -1592,16 +1592,14 @@ uint64_t helper_frsqrte (uint64_t arg)
/* fsel - fsel. */ /* fsel - fsel. */
uint64_t helper_fsel (uint64_t arg1, uint64_t arg2, uint64_t arg3) uint64_t helper_fsel (uint64_t arg1, uint64_t arg2, uint64_t arg3)
{ {
CPU_DoubleU farg1, farg2, farg3; CPU_DoubleU farg1;
farg1.ll = arg1; farg1.ll = arg1;
farg2.ll = arg2;
farg3.ll = arg3;
if (!fpisneg(farg1.d) || iszero(farg1.d)) if (!fpisneg(farg1.d) || iszero(farg1.d))
return farg2.ll; return arg2;
else else
return farg2.ll; return arg3;
} }
uint32_t helper_fcmpu (uint64_t arg1, uint64_t arg2) uint32_t helper_fcmpu (uint64_t arg1, uint64_t arg2)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册