diff options
author | Geoffrey Keating <geoffk@redhat.com> | 2001-11-04 07:40:15 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2001-11-04 07:40:15 +0000 |
commit | 3fdb2f711edcfae345505ef2173be634b564eb3f (patch) | |
tree | 57b81dfb0f0121e70d4d0fc4f91ed394ea114748 | |
parent | e06bc4e1fd1e3f7cb939a704bcc3601fcc8aeccb (diff) | |
download | gcc-3fdb2f711edcfae345505ef2173be634b564eb3f.zip gcc-3fdb2f711edcfae345505ef2173be634b564eb3f.tar.gz gcc-3fdb2f711edcfae345505ef2173be634b564eb3f.tar.bz2 |
stormy16.h (CONST_COSTS): Define.
* config/stormy16/stormy16.h (CONST_COSTS): Define.
(RTX_COSTS): Define.
(ADDRESS_COST): Define.
(MEMORY_MOVE_COST): Allow for memory_move_secondary_cost.
From-SVN: r46764
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/stormy16/stormy16.h | 28 |
2 files changed, 28 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cf2859e..10b3542 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2001-11-03 Geoffrey Keating <geoffk@redhat.com> + * config/stormy16/stormy16.h (CONST_COSTS): Define. + (RTX_COSTS): Define. + (ADDRESS_COST): Define. + (MEMORY_MOVE_COST): Allow for memory_move_secondary_cost. + * config/stormy16/stormy16.h (ASM_SPEC): Pass -g to the assembler. * config/stormy16/stormy16.h (ASM_OUTPUT_MI_THUNK): Call diff --git a/gcc/config/stormy16/stormy16.h b/gcc/config/stormy16/stormy16.h index b7a5dde..5d9beba 100644 --- a/gcc/config/stormy16/stormy16.h +++ b/gcc/config/stormy16/stormy16.h @@ -3240,7 +3240,17 @@ do { \ CODE is the expression code--redundant, since it can be obtained with `GET_CODE (X)'. */ -/* #define CONST_COSTS(X, CODE, OUTER_CODE) */ +#define CONST_COSTS(X, CODE, OUTER_CODE) \ + case CONST_INT: \ + if (INTVAL (X) < 16 && INTVAL (X) >= 0) \ + return COSTS_N_INSNS (1)/2; \ + if (INTVAL (X) < 256 && INTVAL (X) >= 0) \ + return COSTS_N_INSNS (1); \ + case CONST_DOUBLE: \ + case CONST: \ + case SYMBOL_REF: \ + case LABEL_REF: \ + return COSTS_N_INSNS(2); /* Like `CONST_COSTS' but applies to nonconstant RTL expressions. This can be used, for example, to indicate how costly a multiply instruction is. In @@ -3250,7 +3260,11 @@ do { \ This macro is optional; do not define it if the default cost assumptions are adequate for the target machine. */ -/* #define RTX_COSTS(X, CODE, OUTER_CODE) */ +#define RTX_COSTS(X, CODE, OUTER_CODE) \ + case MULT: \ + return COSTS_N_INSNS (35 + 6); \ + case DIV: \ + return COSTS_N_INSNS (51 - 6); /* An expression giving the cost of an addressing mode that contains ADDRESS. If not defined, the cost is computed from the ADDRESS expression and the @@ -3288,8 +3302,12 @@ do { \ Equivalent costs should probably only be given to addresses with different numbers of registers on machines with lots of registers. - This macro will normally either not be defined or be defined as a constant. */ -/* #define ADDRESS_COST(ADDRESS) */ + This macro will normally either not be defined or be defined as a + constant. */ +#define ADDRESS_COST(ADDRESS) \ + (GET_CODE (ADDRESS) == CONST_INT ? 2 \ + : GET_CODE (ADDRESS) == PLUS ? 7 \ + : 5) /* A C expression for the cost of moving data of mode MODE from a register in class FROM to one in class TO. The classes are @@ -3315,7 +3333,7 @@ do { \ If moving between registers and memory is more expensive than between two registers, you should define this macro to express the relative cost. */ -#define MEMORY_MOVE_COST(M,C,I) 5 +#define MEMORY_MOVE_COST(M,C,I) (5 + memory_move_secondary_cost (M, C, I)) /* A C expression for the cost of a branch instruction. A value of 1 is the default; other values are interpreted relative to that. */ |