summaryrefslogtreecommitdiff
path: root/gcc/real.c
Commit message (Collapse)AuthorAgeFilesLines
* Update mainline egcs to gcc2 snapshot 971021.law1997-11-021-3/+7
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16278 138bc75d-0d04-0410-961f-82ee72b054a4
* * version.c: Bump version to "gcc-3.0.0 970802 experimental".law1997-08-121-4/+70
| | | | | | | | | | | | | * gcc.info*: Rebuilt. * COPYING.g77, README.g77: New files. * real.c (ereal_unto_float, ereal_unto_double): New functions. * real.h (ereal_unto_float, ereal_unto_double): Declare them. (REAL_VALUE_UNTO_TARGET_DOUBLE, REAL_VALUE_UNTO_TARGET_SINGLE): Define. Get g77 to work with gcc3. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@14776 138bc75d-0d04-0410-961f-82ee72b054a4
* (exact_real_inverse): New function, if REAL_ARITHMETIC.kenner1996-10-231-0/+62
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13002 138bc75d-0d04-0410-961f-82ee72b054a4
* formatting tweaksmrs1996-07-031-82/+84
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12390 138bc75d-0d04-0410-961f-82ee72b054a4
* (asctoeg): `0.0eX' is zero, regardless of the exponent X.kenner1996-06-281-0/+8
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12373 138bc75d-0d04-0410-961f-82ee72b054a4
* (eadd1): Check for overflow on X plus X.kenner1996-04-151-1/+8
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@11782 138bc75d-0d04-0410-961f-82ee72b054a4
* (ereal_from_{int,uint}): New arg, MODE.kenner1996-04-141-2/+68
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@11763 138bc75d-0d04-0410-961f-82ee72b054a4
* (e64toe): Properly distinguish between NaN and infinity bit patternskenner1996-04-101-4/+34
| | | | | | | | | | | for real-words-big-endian targets. (endian): Add two explicit casts. (e64toe): Support ARM extended precision fp format. Check negative infinities properly for NaNs. (toe64): Support ARM extended precision fp format. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@11688 138bc75d-0d04-0410-961f-82ee72b054a4
* (significand_size): Don't test the modes, but their sizes.kenner1996-03-041-6/+9
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@11415 138bc75d-0d04-0410-961f-82ee72b054a4
* (ediv, emul): Set sign bit of IEEE -0.0 result.kenner1995-08-151-33/+41
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10244 138bc75d-0d04-0410-961f-82ee72b054a4
* Update FSF address.kenner1995-06-151-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9964 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix typos in comments.kenner1995-05-161-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9712 138bc75d-0d04-0410-961f-82ee72b054a4
* (emdnorm, toe64, etoe64): Significand of Intel long double denormalskenner1995-05-051-3/+23
| | | | | | | is shifted down one bit. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9578 138bc75d-0d04-0410-961f-82ee72b054a4
* (REAL_WORDS_BIG_ENDIAN): New macro. Define as eitherkenner1995-02-221-250/+254
| | | | | | | | | | FLOAT_WORDS_BIG_ENDIAN or HOST_FLOAT_WORDS_BIG_ENDIAN. Use it instead of FLOAT_WORDS_BIG_ENDIAN. (m16m, edivm, emulm): Change `short' to `EMUSHORT', and `long' to `EMULONG'. Clean up comments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9027 138bc75d-0d04-0410-961f-82ee72b054a4
* Update comments.kenner1995-01-251-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8815 138bc75d-0d04-0410-961f-82ee72b054a4
* (toe64): Use Intel bit pattern for little-endian XFmode Inf.kenner1995-01-121-4/+19
| | | | | | | (e64toe): Likewise; also check the exponent field properly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8734 138bc75d-0d04-0410-961f-82ee72b054a4
* Check target endianness at run time, not compile timeian1994-11-161-425/+530
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8470 138bc75d-0d04-0410-961f-82ee72b054a4
* (GET_REAL, PUT_REAL): Cast args to bcopy to char *.kenner1994-11-051-4/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8390 138bc75d-0d04-0410-961f-82ee72b054a4
* Treat HFmode like SFmode, for now.kenner1994-06-281-0/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7576 138bc75d-0d04-0410-961f-82ee72b054a4
* (significand_size): New function.kenner1994-05-301-1/+39
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7387 138bc75d-0d04-0410-961f-82ee72b054a4
* (ereal_from_int, ereal_to_int, etarsingle): Correct signed/unsignedkenner1994-05-161-27/+21
| | | | | | | | | discrepancies. (ereal_from_double): Avoid "right shift count too big" warning in previous change. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7313 138bc75d-0d04-0410-961f-82ee72b054a4
* (ereal_from_float, .._double): Change arg from long to HOST_WIDE_INTkenner1994-05-161-10/+28
| | | | | | | and unpack the HOST_WIDE_INTs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7312 138bc75d-0d04-0410-961f-82ee72b054a4
* (m16m): Change first arg to int; all callers changed.kenner1994-05-121-4/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7285 138bc75d-0d04-0410-961f-82ee72b054a4
* (etoe53, etoe24): Make all occurrences static.kenner1994-04-241-6/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7144 138bc75d-0d04-0410-961f-82ee72b054a4
* Upate comments and copyright notice.kenner1994-04-211-593/+347
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7130 138bc75d-0d04-0410-961f-82ee72b054a4
* Make most functions static and add prototypes for all static functions.kenner1994-04-211-125/+225
| | | | | | | | (GET_REAL, PUT_REAL): Cast parameter to proper pointer type in some cases; use unsigned array. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7120 138bc75d-0d04-0410-961f-82ee72b054a4
* (target_negative): -0 counts as negative.kenner1994-03-091-7/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6735 138bc75d-0d04-0410-961f-82ee72b054a4
* (real_value_truncate): If requested mode is not supported, return thekenner1994-02-161-1/+4
| | | | | | | unmodified input instead of aborting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6568 138bc75d-0d04-0410-961f-82ee72b054a4
* (eifrac): If FIXUNS_TRUNC_LIKE_FIX_TRUNC, convert on positive overflowkenner1994-02-151-12/+18
| | | | | | | as if unsigned. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6554 138bc75d-0d04-0410-961f-82ee72b054a4
* (earith, ereal_negate, eneg, eisneg, enan, emovo, esub, eadd, ediv):kenner1994-02-091-55/+58
| | | | | | | | | | | Propagate the sign of NaNs, so that e.g. -(NaN) evaluates to -NaN. (emul, eremain, e53toe, e64toe, e113toe, e24toe, esqrt): Likewise. (make_nan): New arg specifies sign of NaN. All callers changed. (eiisneg): New function. (esqrt): Compute sqrt(-0.0) to be -0.0, not 0.0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6511 138bc75d-0d04-0410-961f-82ee72b054a4
* (emovo): Use separate variable for loop index.kenner1994-01-311-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6448 138bc75d-0d04-0410-961f-82ee72b054a4
* (FLOAT_WORDS_BIG_ENDIAN, HOST_FLOAT_WORDS_BIG_ENDIAN): Use everywherekenner1993-10-131-57/+72
| | | | | | | | | | in place of WORDS_BIG_ENDIAN, HOST_WORDS_BIG_ENDIAN, except in reference to endian-ness of integers. (etrunci, etruncui, efixi, efixui, ereal_from_int, ereal_to_int, ltoe, ultoe, eifrac, euifrac): Change `long' to `HOST_WIDE_INT'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5776 138bc75d-0d04-0410-961f-82ee72b054a4
* (debug_real): New function.rms1993-10-111-4/+18
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5742 138bc75d-0d04-0410-961f-82ee72b054a4
* Whitespace changes.rms1993-10-111-125/+127
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5740 138bc75d-0d04-0410-961f-82ee72b054a4
* (asctoeg): Fix backward condition in last change.rms1993-10-111-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5719 138bc75d-0d04-0410-961f-82ee72b054a4
* (asctoeg): Allocate local buffer dynamically. Countrms1993-10-091-9/+9
| | | | | | | any lost significant digits before the decimal point. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5696 138bc75d-0d04-0410-961f-82ee72b054a4
* (real_value_truncate): Correct etrunci argument in case SImode.rms1993-10-061-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5638 138bc75d-0d04-0410-961f-82ee72b054a4
* (GET_REAL, PUT_REAL): Add TFmode versions.wilson1993-08-131-231/+1192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (MAXDECEXP, MINDECEXP): New decimal exponent limits that vary with definition of LONG_DOUBLE_TYPE_SIZE. (endian, ereal_atof, real_value_truncate, einfin, emdnorm, asctoeg): Add cases for TFmode. (etartdouble): New function converts REAL_VALUE_TYPE to TFmode for use by ASM_OUTPUT_LONG_DOUBLE. (edivm, emulm): Ifdef out, replace by faster multiply and divide. (etoe113, toe113, e113toe): New type conversions for TFmode. (asctoe113, e113toasc): New TFmode binary <-> decimal conversions. (at top level): Define constants ezero, eone, emtens, etens, ... in a new 20-byte format when LONG_DOUBLE_TYPE_SIZE = 128 and set NE to 10. Otherwise, the internal format remains 12 bytes wide. (etoudi, etodi, ditoe, uditoe): New functions, signed and unsigned DImode float and fix, for real.c used in a libgcc-of-last-resort. (esqrt): New function, correctly rounded square root for libgcc. (etodec): Delete ifdef'd version. (eroundi, eroundui): Rename to efixi, efixui and always round towards zero. From frank@atom.ansto.gov.au (Frank Crawford): (etoibm, toibm, ibmtoe): New conversions for IBM 370 float format. (e53toe, e64toe, toe64, etoe53, toe53, etoe24, toe24, asctoe53, asctoeg, make_nan): Ifdef for IBM. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5153 138bc75d-0d04-0410-961f-82ee72b054a4
* (ltoe, ultoe, eifrac, euifrac): Handle 64-bit longs.rms1993-06-161-70/+88
| | | | | | | | (SFMODE_NAN, DFMODE_NAN, XFMODE_NAN, TFMODE_NAN): New macros permit definitions of NaN patterns to be overridden in tm.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4680 138bc75d-0d04-0410-961f-82ee72b054a4
* (ereal_from_float, ereal_from_double): New functions.rms1993-06-131-0/+64
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4670 138bc75d-0d04-0410-961f-82ee72b054a4
* (ereal_to_int): Fix potentially wrong-endian argument passed to eisnan.rms1993-05-221-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4537 138bc75d-0d04-0410-961f-82ee72b054a4
* (target_isnan): Use GET_REAL macro to get argument.rms1993-05-221-1/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4536 138bc75d-0d04-0410-961f-82ee72b054a4
* (emdnorm): Fix typo affecting roundoff behavior in XFmode.rms1993-05-211-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4533 138bc75d-0d04-0410-961f-82ee72b054a4
* (e24toe, e53toe, e64toe): Fix sign in conversionsrms1993-05-201-4/+9
| | | | | | | of -infinity. Always do eclear before einfin. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4513 138bc75d-0d04-0410-961f-82ee72b054a4
* (enan): Add forward decl.rms1993-05-111-0/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4422 138bc75d-0d04-0410-961f-82ee72b054a4
* (mtherr): Don't put newlines in error message string.rms1993-05-091-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4403 138bc75d-0d04-0410-961f-82ee72b054a4
* (NAN): Define for support of Not-a-Number bit patterns.rms1993-05-091-120/+597
| | | | | | | | | | | | | | | | | | | | | | | | | | (make_nan): New function outputs a NaN in requested machine mode. (eisnan, eiisnan, enan, einan, eiisinf, eiinfin): New functions. (earith, etrunci, etruncui, ereal_negate, ereal_ldexp, real_value_truncate, esub, eadd, emul, ediv, eremain): Return NaN arg back to caller. (eroundi, eroundui, ereal_to_int): NaN to integer returns -1 and a warning. (target_isnan): Check for NaN. (eneg): No-op if NaN. (eisneg, eisinf): False if NaN. (emovi, emovo): Handle NaN conversions. (esub, eadd): Infinity minus infinity = NaN and INVALID warning. (ediv): 0/0, inf/inf = NaN and INVALID warning. (emul): 0 * inf = NaN and INVALID warning. (e24toe, e53toe, e64toe): Generate e-type NaN for NaN input. (etoe24, etoe53, etoe64): Output NaN in appropriate machine mode. (ecmp): Unordered compare returns -2. (etoasc): NaN produces ASCII string "NaN". (asctoe): Unrecognizable input produces e-type NaN. (eremain): x REM y = NaN if y = 0 or x = infinity. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4401 138bc75d-0d04-0410-961f-82ee72b054a4
* Take out previous change.rms1993-05-021-7/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4306 138bc75d-0d04-0410-961f-82ee72b054a4
* (EDOM, ERANGE): Define only if not defined. (Less risky.)rms1993-05-021-0/+7
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4303 138bc75d-0d04-0410-961f-82ee72b054a4
* Do not define EDOM/ERANGE.meissner1993-05-021-3/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4302 138bc75d-0d04-0410-961f-82ee72b054a4