From: Andrew Cagney Date: Mon, 15 Sep 2003 21:28:49 +0000 (+0000) Subject: floatformat.h (struct floatformat): Make "exp_bias" signed. X-Git-Tag: releases/gcc-3.4.0~3726 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a4cbdc57c8be340db5e10ba32c56c1114858daee;p=thirdparty%2Fgcc.git floatformat.h (struct floatformat): Make "exp_bias" signed. 2003-09-15 Andrew Cagney * floatformat.h (struct floatformat): Make "exp_bias" signed. From-SVN: r71407 --- diff --git a/include/ChangeLog b/include/ChangeLog index 2f29f64c1475..037dee57f92e 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2003-09-15 Andrew Cagney + + * floatformat.h (struct floatformat): Make "exp_bias" signed. + 2003-09-15 Daniel Jacobowitz * floatformat.h (floatformat_is_valid): Add prototype. diff --git a/include/floatformat.h b/include/floatformat.h index feb3260117c4..1d08fd6183f0 100644 --- a/include/floatformat.h +++ b/include/floatformat.h @@ -61,8 +61,12 @@ struct floatformat unsigned int exp_start; unsigned int exp_len; - /* Amount added to "true" exponent. 0x3fff for many IEEE extendeds. */ - unsigned int exp_bias; + /* Bias added to a "true" exponent to form the biased exponent. It + is intentionally signed as, otherwize, -exp_bias can turn into a + very large number (e.g., given the exp_bias of 0x3fff and a 64 + bit long, the equation (long)(1 - exp_bias) evaluates to + 4294950914) instead of -16382). */ + int exp_bias; /* Exponent value which indicates NaN. This is the actual value stored in the float, not adjusted by the exp_bias. This usually consists of all one bits. */