qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target-ppc: fix fsel instruction
@ 2008-12-14  1:49 Nathan Froyd
  2008-12-14 11:12 ` Aurelien Jarno
  0 siblings, 1 reply; 2+ messages in thread
From: Nathan Froyd @ 2008-12-14  1:49 UTC (permalink / raw)
  To: qemu-devel

Fix fsel instruction.  Eliminate unneeded temporaries while we're at it,
too.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
---
 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 a9b7f73..92c6269 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)
-- 
1.6.0.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] target-ppc: fix fsel instruction
  2008-12-14  1:49 [Qemu-devel] [PATCH] target-ppc: fix fsel instruction Nathan Froyd
@ 2008-12-14 11:12 ` Aurelien Jarno
  0 siblings, 0 replies; 2+ messages in thread
From: Aurelien Jarno @ 2008-12-14 11:12 UTC (permalink / raw)
  To: qemu-devel

On Sat, Dec 13, 2008 at 05:49:10PM -0800, Nathan Froyd wrote:
> Fix fsel instruction.  Eliminate unneeded temporaries while we're at it,
> too.
> 
> Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>

Thanks, applied.

> ---
>  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 a9b7f73..92c6269 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)
> -- 
> 1.6.0.5
> 
> 
> 
> 

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-14 11:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-14  1:49 [Qemu-devel] [PATCH] target-ppc: fix fsel instruction Nathan Froyd
2008-12-14 11:12 ` Aurelien Jarno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).