qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [patch] Use fabs
@ 2005-03-10  1:16 Paul Brook
  0 siblings, 0 replies; only message in thread
From: Paul Brook @ 2005-03-10  1:16 UTC (permalink / raw)
  To: qemu-devel

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 */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-03-10  1:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-10  1:16 [Qemu-devel] [patch] Use fabs Paul Brook

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).