All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [patch] Use fabs
Date: Thu, 10 Mar 2005 01:16:19 +0000	[thread overview]
Message-ID: <200503100116.20778.paul@codesourcery.com> (raw)

target-ppc/op_helper.c uses fabsl (which operates on a "long double" value) to 
get the absolute value of a "double" value. The patch below changes this to 
fabs. fabsl is significantly slower on some hosts, and not present on others.

Paul

Index: target-ppc/op_helper.c
===================================================================
RCS file: /cvsroot/qemu/qemu/target-ppc/op_helper.c,v
retrieving revision 1.11
diff -u -p -r1.11 op_helper.c
--- target-ppc/op_helper.c 15 Feb 2005 23:06:19 -0000 1.11
+++ target-ppc/op_helper.c 10 Mar 2005 01:10:56 -0000
@@ -371,12 +371,12 @@ void do_fcmpo (void)
 
 void do_fabs (void)
 {
-    FT0 = fabsl(FT0);
+    FT0 = fabs(FT0);
 }
 
 void do_fnabs (void)
 {
-    FT0 = -fabsl(FT0);
+    FT0 = -fabs(FT0);
 }
 
 /* Instruction cache invalidation helper */

                 reply	other threads:[~2005-03-10  1:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200503100116.20778.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.