[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [patch] Use fabs
From: |
Paul Brook |
Subject: |
[Qemu-devel] [patch] Use fabs |
Date: |
Thu, 10 Mar 2005 01:16:19 +0000 |
User-agent: |
KMail/1.7.2 |
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 */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [patch] Use fabs,
Paul Brook <=