X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=gcc%2Fconfig%2Fm68k%2Fm68k.h;h=3ba717b064c24f84bc1bea7293c0debfb2139019;hp=7d07a13a9623e93c070710086d0bc516429d47eb;hb=fab7adbfb5b8861f87531f939ad03f891bba055a;hpb=bb5d2966d86c25ca14d0d12cb96249b8069e0ab1 diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h index 7d07a13a962..3ba717b064c 100644 --- a/gcc/config/m68k/m68k.h +++ b/gcc/config/m68k/m68k.h @@ -1520,96 +1520,6 @@ __transfer_from_trampoline () \ so give the MEM rtx a byte's mode. */ #define FUNCTION_MODE QImode -/* Compute the cost of computing a constant rtl expression RTX - whose rtx-code is CODE. The body of this macro is a portion - of a switch statement. If the code is computed here, - return it with a return statement. Otherwise, break from the switch. */ - -#define CONST_COSTS(RTX,CODE,OUTER_CODE) \ - case CONST_INT: \ - /* Constant zero is super cheap due to clr instruction. */ \ - if (RTX == const0_rtx) return 0; \ - /* if ((OUTER_CODE) == SET) */ \ - return const_int_cost(RTX); \ - case CONST: \ - case LABEL_REF: \ - case SYMBOL_REF: \ - return 3; \ - case CONST_DOUBLE: \ - /* Make 0.0 cheaper than other floating constants to \ - encourage creating tstsf and tstdf insns. */ \ - if ((OUTER_CODE) == COMPARE \ - && ((RTX) == CONST0_RTX (SFmode) \ - || (RTX) == CONST0_RTX (DFmode))) \ - return 4; \ - return 5; - -/* Compute the cost of various arithmetic operations. - These are vaguely right for a 68020. */ -/* The costs for long multiply have been adjusted to - work properly in synth_mult on the 68020, - relative to an average of the time for add and the time for shift, - taking away a little more because sometimes move insns are needed. */ -/* div?.w is relatively cheaper on 68000 counted in COSTS_N_INSNS terms. */ -#define MULL_COST (TARGET_68060 ? 2 : TARGET_68040 ? 5 : 13) -#define MULW_COST (TARGET_68060 ? 2 : TARGET_68040 ? 3 : TARGET_68020 ? 8 : 5) -#define DIVW_COST (TARGET_68020 ? 27 : 12) - -#define RTX_COSTS(X,CODE,OUTER_CODE) \ - case PLUS: \ - /* An lea costs about three times as much as a simple add. */ \ - if (GET_MODE (X) == SImode \ - && GET_CODE (XEXP (X, 1)) == REG \ - && GET_CODE (XEXP (X, 0)) == MULT \ - && GET_CODE (XEXP (XEXP (X, 0), 0)) == REG \ - && GET_CODE (XEXP (XEXP (X, 0), 1)) == CONST_INT \ - && (INTVAL (XEXP (XEXP (X, 0), 1)) == 2 \ - || INTVAL (XEXP (XEXP (X, 0), 1)) == 4 \ - || INTVAL (XEXP (XEXP (X, 0), 1)) == 8)) \ - return COSTS_N_INSNS (3); /* lea an@(dx:l:i),am */ \ - break; \ - case ASHIFT: \ - case ASHIFTRT: \ - case LSHIFTRT: \ - if (TARGET_68060) \ - return COSTS_N_INSNS(1); \ - if (! TARGET_68020) \ - { \ - if (GET_CODE (XEXP (X, 1)) == CONST_INT) \ - { \ - if (INTVAL (XEXP (X, 1)) < 16) \ - return COSTS_N_INSNS (2) + INTVAL (XEXP (X, 1)) / 2; \ - else \ - /* We're using clrw + swap for these cases. */ \ - return COSTS_N_INSNS (4) + (INTVAL (XEXP (X, 1)) - 16) / 2; \ - } \ - return COSTS_N_INSNS (10); /* worst case */ \ - } \ - /* A shift by a big integer takes an extra instruction. */ \ - if (GET_CODE (XEXP (X, 1)) == CONST_INT \ - && (INTVAL (XEXP (X, 1)) == 16)) \ - return COSTS_N_INSNS (2); /* clrw;swap */ \ - if (GET_CODE (XEXP (X, 1)) == CONST_INT \ - && !(INTVAL (XEXP (X, 1)) > 0 \ - && INTVAL (XEXP (X, 1)) <= 8)) \ - return COSTS_N_INSNS (3); /* lsr #i,dn */ \ - break; \ - case MULT: \ - if ((GET_CODE (XEXP (X, 0)) == ZERO_EXTEND \ - || GET_CODE (XEXP (X, 0)) == SIGN_EXTEND) \ - && GET_MODE (X) == SImode) \ - return COSTS_N_INSNS (MULW_COST); \ - if (GET_MODE (X) == QImode || GET_MODE (X) == HImode) \ - return COSTS_N_INSNS (MULW_COST); \ - else \ - return COSTS_N_INSNS (MULL_COST); \ - case DIV: \ - case UDIV: \ - case MOD: \ - case UMOD: \ - if (GET_MODE (X) == QImode || GET_MODE (X) == HImode) \ - return COSTS_N_INSNS (DIVW_COST); /* div.w */ \ - return COSTS_N_INSNS (43); /* div.l */ /* Tell final.c how to eliminate redundant test instructions. */