This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Sync up powerpc __mp_dbl with default code
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: libc-alpha at sourceware dot org
- Cc: rsa at us dot ibm dot com
- Date: Thu, 14 Feb 2013 15:38:44 +0530
- Subject: [PATCH] Sync up powerpc __mp_dbl with default code
Hi,
Here's another patch that syncs up changes I had made in default code
with the powerpc code since it makes sense to do so. The result does
not alter the output code, i.e. the output code is identical before
and after this change. OK to commit?
Siddhesh
* sysdeps/powerpc/powerpc32/power4/fpu/mpa.c (__mp_dbl): Sync
up changes with default code.
* sysdeps/powerpc/powerpc64/power4/fpu/mpa.c (__mp_dbl):
Likewise.
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c b/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c
index 517a9cd..25e88a3 100644
--- a/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c
+++ b/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c
@@ -304,9 +304,7 @@ __mp_dbl (const mp_no *x, double *y, int p)
return;
}
- if (EX > -42)
- norm (x, y, p);
- else if (EX == -42 && X[1] >= TWO10)
+ if (__glibc_likely (EX > -42 || (EX == -42 && X[1] >= TWO10)))
norm (x, y, p);
else
denorm (x, y, p);
diff --git a/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c b/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c
index 517a9cd..25e88a3 100644
--- a/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c
+++ b/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c
@@ -304,9 +304,7 @@ __mp_dbl (const mp_no *x, double *y, int p)
return;
}
- if (EX > -42)
- norm (x, y, p);
- else if (EX == -42 && X[1] >= TWO10)
+ if (__glibc_likely (EX > -42 || (EX == -42 && X[1] >= TWO10)))
norm (x, y, p);
else
denorm (x, y, p);