aboutsummaryrefslogtreecommitdiff
path: root/stdio-common/tst-printf.c
diff options
context:
space:
mode:
authorTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>2017-10-13 15:44:39 -0300
committerTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>2017-10-13 15:44:39 -0300
commit179dcdb7af4983fd42824db748ee6cb05f8d71cf (patch)
tree97c3a0e45d5defa1789c5426e341b4081f20a48c /stdio-common/tst-printf.c
parent006e766437033d6565133ce356b55d7b301a7b58 (diff)
downloadglibc-179dcdb7af4983fd42824db748ee6cb05f8d71cf.zip
glibc-179dcdb7af4983fd42824db748ee6cb05f8d71cf.tar.gz
glibc-179dcdb7af4983fd42824db748ee6cb05f8d71cf.tar.bz2
[BZ #22142] powerpc: Fix the carry bit on mpn_[add|sub]_n on POWER7
Fix the ifdef clause that was being used in the opposite way, setting a wrong value of the carry bit. This is also correcting 2 memory accesses that were mistakenly referring to r0 while they were supposed to mean the immediate value 0. [BZ #22142] * stdio-common/tst-printf.c (fp_test): Add tests for DBL_MAX and -DBL_MAX. (do_test): Likewise. * stdio-common/tst-printf.sh: Likewise. * sysdeps/powerpc/powerpc64/power7/add_n.S: Invert the initial ifdef clause in order to set the carry bit right. Replace r0 by 0 without changing the behavior.
Diffstat (limited to 'stdio-common/tst-printf.c')
-rw-r--r--stdio-common/tst-printf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/stdio-common/tst-printf.c b/stdio-common/tst-printf.c
index b6d62a5..162effa 100644
--- a/stdio-common/tst-printf.c
+++ b/stdio-common/tst-printf.c
@@ -136,6 +136,8 @@ fp_test (void)
}
printf("%10s\n", (char *) NULL);
printf("%-10s\n", (char *) NULL);
+ printf("%.8f\n", DBL_MAX);
+ printf("%.8f\n", -DBL_MAX);
}
static int
@@ -181,6 +183,8 @@ I am ready for my first lesson today.";
printf("null string:\t\"%s\"\n", (char *)NULL);
printf("limited string:\t\"%.22s\"\n", longstr);
+ printf("a-style max:\t\"%a\"\n", DBL_MAX);
+ printf("a-style -max:\t\"%a\"\n", -DBL_MAX);
printf("e-style >= 1:\t\"%e\"\n", 12.34);
printf("e-style >= .1:\t\"%e\"\n", 0.1234);
printf("e-style < .1:\t\"%e\"\n", 0.001234);