aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/print.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-10-23 04:31:11 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-10-23 04:31:11 +0000
commit4ccad563d2a3559f0557bfb177bcf45144219bdf (patch)
tree46bb86f514fbf6bad82da48e69a18fb09d878834 /libgo/runtime/print.c
parent0b7463235f0e23c624d1911c9b15f531108cc5a6 (diff)
downloadgcc-4ccad563d2a3559f0557bfb177bcf45144219bdf.zip
gcc-4ccad563d2a3559f0557bfb177bcf45144219bdf.tar.gz
gcc-4ccad563d2a3559f0557bfb177bcf45144219bdf.tar.bz2
libgo: Update to current sources.
From-SVN: r192704
Diffstat (limited to 'libgo/runtime/print.c')
-rw-r--r--libgo/runtime/print.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libgo/runtime/print.c b/libgo/runtime/print.c
index 5a8e47e..690bcaf 100644
--- a/libgo/runtime/print.c
+++ b/libgo/runtime/print.c
@@ -156,15 +156,16 @@ runtime_printfloat(double v)
int32 e, s, i, n;
float64 h;
- if(runtime_isNaN(v)) {
+ if(ISNAN(v)) {
gwrite("NaN", 3);
return;
}
- if(runtime_isInf(v, 1)) {
+ i = __builtin_isinf_sign(v);
+ if(i > 0) {
gwrite("+Inf", 4);
return;
}
- if(runtime_isInf(v, -1)) {
+ if(i < 0) {
gwrite("-Inf", 4);
return;
}
@@ -290,8 +291,8 @@ runtime_printstring(String v)
// extern uint32 runtime_maxstring;
// if(v.len > runtime_maxstring) {
- // gwrite("[invalid string]", 16);
- // return;
+ // gwrite("[string too long]", 17);
+ // return;
// }
if(v.__length > 0)
gwrite(v.__data, v.__length);