diff options
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index 479adbc13d3..c10d52ec8c4 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -38,6 +38,12 @@ along with GCC; see the file COPYING3. If not see #include "langhooks.h" #include "df.h" #include "target.h" +#include "expmed.h" + +struct target_expmed default_target_expmed; +#if SWITCHABLE_TARGET +struct target_expmed *this_target_expmed = &default_target_expmed; +#endif static void store_fixed_bit_field (rtx, unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT, @@ -59,14 +65,6 @@ static rtx expand_sdiv_pow2 (enum machine_mode, rtx, HOST_WIDE_INT); /* Test whether a value is zero of a power of two. */ #define EXACT_POWER_OF_2_OR_ZERO_P(x) (((x) & ((x) - 1)) == 0) -/* Nonzero means divides or modulus operations are relatively cheap for - powers of two, so don't use branches; emit the operation instead. - Usually, this will mean that the MD file will emit non-branch - sequences. */ - -static bool sdiv_pow2_cheap[2][NUM_MACHINE_MODES]; -static bool smod_pow2_cheap[2][NUM_MACHINE_MODES]; - #ifndef SLOW_UNALIGNED_ACCESS #define SLOW_UNALIGNED_ACCESS(MODE, ALIGN) STRICT_ALIGNMENT #endif @@ -96,21 +94,6 @@ static bool smod_pow2_cheap[2][NUM_MACHINE_MODES]; #define gen_extzv(a,b,c,d) NULL_RTX #endif -/* Cost of various pieces of RTL. Note that some of these are indexed by - shift count and some by mode. */ -static int zero_cost[2]; -static int add_cost[2][NUM_MACHINE_MODES]; -static int neg_cost[2][NUM_MACHINE_MODES]; -static int shift_cost[2][NUM_MACHINE_MODES][MAX_BITS_PER_WORD]; -static int shiftadd_cost[2][NUM_MACHINE_MODES][MAX_BITS_PER_WORD]; -static int shiftsub0_cost[2][NUM_MACHINE_MODES][MAX_BITS_PER_WORD]; -static int shiftsub1_cost[2][NUM_MACHINE_MODES][MAX_BITS_PER_WORD]; -static int mul_cost[2][NUM_MACHINE_MODES]; -static int sdiv_cost[2][NUM_MACHINE_MODES]; -static int udiv_cost[2][NUM_MACHINE_MODES]; -static int mul_widen_cost[2][NUM_MACHINE_MODES]; -static int mul_highpart_cost[2][NUM_MACHINE_MODES]; - void init_expmed (void) { |