diff options
author | Richard Stallman <rms@gnu.org> | 1993-06-10 17:00:40 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1993-06-10 17:00:40 +0000 |
commit | e49a094d25160e3186f9cc6aee2fdadaf5649b2d (patch) | |
tree | a7b3f5d314170cf9434780ce85960cb35265b747 | |
parent | 35c7a24d6446dffd24ce64310af65b3a5b2f9f03 (diff) | |
download | gcc-e49a094d25160e3186f9cc6aee2fdadaf5649b2d.zip gcc-e49a094d25160e3186f9cc6aee2fdadaf5649b2d.tar.gz gcc-e49a094d25160e3186f9cc6aee2fdadaf5649b2d.tar.bz2 |
(MAX_BITS_PER_WORD): Define earlier.
(shift_cost, shiftadd_cost, shiftsub_cost): Use MAX_BITS_PER_WORD.
From-SVN: r4657
-rw-r--r-- | gcc/expmed.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index 0e38db2..6fb8579 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -49,11 +49,19 @@ int mult_is_very_cheap; static int sdiv_pow2_cheap, smod_pow2_cheap; +/* For compilers that support multiple targets with different word sizes, + MAX_BITS_PER_WORD contains the biggest value of BITS_PER_WORD. An example + is the H8/300(H) compiler. */ + +#ifndef MAX_BITS_PER_WORD +#define MAX_BITS_PER_WORD BITS_PER_WORD +#endif + /* Cost of various pieces of RTL. */ static int add_cost, mult_cost, negate_cost, zero_cost; -static int shift_cost[BITS_PER_WORD]; -static int shiftadd_cost[BITS_PER_WORD]; -static int shiftsub_cost[BITS_PER_WORD]; +static int shift_cost[MAX_BITS_PER_WORD]; +static int shiftadd_cost[MAX_BITS_PER_WORD]; +static int shiftsub_cost[MAX_BITS_PER_WORD]; void init_expmed () @@ -1791,10 +1799,6 @@ enum alg_code { alg_zero, alg_m, alg_shift, The first operand must be either alg_zero or alg_m. */ -#ifndef MAX_BITS_PER_WORD -#define MAX_BITS_PER_WORD BITS_PER_WORD -#endif - struct algorithm { short cost; |