diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-05-24 20:44:34 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-05-24 20:44:34 +0000 |
commit | 86ba147f547e44230075efab78252c08bc8d8c2e (patch) | |
tree | 6376f98a68555af3b62356fcc2d0f7b310afa452 /libgo/runtime/runtime.c | |
parent | 6fac31b418c9bbceaaab53ef8e4be166609bda4a (diff) | |
download | gcc-86ba147f547e44230075efab78252c08bc8d8c2e.zip gcc-86ba147f547e44230075efab78252c08bc8d8c2e.tar.gz gcc-86ba147f547e44230075efab78252c08bc8d8c2e.tar.bz2 |
runtime: Copy runtime_printf from other Go library.
From-SVN: r187848
Diffstat (limited to 'libgo/runtime/runtime.c')
-rw-r--r-- | libgo/runtime/runtime.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libgo/runtime/runtime.c b/libgo/runtime/runtime.c index 3c8d762..72875fd 100644 --- a/libgo/runtime/runtime.c +++ b/libgo/runtime/runtime.c @@ -236,3 +236,15 @@ runtime_showframe(const unsigned char *s) traceback = runtime_gotraceback(); return traceback > 1 || (__builtin_strchr((const char*)s, '.') != nil && __builtin_memcmp(s, "runtime.", 7) != 0); } + +bool +runtime_isInf(float64 f, int32 sign) +{ + if(!__builtin_isinf(f)) + return false; + if(sign == 0) + return true; + if(sign > 0) + return f > 0; + return f < 0; +} |