about summary refs log tree commit diff
path: root/sysdeps/ieee754
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-08-04 15:40:16 -0400
committerUlrich Drepper <drepper@gmail.com>2011-08-04 15:40:16 -0400
commit85188888f63b9fc7f40437baeed4c7d6e4f30e18 (patch)
tree6a502d80c5cb17106625ad7e97e333b8f2fd4ce8 /sysdeps/ieee754
parentb969a69b2e6f5d83fb7434a91e415d39cd1d3f07 (diff)
downloadglibc-85188888f63b9fc7f40437baeed4c7d6e4f30e18.tar.gz
glibc-85188888f63b9fc7f40437baeed4c7d6e4f30e18.tar.xz
glibc-85188888f63b9fc7f40437baeed4c7d6e4f30e18.zip
Fix up __kernel_rem_pio2 for FLT_EVAL_METHOD != 0 architectures
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r--sysdeps/ieee754/dbl-64/k_rem_pio2.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/sysdeps/ieee754/dbl-64/k_rem_pio2.c b/sysdeps/ieee754/dbl-64/k_rem_pio2.c
index ccf1633bd4..911ff1fe35 100644
--- a/sysdeps/ieee754/dbl-64/k_rem_pio2.c
+++ b/sysdeps/ieee754/dbl-64/k_rem_pio2.c
@@ -300,14 +300,20 @@ recompute:
 		break;
 	    case 3:	/* painful */
 		for (i=jz;i>0;i--) {
-		    fw      = fq[i-1]+fq[i];
-		    fq[i]  += fq[i-1]-fw;
-		    fq[i-1] = fw;
+#if __FLT_EVAL_METHOD__ != 0
+		    volatile
+#endif
+		    double fv = (double)(fq[i-1]+fq[i]);
+		    fq[i]  += fq[i-1]-fv;
+		    fq[i-1] = fv;
 		}
 		for (i=jz;i>1;i--) {
-		    fw      = fq[i-1]+fq[i];
-		    fq[i]  += fq[i-1]-fw;
-		    fq[i-1] = fw;
+#if __FLT_EVAL_METHOD__ != 0
+		    volatile
+#endif
+		    double fv = (double)(fq[i-1]+fq[i]);
+		    fq[i]  += fq[i-1]-fv;
+		    fq[i-1] = fv;
 		}
 		for (fw=0.0,i=jz;i>=2;i--) fw += fq[i];
 		if(ih==0) {