From 999ea351da9e484fe2adbb7a4226aaabe47ee3cb Mon Sep 17 00:00:00 2001 From: law Date: Fri, 4 Dec 1998 00:40:21 +0000 Subject: [PATCH] * pdp11.h: Use optimize_size for space optimizations. * pdp11.c: Likewise. * pdp11.md: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24082 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++++ gcc/config/pdp11/pdp11.c | 6 +++--- gcc/config/pdp11/pdp11.h | 18 ++++++------------ gcc/config/pdp11/pdp11.md | 2 +- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e2b61d28bf8..debe38e68ef 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -14,6 +14,10 @@ Thu Dec 3 11:19:50 1998 Mike Stump 1998-12-03 Joseph S. Myers + * pdp11.h: Use optimize_size for space optimizations. + * pdp11.c: Likewise. + * pdp11.md: Likewise. + * pdp11.h (TARGET_40_PLUS): Fix typo. Thu Dec 3 11:48:32 1998 Jeffrey A Law (law@cygnus.com) diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c index c040c457222..9bf69dd00b5 100644 --- a/gcc/config/pdp11/pdp11.c +++ b/gcc/config/pdp11/pdp11.c @@ -1115,7 +1115,7 @@ output_block_move(operands) char buf[200]; if (GET_CODE(operands[2]) == CONST_INT - && TARGET_TIME) + && ! optimize_size) { if (INTVAL(operands[2]) < 16 && INTVAL(operands[3]) == 1) @@ -1257,7 +1257,7 @@ output_block_move(operands) bgt x */ - if (TARGET_SPACE) + if (optimize_size) goto generate_compact_code; output_asm_insn("asr %4", operands); @@ -1308,7 +1308,7 @@ output_block_move(operands) */ - if (TARGET_SPACE) + if (optimize_size) goto generate_compact_code; output_asm_insn("asr %4", operands); diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h index 204bd2d08ec..7912beaa151 100644 --- a/gcc/config/pdp11/pdp11.h +++ b/gcc/config/pdp11/pdp11.h @@ -89,9 +89,6 @@ extern int target_flags; /* this is just to play around and check what code gcc generates */ \ { "branch-expensive", 256}, \ { "branch-cheap", -256}, \ -/* optimize for space instead of time - just in a couple of places */ \ - { "space", 512 }, \ - { "time", -512 }, \ /* split instruction and data memory? */ \ { "split", 1024 }, \ { "no-split", -1024 }, \ @@ -124,9 +121,6 @@ extern int target_flags; #define TARGET_BRANCH_EXPENSIVE (target_flags & 256) #define TARGET_BRANCH_CHEAP (!TARGET_BRANCH_EXPENSIVE) -#define TARGET_SPACE (target_flags & 512) -#define TARGET_TIME (! TARGET_SPACE) - #define TARGET_SPLIT (target_flags & 1024) #define TARGET_NOSPLIT (! TARGET_SPLIT) @@ -1315,31 +1309,31 @@ JMP FUNCTION 0x0058 0x0000 <- FUNCTION there is something wrong in MULT because MULT is not as cheap as total = 2 even if we can shift! - if TARGET_SPACE make mult etc cheap, but not 1, so when + if optimizing for size make mult etc cheap, but not 1, so when in doubt the faster insn is chosen. */ #define RTX_COSTS(X,CODE,OUTER_CODE) \ case MULT: \ - if (TARGET_SPACE) \ + if (optimize_size) \ total = COSTS_N_INSNS(2); \ else \ total = COSTS_N_INSNS (11); \ break; \ case DIV: \ - if (TARGET_SPACE) \ + if (optimize_size) \ total = COSTS_N_INSNS(2); \ else \ total = COSTS_N_INSNS (25); \ break; \ case MOD: \ - if (TARGET_SPACE) \ + if (optimize_size) \ total = COSTS_N_INSNS(2); \ else \ total = COSTS_N_INSNS (26); \ break; \ case ABS: \ - /* equivalent to length, so same for TARGET_SPACE */ \ + /* equivalent to length, so same for optimize_size */ \ total = COSTS_N_INSNS (3); \ break; \ case ZERO_EXTEND: \ @@ -1358,7 +1352,7 @@ JMP FUNCTION 0x0058 0x0000 <- FUNCTION case ASHIFT: \ case LSHIFTRT: \ case ASHIFTRT: \ - if (TARGET_SPACE) \ + if (optimize_size) \ total = COSTS_N_INSNS(1); \ else if (GET_MODE(X) == QImode) \ { \ diff --git a/gcc/config/pdp11/pdp11.md b/gcc/config/pdp11/pdp11.md index 09a5505cd66..d1b031a4e32 100644 --- a/gcc/config/pdp11/pdp11.md +++ b/gcc/config/pdp11/pdp11.md @@ -1432,7 +1432,7 @@ [(set (match_operand:HI 0 "general_operand" "=r") (ashift:HI (match_operand:HI 1 "general_operand" "0") (match_operand:HI 2 "expand_shift_operand" "O")))] - "TARGET_TIME" + "! optimize_size" "* { register int i; -- 2.11.0