qemu-devel@nongnu.org
[Top] [All Lists]

[Qemu-devel] [patch] Use fabs

Subject: [Qemu-devel] [patch] Use fabs
From: Paul Brook
Date: Thu, 10 Mar 2005 01:16:19 +0000
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 */


_______________________________________________
Qemu-devel mailing list
Qemu-devel@xxxxxxxxxx
http://lists.nongnu.org/mailman/listinfo/qemu-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Qemu-devel] [patch] Use fabs, Paul Brook <=