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/optabs.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/optabs.c')
-rw-r--r-- | gcc/optabs.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index 45bfbbde482..d79cf668c60 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -4375,9 +4375,10 @@ expand_float (rtx to, rtx from, int unsignedp) } } - /* Unsigned integer, and no way to convert directly. - Convert as signed, then conditionally adjust the result. */ - if (unsignedp && can_do_signed) + /* Unsigned integer, and no way to convert directly. For binary + floating point modes, convert as signed, then conditionally adjust + the result. */ + if (unsignedp && can_do_signed && !DECIMAL_FLOAT_MODE_P (GET_MODE (to))) { rtx label = gen_label_rtx (); rtx temp; @@ -4837,6 +4838,8 @@ static void init_floating_libfuncs (optab optable, const char *opname, int suffix) { init_libfuncs (optable, MIN_MODE_FLOAT, MAX_MODE_FLOAT, opname, suffix); + init_libfuncs (optable, MIN_MODE_DECIMAL_FLOAT, MAX_MODE_DECIMAL_FLOAT, + opname, suffix); } /* Initialize the libfunc fields of an entire group of entries of an @@ -5254,16 +5257,32 @@ init_optabs (void) /* Conversions. */ init_interclass_conv_libfuncs (sfloat_optab, "float", MODE_INT, MODE_FLOAT); + init_interclass_conv_libfuncs (sfloat_optab, "float", + MODE_INT, MODE_DECIMAL_FLOAT); init_interclass_conv_libfuncs (ufloat_optab, "floatun", MODE_INT, MODE_FLOAT); + init_interclass_conv_libfuncs (ufloat_optab, "floatun", + MODE_INT, MODE_DECIMAL_FLOAT); init_interclass_conv_libfuncs (sfix_optab, "fix", MODE_FLOAT, MODE_INT); + init_interclass_conv_libfuncs (sfix_optab, "fix", + MODE_DECIMAL_FLOAT, MODE_INT); init_interclass_conv_libfuncs (ufix_optab, "fixuns", MODE_FLOAT, MODE_INT); + init_interclass_conv_libfuncs (ufix_optab, "fixuns", + MODE_DECIMAL_FLOAT, MODE_INT); + init_interclass_conv_libfuncs (ufloat_optab, "floatuns", + MODE_INT, MODE_DECIMAL_FLOAT); /* sext_optab is also used for FLOAT_EXTEND. */ init_intraclass_conv_libfuncs (sext_optab, "extend", MODE_FLOAT, true); + init_intraclass_conv_libfuncs (sext_optab, "extend", MODE_DECIMAL_FLOAT, true); + init_interclass_conv_libfuncs (sext_optab, "extend", MODE_FLOAT, MODE_DECIMAL_FLOAT); + init_interclass_conv_libfuncs (sext_optab, "extend", MODE_DECIMAL_FLOAT, MODE_FLOAT); init_intraclass_conv_libfuncs (trunc_optab, "trunc", MODE_FLOAT, false); + init_intraclass_conv_libfuncs (trunc_optab, "trunc", MODE_DECIMAL_FLOAT, false); + init_interclass_conv_libfuncs (trunc_optab, "trunc", MODE_FLOAT, MODE_DECIMAL_FLOAT); + init_interclass_conv_libfuncs (trunc_optab, "trunc", MODE_DECIMAL_FLOAT, MODE_FLOAT); /* Use cabs for double complex abs, since systems generally have cabs. Don't define any libcall for float complex, so that cabs will be used. */ |