From e49a094d25160e3186f9cc6aee2fdadaf5649b2d Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Thu, 10 Jun 1993 17:00:40 +0000 Subject: [PATCH] (MAX_BITS_PER_WORD): Define earlier. (shift_cost, shiftadd_cost, shiftsub_cost): Use MAX_BITS_PER_WORD. From-SVN: r4657 --- gcc/expmed.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/gcc/expmed.c b/gcc/expmed.c index 0e38db2666f..6fb8579734e 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; -- 2.30.2