diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2008-08-12 13:13:38 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@gcc.gnu.org> | 2008-08-12 13:13:38 +0000 |
commit | 88f091f5aec9a1d5a9deebe5cd743dcab2760d84 (patch) | |
tree | b25b470542b27fbf4f61b6021a4e127af758b12b /gcc/real.c | |
parent | 4230d0fe3258a221706f791c04683bffb982e4f3 (diff) | |
download | gcc-88f091f5aec9a1d5a9deebe5cd743dcab2760d84.zip gcc-88f091f5aec9a1d5a9deebe5cd743dcab2760d84.tar.gz gcc-88f091f5aec9a1d5a9deebe5cd743dcab2760d84.tar.bz2 |
real.c (spu_single_format): New variable.
ChangeLog:
* real.c (spu_single_format): New variable.
* real.h (spu_single_format): Declare.
* config/spu/spu.c (spu_override_options): Install SFmode format.
(spu_split_immediate): Use integer mode to operate on pieces of
floating-point values in all cases.
* config/spu/spu.md (UNSPEC_FLOAT_EXTEND, UNSPEC_FLOAT_TRUNCATE): New.
("extendsfdf2"): Use UNSPEC_FLOAT_EXTEND instead of FLOAT_EXTEND.
("truncdfsf2"): Use UNSPEC_FLOAT_TRUNCATE instead of FLOAT_TRUNCATE.
testsuite/ChangeLog:
* gcc.c-torture/execute/ieee/inf-2.c (testf): Skip on the SPU.
Co-Authored-By: Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
From-SVN: r139013
Diffstat (limited to 'gcc/real.c')
-rw-r--r-- | gcc/real.c | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -2862,6 +2862,36 @@ const struct real_format motorola_single_format = true, true }; + +/* SPU Single Precision (Extended-Range Mode) format is the same as IEEE + single precision with the following differences: + - Infinities are not supported. Instead MAX_FLOAT or MIN_FLOAT + are generated. + - NaNs are not supported. + - The range of non-zero numbers in binary is + (001)[1.]000...000 to (255)[1.]111...111. + - Denormals can be represented, but are treated as +0.0 when + used as an operand and are never generated as a result. + - -0.0 can be represented, but a zero result is always +0.0. + - the only supported rounding mode is trunction (towards zero). */ +const struct real_format spu_single_format = + { + encode_ieee_single, + decode_ieee_single, + 2, + 24, + 24, + -125, + 129, + 31, + 31, + false, + false, + true, + true, + false, + false + }; /* IEEE double-precision format. */ |