diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-08-30 11:20:30 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-08-30 11:20:30 +0000 |
commit | 18e2a8b889d520fc3598f74e39e1dbf1ef06ebd1 (patch) | |
tree | e1451bf5c192ca3f87cbe104e8705b376d580712 /gcc/config | |
parent | 16d2200070f49ed71053b81699e37bd539a0ee69 (diff) | |
download | gcc-18e2a8b889d520fc3598f74e39e1dbf1ef06ebd1.tar.gz |
[72/77] Pass scalar_mode to scalar_mode_supported_p
This patch makes the scalar_mode_supported_p target hook take a
scalar_mode rather than a machine_mode.
2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
gcc/
* target.def (scalar_mode_supported_p): Take a scalar_mode
instead of a machine_mode.
* targhooks.h (default_scalar_mode_supported_p): Likewise.
* targhooks.c (default_scalar_mode_supported_p): Likewise.
* config/aarch64/aarch64.c (aarch64_scalar_mode_supported_p): Likewise.
* config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
* config/arm/arm.c (arm_scalar_mode_supported_p): Likewise.
* config/avr/avr.c (avr_scalar_mode_supported_p): Likewise.
* config/c6x/c6x.c (c6x_scalar_mode_supported_p): Likewise.
* config/i386/i386.c (ix86_scalar_mode_supported_p): Likewise.
* config/ia64/ia64.c (ia64_scalar_mode_supported_p): Likewise.
* config/mips/mips.c (mips_scalar_mode_supported_p): Likewise.
* config/msp430/msp430.c (msp430_scalar_mode_supported_p): Likewise.
* config/pa/pa.c (pa_scalar_mode_supported_p): Likewise.
* config/pdp11/pdp11.c (pdp11_scalar_mode_supported_p): Likewise.
* config/powerpcspe/powerpcspe.c (rs6000_scalar_mode_supported_p):
Likewise.
* config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Likewise.
* config/s390/s390.c (s390_scalar_mode_supported_p): Likewise.
* config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
* config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
* config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p):
Likewise.
* doc/tm.texi: Regenerate.
gcc/c-family/
* c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
into scalar_mode_supported_p call.
(handle_mode_attribute): Update call to scalar_mode_supported_p.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r251523
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/aarch64/aarch64.c | 2 | ||||
-rw-r--r-- | gcc/config/alpha/alpha.c | 2 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 4 | ||||
-rw-r--r-- | gcc/config/avr/avr.c | 2 | ||||
-rw-r--r-- | gcc/config/c6x/c6x.c | 2 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 2 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 4 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 2 | ||||
-rw-r--r-- | gcc/config/msp430/msp430.c | 2 | ||||
-rw-r--r-- | gcc/config/pa/pa.c | 4 | ||||
-rw-r--r-- | gcc/config/pdp11/pdp11.c | 4 | ||||
-rw-r--r-- | gcc/config/powerpcspe/powerpcspe.c | 2 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 2 | ||||
-rw-r--r-- | gcc/config/s390/s390.c | 2 | ||||
-rw-r--r-- | gcc/config/spu/spu.c | 2 | ||||
-rw-r--r-- | gcc/config/tilegx/tilegx.c | 2 | ||||
-rw-r--r-- | gcc/config/tilepro/tilepro.c | 2 |
17 files changed, 21 insertions, 21 deletions
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 09f592718c6..88e675b807b 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -15150,7 +15150,7 @@ aarch64_libgcc_floating_mode_supported_p (scalar_float_mode mode) if MODE is HFmode, and punt to the generic implementation otherwise. */ static bool -aarch64_scalar_mode_supported_p (machine_mode mode) +aarch64_scalar_mode_supported_p (scalar_mode mode) { return (mode == HFmode ? true diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index dbfd29862fc..c37a7e3631f 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -691,7 +691,7 @@ resolve_reload_operand (rtx op) indicates only DFmode. */ static bool -alpha_scalar_mode_supported_p (machine_mode mode) +alpha_scalar_mode_supported_p (scalar_mode mode) { switch (mode) { diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index e66cfa651b5..7e0e9514d01 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -257,7 +257,7 @@ static bool arm_output_addr_const_extra (FILE *, rtx); static bool arm_allocate_stack_slots_for_args (void); static bool arm_warn_func_return (tree); static tree arm_promoted_type (const_tree t); -static bool arm_scalar_mode_supported_p (machine_mode); +static bool arm_scalar_mode_supported_p (scalar_mode); static bool arm_frame_pointer_required (void); static bool arm_can_eliminate (const int, const int); static void arm_asm_trampoline_template (FILE *); @@ -23601,7 +23601,7 @@ arm_promoted_type (const_tree t) special-cased in the default hook. */ static bool -arm_scalar_mode_supported_p (machine_mode mode) +arm_scalar_mode_supported_p (scalar_mode mode) { if (mode == HFmode) return (arm_fp16_format != ARM_FP16_FORMAT_NONE); diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index c1d27497d50..09bf5eedbde 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -884,7 +884,7 @@ avr_regno_reg_class (int r) /* Implement `TARGET_SCALAR_MODE_SUPPORTED_P'. */ static bool -avr_scalar_mode_supported_p (machine_mode mode) +avr_scalar_mode_supported_p (scalar_mode mode) { if (ALL_FIXED_POINT_MODE_P (mode)) return true; diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c index d92b8782c49..bf7ec7e4b00 100644 --- a/gcc/config/c6x/c6x.c +++ b/gcc/config/c6x/c6x.c @@ -6256,7 +6256,7 @@ c6x_preferred_simd_mode (machine_mode mode) /* Implement TARGET_SCALAR_MODE_SUPPORTED_P. */ static bool -c6x_scalar_mode_supported_p (machine_mode mode) +c6x_scalar_mode_supported_p (scalar_mode mode) { if (ALL_FIXED_POINT_MODE_P (mode) && GET_MODE_PRECISION (mode) <= 2 * BITS_PER_WORD) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index be83381692e..7867372789a 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -45279,7 +45279,7 @@ ix86_expand_reduc (rtx (*fn) (rtx, rtx, rtx), rtx dest, rtx in) /* Target hook for scalar_mode_supported_p. */ static bool -ix86_scalar_mode_supported_p (machine_mode mode) +ix86_scalar_mode_supported_p (scalar_mode mode) { if (DECIMAL_FLOAT_MODE_P (mode)) return default_decimal_float_supported_p (); diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 57975160510..409977fadd8 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -310,7 +310,7 @@ static tree ia64_handle_version_id_attribute (tree *, tree, tree, int, bool *); static void ia64_encode_section_info (tree, rtx, int); static rtx ia64_struct_value_rtx (tree, int); static tree ia64_gimplify_va_arg (tree, tree, gimple_seq *, gimple_seq *); -static bool ia64_scalar_mode_supported_p (machine_mode mode); +static bool ia64_scalar_mode_supported_p (scalar_mode mode); static bool ia64_vector_mode_supported_p (machine_mode mode); static bool ia64_legitimate_constant_p (machine_mode, rtx); static bool ia64_legitimate_address_p (machine_mode, rtx, bool); @@ -10964,7 +10964,7 @@ ia64_struct_value_rtx (tree fntype, } static bool -ia64_scalar_mode_supported_p (machine_mode mode) +ia64_scalar_mode_supported_p (scalar_mode mode) { switch (mode) { diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 1f42c567149..a810ba729fc 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -13312,7 +13312,7 @@ mips_vector_mode_supported_p (machine_mode mode) /* Implement TARGET_SCALAR_MODE_SUPPORTED_P. */ static bool -mips_scalar_mode_supported_p (machine_mode mode) +mips_scalar_mode_supported_p (scalar_mode mode) { if (ALL_FIXED_POINT_MODE_P (mode) && GET_MODE_PRECISION (mode) <= 2 * BITS_PER_WORD) diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c index d597812ec3e..b8b21255c55 100644 --- a/gcc/config/msp430/msp430.c +++ b/gcc/config/msp430/msp430.c @@ -872,7 +872,7 @@ msp430_option_override (void) #define TARGET_SCALAR_MODE_SUPPORTED_P msp430_scalar_mode_supported_p static bool -msp430_scalar_mode_supported_p (machine_mode m) +msp430_scalar_mode_supported_p (scalar_mode m) { if (m == PSImode && msp430x) return true; diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index c6af3736e75..95ad7cf8dcc 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -143,7 +143,7 @@ static rtx pa_expand_builtin (tree, rtx, rtx, machine_mode mode, int); static rtx hppa_builtin_saveregs (void); static void hppa_va_start (tree, rtx); static tree hppa_gimplify_va_arg_expr (tree, tree, gimple_seq *, gimple_seq *); -static bool pa_scalar_mode_supported_p (machine_mode); +static bool pa_scalar_mode_supported_p (scalar_mode); static bool pa_commutative_p (const_rtx x, int outer_code); static void copy_fp_args (rtx_insn *) ATTRIBUTE_UNUSED; static int length_fp_args (rtx_insn *) ATTRIBUTE_UNUSED; @@ -6416,7 +6416,7 @@ hppa_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p, 2 * BITS_PER_WORD isn't equal LONG_LONG_TYPE_SIZE. */ static bool -pa_scalar_mode_supported_p (machine_mode mode) +pa_scalar_mode_supported_p (scalar_mode mode) { int precision = GET_MODE_PRECISION (mode); diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c index fbbb34390f4..b4d54fc0a78 100644 --- a/gcc/config/pdp11/pdp11.c +++ b/gcc/config/pdp11/pdp11.c @@ -162,7 +162,7 @@ static void pdp11_function_arg_advance (cumulative_args_t, static void pdp11_conditional_register_usage (void); static bool pdp11_legitimate_constant_p (machine_mode, rtx); -static bool pdp11_scalar_mode_supported_p (machine_mode); +static bool pdp11_scalar_mode_supported_p (scalar_mode); /* Initialize the GCC target structure. */ #undef TARGET_ASM_BYTE_OP @@ -1911,7 +1911,7 @@ pdp11_legitimate_constant_p (machine_mode mode ATTRIBUTE_UNUSED, rtx x) /* Implement TARGET_SCALAR_MODE_SUPPORTED_P. */ static bool -pdp11_scalar_mode_supported_p (machine_mode mode) +pdp11_scalar_mode_supported_p (scalar_mode mode) { /* Support SFmode even with -mfloat64. */ if (mode == SFmode) diff --git a/gcc/config/powerpcspe/powerpcspe.c b/gcc/config/powerpcspe/powerpcspe.c index 3f418b027fa..0d8eda48dff 100644 --- a/gcc/config/powerpcspe/powerpcspe.c +++ b/gcc/config/powerpcspe/powerpcspe.c @@ -39156,7 +39156,7 @@ rs6000_eh_return_filter_mode (void) /* Target hook for scalar_mode_supported_p. */ static bool -rs6000_scalar_mode_supported_p (machine_mode mode) +rs6000_scalar_mode_supported_p (scalar_mode mode) { /* -m32 does not support TImode. This is the default, from default_scalar_mode_supported_p. For -m32 -mpowerpc64 we want the diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 97a7005e2cd..51b7ec01ca2 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -35913,7 +35913,7 @@ rs6000_eh_return_filter_mode (void) /* Target hook for scalar_mode_supported_p. */ static bool -rs6000_scalar_mode_supported_p (machine_mode mode) +rs6000_scalar_mode_supported_p (scalar_mode mode) { /* -m32 does not support TImode. This is the default, from default_scalar_mode_supported_p. For -m32 -mpowerpc64 we want the diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index e013751c7ad..957cfcbbdfa 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -1229,7 +1229,7 @@ s390_unwind_word_mode (void) /* Return true if the back end supports mode MODE. */ static bool -s390_scalar_mode_supported_p (machine_mode mode) +s390_scalar_mode_supported_p (scalar_mode mode) { /* In contrast to the default implementation reject TImode constants on 31bit TARGET_ZARCH for ABI compliance. */ diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index 20c88e6953d..5fabdd243d1 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -288,7 +288,7 @@ spu_option_override (void) be manipulated in non-trivial ways. In particular, this means all the arithmetic is supported. */ static bool -spu_scalar_mode_supported_p (machine_mode mode) +spu_scalar_mode_supported_p (scalar_mode mode) { switch (mode) { diff --git a/gcc/config/tilegx/tilegx.c b/gcc/config/tilegx/tilegx.c index 250bb34917f..2f00b735741 100644 --- a/gcc/config/tilegx/tilegx.c +++ b/gcc/config/tilegx/tilegx.c @@ -107,7 +107,7 @@ tilegx_option_override (void) /* Implement TARGET_SCALAR_MODE_SUPPORTED_P. */ static bool -tilegx_scalar_mode_supported_p (machine_mode mode) +tilegx_scalar_mode_supported_p (scalar_mode mode) { switch (mode) { diff --git a/gcc/config/tilepro/tilepro.c b/gcc/config/tilepro/tilepro.c index b63fc57c9ea..9b6c5f6057e 100644 --- a/gcc/config/tilepro/tilepro.c +++ b/gcc/config/tilepro/tilepro.c @@ -84,7 +84,7 @@ tilepro_option_override (void) /* Implement TARGET_SCALAR_MODE_SUPPORTED_P. */ static bool -tilepro_scalar_mode_supported_p (machine_mode mode) +tilepro_scalar_mode_supported_p (scalar_mode mode) { switch (mode) { |