diff options
author | bje <bje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-18 21:40:47 +0000 |
---|---|---|
committer | bje <bje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-18 21:40:47 +0000 |
commit | 069b07bf95a4a461cf593044cdae7ba1fbdfb984 (patch) | |
tree | 7e005c5de55a867524e5bf6183ab854c96880e3c /gcc/emit-rtl.c | |
parent | c2c4c18bdbd555961cf868c617311acb51cfac75 (diff) | |
download | gcc-069b07bf95a4a461cf593044cdae7ba1fbdfb984.tar.gz |
* optabs.c (init_floating_libfuncs): Handle decimal float modes.
(init_optabs): Handle libfuncs for decimal float.
* genopinit.c (gen_insn): Handle MODE_DECIMAL_FLOAT.
* stor-layout.c (int_mode_for_mode): Likewise.
* simplify-rtx.c (simplify_immed_subreg): Likewise.
(simplify_unary_operation_1): Skip optimisations for decimal float
modes.
* varasm.c (output_constant_pool_2): Handle MODE_DECIMAL_FLOAT.
* emit-rtl.c (gen_const_vector): Add assertion check.
(init_emit_once): Populate const_tiny_rtx with constants in each
decimal float mode.
* expmed.c (extract_high_half, expand_mult_highpart_optab,
expand_mult_highpart): Assert that mode is not a scalar float
mode.
* expr.c (convert_move): Handle conversion between decimal and
binary floats of the same size.
* convert.c (convert_to_real): Consider decimal float types when
folding.
* dwarf2out.c (base_type_die): Use DW_ATE_decimal_float to
describe decimal floating point types.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108762 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index d17258795fb..828651041a0 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -5151,6 +5151,8 @@ gen_const_vector (enum machine_mode mode, int constant) units = GET_MODE_NUNITS (mode); inner = GET_MODE_INNER (mode); + gcc_assert (!DECIMAL_FLOAT_MODE_P (inner)); + v = rtvec_alloc (units); /* We need to call this function after we set the scalar const_tiny_rtx @@ -5227,7 +5229,8 @@ init_emit_once (int line_numbers) word_mode = VOIDmode; double_mode = VOIDmode; - for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); mode != VOIDmode; + for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); + mode != VOIDmode; mode = GET_MODE_WIDER_MODE (mode)) { if (GET_MODE_BITSIZE (mode) == BITS_PER_UNIT @@ -5239,7 +5242,8 @@ init_emit_once (int line_numbers) word_mode = mode; } - for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); mode != VOIDmode; + for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); + mode != VOIDmode; mode = GET_MODE_WIDER_MODE (mode)) { if (GET_MODE_BITSIZE (mode) == DOUBLE_TYPE_SIZE @@ -5324,14 +5328,22 @@ init_emit_once (int line_numbers) REAL_VALUE_TYPE *r = (i == 0 ? &dconst0 : i == 1 ? &dconst1 : &dconst2); - for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); mode != VOIDmode; + for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); + mode != VOIDmode; + mode = GET_MODE_WIDER_MODE (mode)) + const_tiny_rtx[i][(int) mode] = + CONST_DOUBLE_FROM_REAL_VALUE (*r, mode); + + for (mode = GET_CLASS_NARROWEST_MODE (MODE_DECIMAL_FLOAT); + mode != VOIDmode; mode = GET_MODE_WIDER_MODE (mode)) const_tiny_rtx[i][(int) mode] = CONST_DOUBLE_FROM_REAL_VALUE (*r, mode); const_tiny_rtx[i][(int) VOIDmode] = GEN_INT (i); - for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); mode != VOIDmode; + for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); + mode != VOIDmode; mode = GET_MODE_WIDER_MODE (mode)) const_tiny_rtx[i][(int) mode] = GEN_INT (i); |