diff options
Diffstat (limited to 'gcc')
-rwxr-xr-x | gcc/c-decl.c | 16 | ||||
-rwxr-xr-x | gcc/combine.c | 15 | ||||
-rwxr-xr-x | gcc/emit-rtl.c | 17 | ||||
-rwxr-xr-x | gcc/expmed.c | 9 | ||||
-rwxr-xr-x | gcc/expr.c | 160 | ||||
-rwxr-xr-x | gcc/machmode.def | 20 | ||||
-rwxr-xr-x | gcc/machmode.h | 3 | ||||
-rwxr-xr-x | gcc/optabs.c | 14 | ||||
-rwxr-xr-x | gcc/recog.c | 12 | ||||
-rwxr-xr-x | gcc/stor-layout.c | 1 | ||||
-rwxr-xr-x | gcc/varasm.c | 4 |
11 files changed, 20 insertions, 251 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index d431f59..c43774b 100755 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -147,17 +147,11 @@ tree intQI_type_node; tree intHI_type_node; tree intSI_type_node; tree intDI_type_node; -#if HOST_BITS_PER_WIDE_INT >= 64 -tree intTI_type_node; -#endif tree unsigned_intQI_type_node; tree unsigned_intHI_type_node; tree unsigned_intSI_type_node; tree unsigned_intDI_type_node; -#if HOST_BITS_PER_WIDE_INT >= 64 -tree unsigned_intTI_type_node; -#endif /* a VOID_TYPE node. */ @@ -3091,11 +3085,6 @@ init_decl_processing () intDI_type_node = make_signed_type (GET_MODE_BITSIZE (DImode)); pushdecl (build_decl (TYPE_DECL, NULL_TREE, intDI_type_node)); -#if HOST_BITS_PER_WIDE_INT >= 64 - intTI_type_node = make_signed_type (GET_MODE_BITSIZE (TImode)); - pushdecl (build_decl (TYPE_DECL, NULL_TREE, intTI_type_node)); -#endif - unsigned_intQI_type_node = make_unsigned_type (GET_MODE_BITSIZE (QImode)); pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intQI_type_node)); @@ -3108,11 +3097,6 @@ init_decl_processing () unsigned_intDI_type_node = make_unsigned_type (GET_MODE_BITSIZE (DImode)); pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intDI_type_node)); -#if HOST_BITS_PER_WIDE_INT >= 64 - unsigned_intTI_type_node = make_unsigned_type (GET_MODE_BITSIZE (TImode)); - pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intTI_type_node)); -#endif - float_type_node = make_node (REAL_TYPE); TYPE_PRECISION (float_type_node) = FLOAT_TYPE_SIZE; pushdecl (build_decl (TYPE_DECL, ridpointers[(int) RID_FLOAT], diff --git a/gcc/combine.c b/gcc/combine.c index 5bc62d9..0317d14 100755 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -2903,14 +2903,6 @@ find_split_point (loc, insn) case SIGN_EXTEND: inner = XEXP (SET_SRC (x), 0); - - /* We can't optimize if either mode is a partial integer - mode as we don't know how many bits are significant - in those modes. */ - if (GET_MODE_CLASS (GET_MODE (inner)) == MODE_PARTIAL_INT - || GET_MODE_CLASS (GET_MODE (SET_SRC (x))) == MODE_PARTIAL_INT) - break; - pos = 0; len = GET_MODE_BITSIZE (GET_MODE (inner)); unsignedp = 0; @@ -3855,12 +3847,6 @@ simplify_rtx (x, op0_mode, last, in_dest) break; case TRUNCATE: - /* We can't handle truncation to a partial integer mode here - because we don't know the real bitsize of the partial - integer mode. */ - if (GET_MODE_CLASS (mode) == MODE_PARTIAL_INT) - break; - if (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT && TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode), GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0))))) @@ -10495,7 +10481,6 @@ reversible_comparison_p (x) switch (GET_MODE_CLASS (GET_MODE (XEXP (x, 0)))) { case MODE_INT: - case MODE_PARTIAL_INT: case MODE_COMPLEX_INT: return 1; diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 3e23a23..b963f16 100755 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -626,8 +626,7 @@ gen_lowpart_common (mode, x) / UNITS_PER_WORD); if ((GET_CODE (x) == ZERO_EXTEND || GET_CODE (x) == SIGN_EXTEND) - && (GET_MODE_CLASS (mode) == MODE_INT - || GET_MODE_CLASS (mode) == MODE_PARTIAL_INT)) + && GET_MODE_CLASS (mode) == MODE_INT) { /* If we are getting the low-order part of something that has been sign- or zero-extended, we can either just use the object being @@ -698,8 +697,7 @@ gen_lowpart_common (mode, x) } /* If X is a CONST_INT or a CONST_DOUBLE, extract the appropriate bits from the low-order part of the constant. */ - else if ((GET_MODE_CLASS (mode) == MODE_INT - || GET_MODE_CLASS (mode) == MODE_PARTIAL_INT) + else if (GET_MODE_CLASS (mode) == MODE_INT && GET_MODE (x) == VOIDmode && (GET_CODE (x) == CONST_INT || GET_CODE (x) == CONST_DOUBLE)) { @@ -835,8 +833,7 @@ gen_lowpart_common (mode, x) else if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD) || flag_pretend_float) - && (GET_MODE_CLASS (mode) == MODE_INT - || GET_MODE_CLASS (mode) == MODE_PARTIAL_INT) + && GET_MODE_CLASS (mode) == MODE_INT && GET_CODE (x) == CONST_DOUBLE && GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT && GET_MODE_BITSIZE (mode) == BITS_PER_WORD) @@ -850,8 +847,7 @@ gen_lowpart_common (mode, x) else if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD) || flag_pretend_float) - && (GET_MODE_CLASS (mode) == MODE_INT - || GET_MODE_CLASS (mode) == MODE_PARTIAL_INT) + && GET_MODE_CLASS (mode) == MODE_INT && GET_CODE (x) == CONST_DOUBLE && GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT && GET_MODE_BITSIZE (mode) == 2 * BITS_PER_WORD) @@ -3502,11 +3498,6 @@ init_emit_once (line_numbers) 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); - - for (mode = GET_CLASS_NARROWEST_MODE (MODE_PARTIAL_INT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - const_tiny_rtx[i][(int) mode] = GEN_INT (i); } for (mode = GET_CLASS_NARROWEST_MODE (MODE_CC); mode != VOIDmode; diff --git a/gcc/expmed.c b/gcc/expmed.c index c9b716a..314f125 100755 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -305,8 +305,7 @@ store_bit_field (str_rtx, bitsize, bitnum, fieldmode, value, align, total_size) if (GET_CODE (op0) == SUBREG) { if (GET_MODE (SUBREG_REG (op0)) == fieldmode - || GET_MODE_CLASS (fieldmode) == MODE_INT - || GET_MODE_CLASS (fieldmode) == MODE_PARTIAL_INT) + || GET_MODE_CLASS (fieldmode) == MODE_INT) op0 = SUBREG_REG (op0); else /* Else we've got some float mode source being extracted into @@ -353,8 +352,7 @@ store_bit_field (str_rtx, bitsize, bitnum, fieldmode, value, align, total_size) if (GET_CODE (op0) == SUBREG) { if (GET_MODE (SUBREG_REG (op0)) == fieldmode - || GET_MODE_CLASS (fieldmode) == MODE_INT - || GET_MODE_CLASS (fieldmode) == MODE_PARTIAL_INT) + || GET_MODE_CLASS (fieldmode) == MODE_INT) op0 = SUBREG_REG (op0); else /* Else we've got some float mode source being extracted into @@ -1072,8 +1070,7 @@ extract_bit_field (str_rtx, bitsize, bitnum, unsignedp, if (GET_CODE (op0) == SUBREG) { if (GET_MODE (SUBREG_REG (op0)) == mode1 - || GET_MODE_CLASS (mode1) == MODE_INT - || GET_MODE_CLASS (mode1) == MODE_PARTIAL_INT) + || GET_MODE_CLASS (mode1) == MODE_INT) op0 = SUBREG_REG (op0); else /* Else we've got some float mode source being extracted into @@ -755,112 +755,6 @@ convert_move (to, from, unsignedp) return; } - /* Handle pointer conversion */ /* SPEE 900220 */ - if (to_mode == PQImode) - { - if (from_mode != QImode) - from = convert_to_mode (QImode, from, unsignedp); - -#ifdef HAVE_truncqipqi2 - if (HAVE_truncqipqi2) - { - emit_unop_insn (CODE_FOR_truncqipqi2, to, from, UNKNOWN); - return; - } -#endif /* HAVE_truncqipqi2 */ - abort (); - } - - if (from_mode == PQImode) - { - if (to_mode != QImode) - { - from = convert_to_mode (QImode, from, unsignedp); - from_mode = QImode; - } - else - { -#ifdef HAVE_extendpqiqi2 - if (HAVE_extendpqiqi2) - { - emit_unop_insn (CODE_FOR_extendpqiqi2, to, from, UNKNOWN); - return; - } -#endif /* HAVE_extendpqiqi2 */ - abort (); - } - } - - if (to_mode == PSImode) - { - if (from_mode != SImode) - from = convert_to_mode (SImode, from, unsignedp); - -#ifdef HAVE_truncsipsi2 - if (HAVE_truncsipsi2) - { - emit_unop_insn (CODE_FOR_truncsipsi2, to, from, UNKNOWN); - return; - } -#endif /* HAVE_truncsipsi2 */ - abort (); - } - - if (from_mode == PSImode) - { - if (to_mode != SImode) - { - from = convert_to_mode (SImode, from, unsignedp); - from_mode = SImode; - } - else - { -#ifdef HAVE_extendpsisi2 - if (HAVE_extendpsisi2) - { - emit_unop_insn (CODE_FOR_extendpsisi2, to, from, UNKNOWN); - return; - } -#endif /* HAVE_extendpsisi2 */ - abort (); - } - } - - if (to_mode == PDImode) - { - if (from_mode != DImode) - from = convert_to_mode (DImode, from, unsignedp); - -#ifdef HAVE_truncdipdi2 - if (HAVE_truncdipdi2) - { - emit_unop_insn (CODE_FOR_truncdipdi2, to, from, UNKNOWN); - return; - } -#endif /* HAVE_truncdipdi2 */ - abort (); - } - - if (from_mode == PDImode) - { - if (to_mode != DImode) - { - from = convert_to_mode (DImode, from, unsignedp); - from_mode = DImode; - } - else - { -#ifdef HAVE_extendpdidi2 - if (HAVE_extendpdidi2) - { - emit_unop_insn (CODE_FOR_extendpdidi2, to, from, UNKNOWN); - return; - } -#endif /* HAVE_extendpdidi2 */ - abort (); - } - } - /* Now follow all the conversions between integers no more than a word long. */ @@ -1009,58 +903,6 @@ convert_move (to, from, unsignedp) return; } - if (from_mode == TImode && to_mode == DImode) - { -#ifdef HAVE_trunctidi2 - if (HAVE_trunctidi2) - { - emit_unop_insn (CODE_FOR_trunctidi2, to, from, UNKNOWN); - return; - } -#endif - convert_move (to, force_reg (from_mode, from), unsignedp); - return; - } - - if (from_mode == TImode && to_mode == SImode) - { -#ifdef HAVE_trunctisi2 - if (HAVE_trunctisi2) - { - emit_unop_insn (CODE_FOR_trunctisi2, to, from, UNKNOWN); - return; - } -#endif - convert_move (to, force_reg (from_mode, from), unsignedp); - return; - } - - if (from_mode == TImode && to_mode == HImode) - { -#ifdef HAVE_trunctihi2 - if (HAVE_trunctihi2) - { - emit_unop_insn (CODE_FOR_trunctihi2, to, from, UNKNOWN); - return; - } -#endif - convert_move (to, force_reg (from_mode, from), unsignedp); - return; - } - - if (from_mode == TImode && to_mode == QImode) - { -#ifdef HAVE_trunctiqi2 - if (HAVE_trunctiqi2) - { - emit_unop_insn (CODE_FOR_trunctiqi2, to, from, UNKNOWN); - return; - } -#endif - convert_move (to, force_reg (from_mode, from), unsignedp); - return; - } - /* Handle truncation of volatile memrefs, and so on; the things that couldn't be truncated directly, and for which there was no special instruction. */ @@ -9478,7 +9320,7 @@ apply_result_size () enum machine_mode best_mode = VOIDmode; for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); - mode != TImode; + mode != VOIDmode; mode = GET_MODE_WIDER_MODE (mode)) if (HARD_REGNO_MODE_OK (regno, mode)) best_mode = mode; diff --git a/gcc/machmode.def b/gcc/machmode.def index ab2215e..3d255b7 100755 --- a/gcc/machmode.def +++ b/gcc/machmode.def @@ -63,27 +63,13 @@ Boston, MA 02111-1307, USA. */ as for example on CONST_INT RTL expressions. */ DEF_MACHMODE (VOIDmode, "VOID", MODE_RANDOM, 0, 0, VOIDmode) -DEF_MACHMODE (PQImode, "PQI", MODE_PARTIAL_INT, 1, 1, PHImode) DEF_MACHMODE (QImode, "QI", MODE_INT, 1, 1, HImode) /* int types */ -DEF_MACHMODE (PHImode, "PHI", MODE_PARTIAL_INT, 2, 2, PSImode) DEF_MACHMODE (HImode, "HI", MODE_INT, 2, 2, SImode) -/* Pointers on some machines use this type to distinguish them from ints. - Useful if a pointer is 4 bytes but has some bits that are not significant, - so it is really not quite as wide as an integer. */ -DEF_MACHMODE (PSImode, "PSI", MODE_PARTIAL_INT, 4, 4, PDImode) DEF_MACHMODE (SImode, "SI", MODE_INT, 4, 4, DImode) -DEF_MACHMODE (PDImode, "PDI", MODE_PARTIAL_INT, 8, 8, VOIDmode) -DEF_MACHMODE (DImode, "DI", MODE_INT, 8, 8, TImode) -DEF_MACHMODE (TImode, "TI", MODE_INT, 16, 16, OImode) -DEF_MACHMODE (OImode, "OI", MODE_INT, 32, 32, VOIDmode) - -DEF_MACHMODE (QFmode, "QF", MODE_FLOAT, 1, 1, HFmode) -DEF_MACHMODE (HFmode, "HF", MODE_FLOAT, 2, 2, TQFmode) -DEF_MACHMODE (TQFmode, "TQF", MODE_FLOAT, 3, 3, SFmode) /* MIL-STD-1750A */ +DEF_MACHMODE (DImode, "DI", MODE_INT, 8, 8, VOIDmode) + DEF_MACHMODE (SFmode, "SF", MODE_FLOAT, 4, 4, DFmode) -DEF_MACHMODE (DFmode, "DF", MODE_FLOAT, 8, 8, XFmode) -DEF_MACHMODE (XFmode, "XF", MODE_FLOAT, 12, 12, TFmode) /* IEEE extended */ -DEF_MACHMODE (TFmode, "TF", MODE_FLOAT, 16, 16, VOIDmode) +DEF_MACHMODE (DFmode, "DF", MODE_FLOAT, 8, 8, VOIDmode) /* Complex modes. */ DEF_MACHMODE (QCmode, "QC", MODE_COMPLEX_FLOAT, 2, 1, HCmode) diff --git a/gcc/machmode.h b/gcc/machmode.h index bf6b888..2c41355 100755 --- a/gcc/machmode.h +++ b/gcc/machmode.h @@ -65,7 +65,7 @@ MAX_MACHINE_MODE }; extern char *mode_name[]; #define GET_MODE_NAME(MODE) (mode_name[(int) (MODE)]) -enum mode_class { MODE_RANDOM, MODE_INT, MODE_FLOAT, MODE_PARTIAL_INT, MODE_CC, +enum mode_class { MODE_RANDOM, MODE_INT, MODE_FLOAT, MODE_CC, MODE_COMPLEX_INT, MODE_COMPLEX_FLOAT, MAX_MODE_CLASS}; /* Get the general kind of object that mode MODE represents @@ -77,7 +77,6 @@ extern enum mode_class mode_class[]; /* Nonzero if MODE is an integral mode. */ #define INTEGRAL_MODE_P(MODE) \ (GET_MODE_CLASS (MODE) == MODE_INT \ - || GET_MODE_CLASS (MODE) == MODE_PARTIAL_INT \ || GET_MODE_CLASS (MODE) == MODE_COMPLEX_INT) /* Nonzero if MODE is a floating-point mode. */ diff --git a/gcc/optabs.c b/gcc/optabs.c index 8aaed1b..515e4c5 100755 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -3622,7 +3622,7 @@ expand_float (to, from, unsignedp) #endif /* No hardware instruction available; call a library routine to convert from - SImode, DImode, or TImode into SFmode, DFmode, XFmode, or TFmode. */ + SImode or DImode into SFmode or DFmode. */ { rtx libfcn; rtx insns; @@ -3643,8 +3643,6 @@ expand_float (to, from, unsignedp) libfcn = floatsisf_libfunc; else if (GET_MODE (from) == DImode) libfcn = floatdisf_libfunc; - else if (GET_MODE (from) == TImode) - libfcn = floattisf_libfunc; else abort (); } @@ -3654,8 +3652,6 @@ expand_float (to, from, unsignedp) libfcn = floatsidf_libfunc; else if (GET_MODE (from) == DImode) libfcn = floatdidf_libfunc; - else if (GET_MODE (from) == TImode) - libfcn = floattidf_libfunc; else abort (); } @@ -3844,8 +3840,6 @@ expand_fix (to, from, unsignedp) libfcn = unsignedp ? fixunssfsi_libfunc : fixsfsi_libfunc; else if (GET_MODE (to) == DImode) libfcn = unsignedp ? fixunssfdi_libfunc : fixsfdi_libfunc; - else if (GET_MODE (to) == TImode) - libfcn = unsignedp ? fixunssfti_libfunc : fixsfti_libfunc; else abort (); } @@ -3855,8 +3849,6 @@ expand_fix (to, from, unsignedp) libfcn = unsignedp ? fixunsdfsi_libfunc : fixdfsi_libfunc; else if (GET_MODE (to) == DImode) libfcn = unsignedp ? fixunsdfdi_libfunc : fixdfdi_libfunc; - else if (GET_MODE (to) == TImode) - libfcn = unsignedp ? fixunsdfti_libfunc : fixdfti_libfunc; else abort (); } @@ -3978,7 +3970,7 @@ init_integral_libfuncs (optable, opname, suffix) register char *opname; register int suffix; { - init_libfuncs (optable, SImode, TImode, opname, suffix); + init_libfuncs (optable, SImode, DImode, opname, suffix); } /* Initialize the libfunc fields of an entire group of entries in some @@ -3992,7 +3984,7 @@ init_floating_libfuncs (optable, opname, suffix) register char *opname; register int suffix; { - init_libfuncs (optable, SFmode, TFmode, opname, suffix); + init_libfuncs (optable, SFmode, DFmode, opname, suffix); } diff --git a/gcc/recog.c b/gcc/recog.c index 41e4db3..0edeab5 100755 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -904,8 +904,7 @@ general_operand (op, mode) /* Don't accept CONST_INT or anything similar if the caller wants something floating. */ if (GET_MODE (op) == VOIDmode && mode != VOIDmode - && GET_MODE_CLASS (mode) != MODE_INT - && GET_MODE_CLASS (mode) != MODE_PARTIAL_INT) + && GET_MODE_CLASS (mode) != MODE_INT) return 0; if (CONSTANT_P (op)) @@ -1055,8 +1054,7 @@ immediate_operand (op, mode) /* Don't accept CONST_INT or anything similar if the caller wants something floating. */ if (GET_MODE (op) == VOIDmode && mode != VOIDmode - && GET_MODE_CLASS (mode) != MODE_INT - && GET_MODE_CLASS (mode) != MODE_PARTIAL_INT) + && GET_MODE_CLASS (mode) != MODE_INT) return 0; return (CONSTANT_P (op) @@ -1086,8 +1084,7 @@ const_double_operand (op, mode) /* Don't accept CONST_INT or anything similar if the caller wants something floating. */ if (GET_MODE (op) == VOIDmode && mode != VOIDmode - && GET_MODE_CLASS (mode) != MODE_INT - && GET_MODE_CLASS (mode) != MODE_PARTIAL_INT) + && GET_MODE_CLASS (mode) != MODE_INT) return 0; return ((GET_CODE (op) == CONST_DOUBLE || GET_CODE (op) == CONST_INT) @@ -1117,8 +1114,7 @@ nonmemory_operand (op, mode) /* Don't accept CONST_INT or anything similar if the caller wants something floating. */ if (GET_MODE (op) == VOIDmode && mode != VOIDmode - && GET_MODE_CLASS (mode) != MODE_INT - && GET_MODE_CLASS (mode) != MODE_PARTIAL_INT) + && GET_MODE_CLASS (mode) != MODE_INT) return 0; return ((GET_MODE (op) == VOIDmode || GET_MODE (op) == mode) diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 4af5943..d77a808 100755 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -185,7 +185,6 @@ int_mode_for_mode (mode) switch (GET_MODE_CLASS (mode)) { case MODE_INT: - case MODE_PARTIAL_INT: break; case MODE_COMPLEX_INT: diff --git a/gcc/varasm.c b/gcc/varasm.c index 3c70c4a..d8b62b8 100755 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1819,8 +1819,7 @@ immed_double_const (i0, i1, mode) { register rtx r; - if (GET_MODE_CLASS (mode) == MODE_INT - || GET_MODE_CLASS (mode) == MODE_PARTIAL_INT) + if (GET_MODE_CLASS (mode) == MODE_INT) { /* We clear out all bits that don't belong in MODE, unless they and our sign bit are all one. So we get either a reasonable negative value @@ -3519,7 +3518,6 @@ output_constant_pool (fnname, fndecl) break; case MODE_INT: - case MODE_PARTIAL_INT: assemble_integer (x, GET_MODE_SIZE (pool->mode), 1); break; |