Mercurial > hg > CbC > CbC_gcc
comparison gcc/real.h @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* Definitions of floating-point access for GNU compiler. | 1 /* Definitions of floating-point access for GNU compiler. |
2 Copyright (C) 1989-2017 Free Software Foundation, Inc. | 2 Copyright (C) 1989-2018 Free Software Foundation, Inc. |
3 | 3 |
4 This file is part of GCC. | 4 This file is part of GCC. |
5 | 5 |
6 GCC is free software; you can redistribute it and/or modify it under | 6 GCC is free software; you can redistribute it and/or modify it under |
7 the terms of the GNU General Public License as published by the Free | 7 the terms of the GNU General Public License as published by the Free |
214 template<typename T> format_helper (const T &); | 214 template<typename T> format_helper (const T &); |
215 const real_format *operator-> () const { return m_format; } | 215 const real_format *operator-> () const { return m_format; } |
216 operator const real_format *() const { return m_format; } | 216 operator const real_format *() const { return m_format; } |
217 | 217 |
218 bool decimal_p () const { return m_format && m_format->b == 10; } | 218 bool decimal_p () const { return m_format && m_format->b == 10; } |
219 bool can_represent_integral_type_p (tree type) const; | |
219 | 220 |
220 private: | 221 private: |
221 const real_format *m_format; | 222 const real_format *m_format; |
222 }; | 223 }; |
223 | 224 |
505 | 506 |
506 /* Check whether the real constant value given is an integer. */ | 507 /* Check whether the real constant value given is an integer. */ |
507 extern bool real_isinteger (const REAL_VALUE_TYPE *, format_helper); | 508 extern bool real_isinteger (const REAL_VALUE_TYPE *, format_helper); |
508 extern bool real_isinteger (const REAL_VALUE_TYPE *, HOST_WIDE_INT *); | 509 extern bool real_isinteger (const REAL_VALUE_TYPE *, HOST_WIDE_INT *); |
509 | 510 |
511 /* Calculate nextafter (X, Y) in format FMT. */ | |
512 extern bool real_nextafter (REAL_VALUE_TYPE *, format_helper, | |
513 const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *); | |
514 | |
510 /* Write into BUF the maximum representable finite floating-point | 515 /* Write into BUF the maximum representable finite floating-point |
511 number, (1 - b**-p) * b**emax for a given FP format FMT as a hex | 516 number, (1 - b**-p) * b**emax for a given FP format FMT as a hex |
512 float string. BUF must be large enough to contain the result. */ | 517 float string. BUF must be large enough to contain the result. */ |
513 extern void get_max_float (const struct real_format *, char *, size_t); | 518 extern void get_max_float (const struct real_format *, char *, size_t); |
514 | 519 |
517 extern wide_int real_to_integer (const REAL_VALUE_TYPE *, bool *, int); | 522 extern wide_int real_to_integer (const REAL_VALUE_TYPE *, bool *, int); |
518 extern void real_from_integer (REAL_VALUE_TYPE *, format_helper, | 523 extern void real_from_integer (REAL_VALUE_TYPE *, format_helper, |
519 const wide_int_ref &, signop); | 524 const wide_int_ref &, signop); |
520 #endif | 525 #endif |
521 | 526 |
527 /* Fills r with the largest value such that 1 + r*r won't overflow. | |
528 This is used in both sin (atan (x)) and cos (atan(x)) optimizations. */ | |
529 extern void build_sinatan_real (REAL_VALUE_TYPE *, tree); | |
530 | |
522 #endif /* ! GCC_REAL_H */ | 531 #endif /* ! GCC_REAL_H */ |