diff options
Diffstat (limited to 'gcc/config/mep/mep.c')
-rw-r--r-- | gcc/config/mep/mep.c | 133 |
1 files changed, 4 insertions, 129 deletions
diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c index a6615edcd0b..5089e033316 100644 --- a/gcc/config/mep/mep.c +++ b/gcc/config/mep/mep.c @@ -51,6 +51,7 @@ along with GCC; see the file COPYING3. If not see #include "df.h" #include "gimple.h" #include "opts.h" +#include "dumpfile.h" /* Structure of this file: @@ -595,132 +596,6 @@ mep_regno_reg_class (int regno) return NO_REGS; } -#if 0 -int -mep_reg_class_from_constraint (int c, const char *str) -{ - switch (c) - { - case 'a': - return SP_REGS; - case 'b': - return TP_REGS; - case 'c': - return CONTROL_REGS; - case 'd': - return HILO_REGS; - case 'e': - { - switch (str[1]) - { - case 'm': - return LOADABLE_CR_REGS; - case 'x': - return mep_have_copro_copro_moves_p ? CR_REGS : NO_REGS; - case 'r': - return mep_have_core_copro_moves_p ? CR_REGS : NO_REGS; - default: - return NO_REGS; - } - } - case 'h': - return HI_REGS; - case 'j': - return RPC_REGS; - case 'l': - return LO_REGS; - case 't': - return TPREL_REGS; - case 'v': - return GP_REGS; - case 'x': - return CR_REGS; - case 'y': - return CCR_REGS; - case 'z': - return R0_REGS; - - case 'A': - case 'B': - case 'C': - case 'D': - { - enum reg_class which = c - 'A' + USER0_REGS; - return (reg_class_size[which] > 0 ? which : NO_REGS); - } - - default: - return NO_REGS; - } -} - -bool -mep_const_ok_for_letter_p (HOST_WIDE_INT value, int c) -{ - switch (c) - { - case 'I': return value >= -32768 && value < 32768; - case 'J': return value >= 0 && value < 65536; - case 'K': return value >= 0 && value < 0x01000000; - case 'L': return value >= -32 && value < 32; - case 'M': return value >= 0 && value < 32; - case 'N': return value >= 0 && value < 16; - case 'O': - if (value & 0xffff) - return false; - return value >= -2147483647-1 && value <= 2147483647; - default: - gcc_unreachable (); - } -} - -bool -mep_extra_constraint (rtx value, int c) -{ - encode_pattern (value); - - switch (c) - { - case 'R': - /* For near symbols, like what call uses. */ - if (GET_CODE (value) == REG) - return 0; - return mep_call_address_operand (value, GET_MODE (value)); - - case 'S': - /* For signed 8-bit immediates. */ - return (GET_CODE (value) == CONST_INT - && INTVAL (value) >= -128 - && INTVAL (value) <= 127); - - case 'T': - /* For tp/gp relative symbol values. */ - return (RTX_IS ("u3s") || RTX_IS ("u2s") - || RTX_IS ("+u3si") || RTX_IS ("+u2si")); - - case 'U': - /* Non-absolute memories. */ - return GET_CODE (value) == MEM && ! CONSTANT_P (XEXP (value, 0)); - - case 'W': - /* %hi(sym) */ - return RTX_IS ("Hs"); - - case 'Y': - /* Register indirect. */ - return RTX_IS ("mr"); - - case 'Z': - return mep_section_tag (value) == 'c' && RTX_IS ("ms"); - } - - return false; -} -#endif - -#undef PASS -#undef FAIL - static bool const_in_range (rtx x, int minv, int maxv) { @@ -5022,7 +4897,7 @@ mep_reorg_regmove (rtx insns) done = 1; for (insn = insns; insn; insn = next) { - next = NEXT_INSN (insn); + next = next_nonnote_nondebug_insn (insn); if (GET_CODE (insn) != INSN) continue; pat = PATTERN (insn); @@ -5035,7 +4910,7 @@ mep_reorg_regmove (rtx insns) && find_regno_note (insn, REG_DEAD, REGNO (SET_SRC (pat))) && mep_compatible_reg_class (REGNO (SET_SRC (pat)), REGNO (SET_DEST (pat)))) { - follow = next_nonnote_insn (insn); + follow = next_nonnote_nondebug_insn (insn); if (dump_file) fprintf (dump_file, "superfluous moves: considering %d\n", INSN_UID (insn)); @@ -5096,7 +4971,7 @@ mep_reorg_regmove (rtx insns) follow, where)) { count ++; - next = delete_insn (insn); + delete_insn (insn); if (dump_file) { fprintf (dump_file, "\n----- Success! new insn:\n\n"); |