+2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
+ Alan Hayward <alan.hayward@arm.com>
+ David Sherwood <david.sherwood@arm.com>
+
+ * builtins.h (builtin_strncpy_read_str): Take a scalar_int_mode
+ instead of a machine_mode.
+ (builtin_memset_read_str): Likewise.
+ * builtins.c (c_readstr): Likewise.
+ (builtin_memcpy_read_str): Likewise.
+ (builtin_strncpy_read_str): Likewise.
+ (builtin_memset_read_str): Likewise.
+ (builtin_memset_gen_str): Likewise.
+ (expand_builtin_signbit): Use scalar_int_mode for local variables.
+ * cfgexpand.c (convert_debug_memory_address): Take a scalar_int_mode
+ instead of a machine_mode.
+ * combine.c (simplify_if_then_else): Use scalar_int_mode for local
+ variables.
+ (make_extraction): Likewise.
+ (try_widen_shift_mode): Take and return scalar_int_modes instead
+ of machine_modes.
+ * config/aarch64/aarch64.c (aarch64_libgcc_cmp_return_mode): Return
+ a scalar_int_mode instead of a machine_mode.
+ * config/avr/avr.c (avr_addr_space_address_mode): Likewise.
+ (avr_addr_space_pointer_mode): Likewise.
+ * config/cr16/cr16.c (cr16_unwind_word_mode): Likewise.
+ * config/msp430/msp430.c (msp430_addr_space_pointer_mode): Likewise.
+ (msp430_unwind_word_mode): Likewise.
+ * config/spu/spu.c (spu_unwind_word_mode): Likewise.
+ (spu_addr_space_pointer_mode): Likewise.
+ (spu_addr_space_address_mode): Likewise.
+ (spu_libgcc_cmp_return_mode): Likewise.
+ (spu_libgcc_shift_count_mode): Likewise.
+ * config/rl78/rl78.c (rl78_addr_space_address_mode): Likewise.
+ (rl78_addr_space_pointer_mode): Likewise.
+ (fl78_unwind_word_mode): Likewise.
+ (rl78_valid_pointer_mode): Take a scalar_int_mode instead of a
+ machine_mode.
+ * config/alpha/alpha.c (vms_valid_pointer_mode): Likewise.
+ * config/ia64/ia64.c (ia64_vms_valid_pointer_mode): Likewise.
+ * config/mips/mips.c (mips_mode_rep_extended): Likewise.
+ (mips_valid_pointer_mode): Likewise.
+ * config/tilegx/tilegx.c (tilegx_mode_rep_extended): Likewise.
+ * config/ft32/ft32.c (ft32_valid_pointer_mode): Likewise.
+ (ft32_addr_space_pointer_mode): Return a scalar_int_mode instead
+ of a machine_mode.
+ (ft32_addr_space_address_mode): Likewise.
+ * config/m32c/m32c.c (m32c_valid_pointer_mode): Take a
+ scalar_int_mode instead of a machine_mode.
+ (m32c_addr_space_pointer_mode): Return a scalar_int_mode instead
+ of a machine_mode.
+ (m32c_addr_space_address_mode): Likewise.
+ * config/powerpcspe/powerpcspe.c (rs6000_abi_word_mode): Likewise.
+ (rs6000_eh_return_filter_mode): Likewise.
+ * config/rs6000/rs6000.c (rs6000_abi_word_mode): Likewise.
+ (rs6000_eh_return_filter_mode): Likewise.
+ * config/s390/s390.c (s390_libgcc_cmp_return_mode): Likewise.
+ (s390_libgcc_shift_count_mode): Likewise.
+ (s390_unwind_word_mode): Likewise.
+ (s390_valid_pointer_mode): Take a scalar_int_mode rather than a
+ machine_mode.
+ * target.def (mode_rep_extended): Likewise.
+ (valid_pointer_mode): Likewise.
+ (addr_space.valid_pointer_mode): Likewise.
+ (eh_return_filter_mode): Return a scalar_int_mode rather than
+ a machine_mode.
+ (libgcc_cmp_return_mode): Likewise.
+ (libgcc_shift_count_mode): Likewise.
+ (unwind_word_mode): Likewise.
+ (addr_space.pointer_mode): Likewise.
+ (addr_space.address_mode): Likewise.
+ * doc/tm.texi: Regenerate.
+ * dojump.c (prefer_and_bit_test): Take a scalar_int_mode rather than
+ a machine_mode.
+ (do_jump): Use scalar_int_mode for local variables.
+ * dwarf2cfi.c (init_return_column_size): Take a scalar_int_mode
+ rather than a machine_mode.
+ * dwarf2out.c (convert_descriptor_to_mode): Likewise.
+ (scompare_loc_descriptor_wide): Likewise.
+ (scompare_loc_descriptor_narrow): Likewise.
+ * emit-rtl.c (adjust_address_1): Use scalar_int_mode for local
+ variables.
+ * except.c (sjlj_emit_dispatch_table): Likewise.
+ (expand_builtin_eh_copy_values): Likewise.
+ * explow.c (convert_memory_address_addr_space_1): Likewise.
+ Take a scalar_int_mode rather than a machine_mode.
+ (convert_memory_address_addr_space): Take a scalar_int_mode rather
+ than a machine_mode.
+ (memory_address_addr_space): Use scalar_int_mode for local variables.
+ * expmed.h (expand_mult_highpart_adjust): Take a scalar_int_mode
+ rather than a machine_mode.
+ * expmed.c (mask_rtx): Likewise.
+ (init_expmed_one_conv): Likewise.
+ (expand_mult_highpart_adjust): Likewise.
+ (extract_high_half): Likewise.
+ (expmed_mult_highpart_optab): Likewise.
+ (expmed_mult_highpart): Likewise.
+ (expand_smod_pow2): Likewise.
+ (expand_sdiv_pow2): Likewise.
+ (emit_store_flag_int): Likewise.
+ (adjust_bit_field_mem_for_reg): Use scalar_int_mode for local
+ variables.
+ (extract_low_bits): Likewise.
+ * expr.h (by_pieces_constfn): Take a scalar_int_mode rather than
+ a machine_mode.
+ * expr.c (pieces_addr::adjust): Likewise.
+ (can_store_by_pieces): Likewise.
+ (store_by_pieces): Likewise.
+ (clear_by_pieces_1): Likewise.
+ (expand_expr_addr_expr_1): Likewise.
+ (expand_expr_addr_expr): Use scalar_int_mode for local variables.
+ (expand_expr_real_1): Likewise.
+ (try_casesi): Likewise.
+ * final.c (shorten_branches): Likewise.
+ * fold-const.c (fold_convert_const_int_from_fixed): Change the
+ type of "mode" to machine_mode.
+ * internal-fn.c (expand_arith_overflow_result_store): Take a
+ scalar_int_mode rather than a machine_mode.
+ (expand_mul_overflow): Use scalar_int_mode for local variables.
+ * loop-doloop.c (doloop_modify): Likewise.
+ (doloop_optimize): Likewise.
+ * optabs.c (expand_subword_shift): Take a scalar_int_mode rather
+ than a machine_mode.
+ (expand_doubleword_shift_condmove): Likewise.
+ (expand_doubleword_shift): Likewise.
+ (expand_doubleword_clz): Likewise.
+ (expand_doubleword_popcount): Likewise.
+ (expand_doubleword_parity): Likewise.
+ (expand_absneg_bit): Use scalar_int_mode for local variables.
+ (prepare_float_lib_cmp): Likewise.
+ * rtl.h (convert_memory_address_addr_space_1): Take a scalar_int_mode
+ rather than a machine_mode.
+ (convert_memory_address_addr_space): Likewise.
+ (get_mode_bounds): Likewise.
+ (get_address_mode): Return a scalar_int_mode rather than a
+ machine_mode.
+ * rtlanal.c (get_address_mode): Likewise.
+ * stor-layout.c (get_mode_bounds): Take a scalar_int_mode rather
+ than a machine_mode.
+ * targhooks.c (default_mode_rep_extended): Likewise.
+ (default_valid_pointer_mode): Likewise.
+ (default_addr_space_valid_pointer_mode): Likewise.
+ (default_eh_return_filter_mode): Return a scalar_int_mode rather
+ than a machine_mode.
+ (default_libgcc_cmp_return_mode): Likewise.
+ (default_libgcc_shift_count_mode): Likewise.
+ (default_unwind_word_mode): Likewise.
+ (default_addr_space_pointer_mode): Likewise.
+ (default_addr_space_address_mode): Likewise.
+ * targhooks.h (default_eh_return_filter_mode): Likewise.
+ (default_libgcc_cmp_return_mode): Likewise.
+ (default_libgcc_shift_count_mode): Likewise.
+ (default_unwind_word_mode): Likewise.
+ (default_addr_space_pointer_mode): Likewise.
+ (default_addr_space_address_mode): Likewise.
+ (default_mode_rep_extended): Take a scalar_int_mode rather than
+ a machine_mode.
+ (default_valid_pointer_mode): Likewise.
+ (default_addr_space_valid_pointer_mode): Likewise.
+ * tree-ssa-address.c (addr_for_mem_ref): Use scalar_int_mode for
+ local variables.
+ * tree-ssa-loop-ivopts.c (get_shiftadd_cost): Take a scalar_int_mode
+ rather than a machine_mode.
+ * tree-switch-conversion.c (array_value_type): Use scalar_int_mode
+ for local variables.
+ * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
+ * var-tracking.c (use_narrower_mode): Take a scalar_int_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>
/* Non-zero if __builtin_constant_p should be folded right away. */
bool force_folding_builtin_constant_p;
-static rtx c_readstr (const char *, machine_mode);
+static rtx c_readstr (const char *, scalar_int_mode);
static int target_char_cast (tree, char *);
static rtx get_memory_rtx (tree, tree);
static int apply_args_size (void);
static rtx expand_builtin_va_copy (tree);
static rtx expand_builtin_strcmp (tree, rtx);
static rtx expand_builtin_strncmp (tree, rtx, machine_mode);
-static rtx builtin_memcpy_read_str (void *, HOST_WIDE_INT, machine_mode);
+static rtx builtin_memcpy_read_str (void *, HOST_WIDE_INT, scalar_int_mode);
static rtx expand_builtin_memchr (tree, rtx);
static rtx expand_builtin_memcpy (tree, rtx);
static rtx expand_builtin_memcpy_with_bounds (tree, rtx);
static rtx expand_builtin_stpncpy (tree, rtx);
static rtx expand_builtin_strncat (tree, rtx);
static rtx expand_builtin_strncpy (tree, rtx);
-static rtx builtin_memset_gen_str (void *, HOST_WIDE_INT, machine_mode);
+static rtx builtin_memset_gen_str (void *, HOST_WIDE_INT, scalar_int_mode);
static rtx expand_builtin_memset (tree, rtx, machine_mode);
static rtx expand_builtin_memset_with_bounds (tree, rtx, machine_mode);
static rtx expand_builtin_memset_args (tree, tree, tree, rtx, machine_mode, tree);
GET_MODE_BITSIZE (MODE) bits from string constant STR. */
static rtx
-c_readstr (const char *str, machine_mode mode)
+c_readstr (const char *str, scalar_int_mode mode)
{
HOST_WIDE_INT ch;
unsigned int i, j;
static rtx
builtin_memcpy_read_str (void *data, HOST_WIDE_INT offset,
- machine_mode mode)
+ scalar_int_mode mode)
{
const char *str = (const char *) data;
rtx
builtin_strncpy_read_str (void *data, HOST_WIDE_INT offset,
- machine_mode mode)
+ scalar_int_mode mode)
{
const char *str = (const char *) data;
rtx
builtin_memset_read_str (void *data, HOST_WIDE_INT offset ATTRIBUTE_UNUSED,
- machine_mode mode)
+ scalar_int_mode mode)
{
const char *c = (const char *) data;
char *p = XALLOCAVEC (char, GET_MODE_SIZE (mode));
static rtx
builtin_memset_gen_str (void *data, HOST_WIDE_INT offset ATTRIBUTE_UNUSED,
- machine_mode mode)
+ scalar_int_mode mode)
{
rtx target, coeff;
size_t size;
{
const struct real_format *fmt;
scalar_float_mode fmode;
- machine_mode imode, rmode;
+ scalar_int_mode rmode, imode;
tree arg;
int word, bitpos;
enum insn_code icode;
extern void expand_builtin_update_setjmp_buf (rtx);
extern tree mathfn_built_in (tree, enum built_in_function fn);
extern tree mathfn_built_in (tree, combined_fn);
-extern rtx builtin_strncpy_read_str (void *, HOST_WIDE_INT, machine_mode);
-extern rtx builtin_memset_read_str (void *, HOST_WIDE_INT, machine_mode);
+extern rtx builtin_strncpy_read_str (void *, HOST_WIDE_INT, scalar_int_mode);
+extern rtx builtin_memset_read_str (void *, HOST_WIDE_INT, scalar_int_mode);
extern rtx expand_builtin_saveregs (void);
extern tree std_build_builtin_va_list (void);
extern tree std_fn_abi_va_list (tree);
any rtl. */
static rtx
-convert_debug_memory_address (machine_mode mode, rtx x,
+convert_debug_memory_address (scalar_int_mode mode, rtx x,
addr_space_t as)
{
#ifndef POINTERS_EXTEND_UNSIGNED
rtx cond_op0 = XEXP (cond, 0);
rtx cond_op1 = XEXP (cond, 1);
enum rtx_code op = UNKNOWN, extend_op = UNKNOWN;
- machine_mode m = int_mode;
+ scalar_int_mode m = int_mode;
rtx z = 0, c1 = NULL_RTX;
if ((GET_CODE (t) == PLUS || GET_CODE (t) == MINUS
ignore the POS lowest bits, etc. */
machine_mode is_mode = GET_MODE (inner);
machine_mode inner_mode;
- machine_mode wanted_inner_mode;
- machine_mode wanted_inner_reg_mode = word_mode;
- machine_mode pos_mode = word_mode;
+ scalar_int_mode wanted_inner_mode;
+ scalar_int_mode wanted_inner_reg_mode = word_mode;
+ scalar_int_mode pos_mode = word_mode;
machine_mode extraction_mode = word_mode;
rtx new_rtx = 0;
rtx orig_pos_rtx = pos_rtx;
result of the shift is subject to operation OUTER_CODE with operand
OUTER_CONST. */
-static machine_mode
+static scalar_int_mode
try_widen_shift_mode (enum rtx_code code, rtx op, int count,
- machine_mode orig_mode, machine_mode mode,
+ scalar_int_mode orig_mode, scalar_int_mode mode,
enum rtx_code outer_code, HOST_WIDE_INT outer_const)
{
gcc_assert (GET_MODE_PRECISION (mode) > GET_MODE_PRECISION (orig_mode));
return !BYTES_BIG_ENDIAN;
}
-static machine_mode
+static scalar_int_mode
aarch64_libgcc_cmp_return_mode (void)
{
return SImode;
#if TARGET_ABI_OPEN_VMS
static void alpha_write_linkage (FILE *, const char *);
-static bool vms_valid_pointer_mode (machine_mode);
+static bool vms_valid_pointer_mode (scalar_int_mode);
#else
#define vms_patch_builtins() gcc_unreachable()
#endif
#if TARGET_ABI_OPEN_VMS
static bool
-vms_valid_pointer_mode (machine_mode mode)
+vms_valid_pointer_mode (scalar_int_mode mode)
{
return (mode == SImode || mode == DImode);
}
/* Implement `TARGET_ADDR_SPACE_ADDRESS_MODE'. */
-static machine_mode
+static scalar_int_mode
avr_addr_space_address_mode (addr_space_t as)
{
return avr_addrspace[as].pointer_size == 3 ? PSImode : HImode;
/* Implement `TARGET_ADDR_SPACE_POINTER_MODE'. */
-static machine_mode
+static scalar_int_mode
avr_addr_space_pointer_mode (addr_space_t as)
{
return avr_addr_space_address_mode (as);
return;
}
-static machine_mode
+static scalar_int_mode
cr16_unwind_word_mode (void)
{
return SImode;
#undef TARGET_VALID_POINTER_MODE
#define TARGET_VALID_POINTER_MODE ft32_valid_pointer_mode
static bool
-ft32_valid_pointer_mode (machine_mode mode)
+ft32_valid_pointer_mode (scalar_int_mode mode)
{
if (mode == SImode)
return 1;
#undef TARGET_ADDR_SPACE_POINTER_MODE
#define TARGET_ADDR_SPACE_POINTER_MODE ft32_addr_space_pointer_mode
-static machine_mode
+static scalar_int_mode
ft32_addr_space_pointer_mode (addr_space_t addrspace ATTRIBUTE_UNUSED)
{
return Pmode;
#undef TARGET_ADDR_SPACE_ADDRESS_MODE
#define TARGET_ADDR_SPACE_ADDRESS_MODE ft32_addr_space_address_mode
-static machine_mode
+static scalar_int_mode
ft32_addr_space_address_mode (addr_space_t addrspace ATTRIBUTE_UNUSED)
{
return Pmode;
ATTRIBUTE_UNUSED;
static void ia64_soft_fp_init_libfuncs (void)
ATTRIBUTE_UNUSED;
-static bool ia64_vms_valid_pointer_mode (machine_mode mode)
+static bool ia64_vms_valid_pointer_mode (scalar_int_mode mode)
ATTRIBUTE_UNUSED;
static tree ia64_vms_common_object_attribute (tree *, tree, tree, int, bool *)
ATTRIBUTE_UNUSED;
}
static bool
-ia64_vms_valid_pointer_mode (machine_mode mode)
+ia64_vms_valid_pointer_mode (scalar_int_mode mode)
{
return (mode == SImode || mode == DImode);
}
#undef TARGET_VALID_POINTER_MODE
#define TARGET_VALID_POINTER_MODE m32c_valid_pointer_mode
static bool
-m32c_valid_pointer_mode (machine_mode mode)
+m32c_valid_pointer_mode (scalar_int_mode mode)
{
if (mode == HImode
|| mode == PSImode
/* Return the appropriate mode for a named address pointer. */
#undef TARGET_ADDR_SPACE_POINTER_MODE
#define TARGET_ADDR_SPACE_POINTER_MODE m32c_addr_space_pointer_mode
-static machine_mode
+static scalar_int_mode
m32c_addr_space_pointer_mode (addr_space_t addrspace)
{
switch (addrspace)
/* Return the appropriate mode for a named address address. */
#undef TARGET_ADDR_SPACE_ADDRESS_MODE
#define TARGET_ADDR_SPACE_ADDRESS_MODE m32c_addr_space_address_mode
-static machine_mode
+static scalar_int_mode
m32c_addr_space_address_mode (addr_space_t addrspace)
{
switch (addrspace)
/* Implement TARGET_MODE_REP_EXTENDED. */
static int
-mips_mode_rep_extended (machine_mode mode, machine_mode mode_rep)
+mips_mode_rep_extended (scalar_int_mode mode, scalar_int_mode mode_rep)
{
/* On 64-bit targets, SImode register values are sign-extended to DImode. */
if (TARGET_64BIT && mode == SImode && mode_rep == DImode)
/* Implement TARGET_VALID_POINTER_MODE. */
static bool
-mips_valid_pointer_mode (machine_mode mode)
+mips_valid_pointer_mode (scalar_int_mode mode)
{
return mode == SImode || (TARGET_64BIT && mode == DImode);
}
#undef TARGET_ADDR_SPACE_ADDRESS_MODE
#define TARGET_ADDR_SPACE_ADDRESS_MODE msp430_addr_space_pointer_mode
-static machine_mode
+static scalar_int_mode
msp430_addr_space_pointer_mode (addr_space_t addrspace)
{
switch (addrspace)
#undef TARGET_UNWIND_WORD_MODE
#define TARGET_UNWIND_WORD_MODE msp430_unwind_word_mode
-static machine_mode
+static scalar_int_mode
msp430_unwind_word_mode (void)
{
/* This needs to match msp430_init_dwarf_reg_sizes_extra (below). */
/* The mode the ABI uses for a word. This is not the same as word_mode
for -m32 -mpowerpc64. This is used to implement various target hooks. */
-static machine_mode
+static scalar_int_mode
rs6000_abi_word_mode (void)
{
return TARGET_32BIT ? SImode : DImode;
}
/* target hook eh_return_filter_mode */
-static machine_mode
+static scalar_int_mode
rs6000_eh_return_filter_mode (void)
{
return TARGET_32BIT ? SImode : word_mode;
#undef TARGET_ADDR_SPACE_ADDRESS_MODE
#define TARGET_ADDR_SPACE_ADDRESS_MODE rl78_addr_space_address_mode
-static machine_mode
+static scalar_int_mode
rl78_addr_space_address_mode (addr_space_t addrspace)
{
switch (addrspace)
#undef TARGET_ADDR_SPACE_POINTER_MODE
#define TARGET_ADDR_SPACE_POINTER_MODE rl78_addr_space_pointer_mode
-static machine_mode
+static scalar_int_mode
rl78_addr_space_pointer_mode (addr_space_t addrspace)
{
switch (addrspace)
#define TARGET_VALID_POINTER_MODE rl78_valid_pointer_mode
static bool
-rl78_valid_pointer_mode (machine_mode m)
+rl78_valid_pointer_mode (scalar_int_mode m)
{
return (m == HImode || m == SImode);
}
#undef TARGET_UNWIND_WORD_MODE
#define TARGET_UNWIND_WORD_MODE rl78_unwind_word_mode
-static machine_mode
+static scalar_int_mode
rl78_unwind_word_mode (void)
{
return HImode;
/* The mode the ABI uses for a word. This is not the same as word_mode
for -m32 -mpowerpc64. This is used to implement various target hooks. */
-static machine_mode
+static scalar_int_mode
rs6000_abi_word_mode (void)
{
return TARGET_32BIT ? SImode : DImode;
}
/* target hook eh_return_filter_mode */
-static machine_mode
+static scalar_int_mode
rs6000_eh_return_filter_mode (void)
{
return TARGET_32BIT ? SImode : word_mode;
return got_symbol;
}
-static machine_mode
+static scalar_int_mode
s390_libgcc_cmp_return_mode (void)
{
return TARGET_64BIT ? DImode : SImode;
}
-static machine_mode
+static scalar_int_mode
s390_libgcc_shift_count_mode (void)
{
return TARGET_64BIT ? DImode : SImode;
}
-static machine_mode
+static scalar_int_mode
s390_unwind_word_mode (void)
{
return TARGET_64BIT ? DImode : SImode;
}
static bool
-s390_valid_pointer_mode (machine_mode mode)
+s390_valid_pointer_mode (scalar_int_mode mode)
{
return (mode == SImode || (TARGET_64BIT && mode == DImode));
}
return true;
}
-static machine_mode
+static scalar_int_mode
spu_unwind_word_mode (void)
{
return SImode;
}
/* Return the appropriate mode for a named address pointer. */
-static machine_mode
+static scalar_int_mode
spu_addr_space_pointer_mode (addr_space_t addrspace)
{
switch (addrspace)
}
/* Return the appropriate mode for a named address address. */
-static machine_mode
+static scalar_int_mode
spu_addr_space_address_mode (addr_space_t addrspace)
{
switch (addrspace)
}
}
-static machine_mode
+static scalar_int_mode
spu_libgcc_cmp_return_mode (void)
{
return SImode;
}
-static machine_mode
+static scalar_int_mode
spu_libgcc_shift_count_mode (void)
{
/* For SPU word mode is TI mode so it is better to use SImode
/* Implement TARGET_MODE_REP_EXTENDED. */
static int
-tilegx_mode_rep_extended (machine_mode mode, machine_mode mode_rep)
+tilegx_mode_rep_extended (scalar_int_mode mode, scalar_int_mode mode_rep)
{
/* SImode register values are sign-extended to DImode. */
if (mode == SImode && mode_rep == DImode)
pattern needs to support both a 32- and a 64-bit mode.
@end defmac
-@deftypefn {Target Hook} machine_mode TARGET_LIBGCC_CMP_RETURN_MODE (void)
+@deftypefn {Target Hook} scalar_int_mode TARGET_LIBGCC_CMP_RETURN_MODE (void)
This target hook should return the mode to be used for the return value
of compare instructions expanded to libgcc calls. If not defined
@code{word_mode} is returned which is the right choice for a majority of
targets.
@end deftypefn
-@deftypefn {Target Hook} machine_mode TARGET_LIBGCC_SHIFT_COUNT_MODE (void)
+@deftypefn {Target Hook} scalar_int_mode TARGET_LIBGCC_SHIFT_COUNT_MODE (void)
This target hook should return the mode to be used for the shift count operand
of shift instructions expanded to libgcc calls. If not defined
@code{word_mode} is returned which is the right choice for a majority of
targets.
@end deftypefn
-@deftypefn {Target Hook} machine_mode TARGET_UNWIND_WORD_MODE (void)
+@deftypefn {Target Hook} scalar_int_mode TARGET_UNWIND_WORD_MODE (void)
Return machine mode to be used for @code{_Unwind_Word} type.
The default is to use @code{word_mode}.
@end deftypefn
@code{gimplify.c:gimplify_expr}.
@end deftypefn
-@deftypefn {Target Hook} bool TARGET_VALID_POINTER_MODE (machine_mode @var{mode})
+@deftypefn {Target Hook} bool TARGET_VALID_POINTER_MODE (scalar_int_mode @var{mode})
Define this to return nonzero if the port can handle pointers
with machine mode @var{mode}. The default version of this
hook returns true for both @code{ptr_mode} and @code{Pmode}.
c_register_addr_space ("__ea", ADDR_SPACE_EA);
@end smallexample
-@deftypefn {Target Hook} machine_mode TARGET_ADDR_SPACE_POINTER_MODE (addr_space_t @var{address_space})
+@deftypefn {Target Hook} scalar_int_mode TARGET_ADDR_SPACE_POINTER_MODE (addr_space_t @var{address_space})
Define this to return the machine mode to use for pointers to
@var{address_space} if the target supports named address spaces.
The default version of this hook returns @code{ptr_mode}.
@end deftypefn
-@deftypefn {Target Hook} machine_mode TARGET_ADDR_SPACE_ADDRESS_MODE (addr_space_t @var{address_space})
+@deftypefn {Target Hook} scalar_int_mode TARGET_ADDR_SPACE_ADDRESS_MODE (addr_space_t @var{address_space})
Define this to return the machine mode to use for addresses in
@var{address_space} if the target supports named address spaces.
The default version of this hook returns @code{Pmode}.
@end deftypefn
-@deftypefn {Target Hook} bool TARGET_ADDR_SPACE_VALID_POINTER_MODE (machine_mode @var{mode}, addr_space_t @var{as})
+@deftypefn {Target Hook} bool TARGET_ADDR_SPACE_VALID_POINTER_MODE (scalar_int_mode @var{mode}, addr_space_t @var{as})
Define this to return nonzero if the port can handle pointers
with machine mode @var{mode} to address space @var{as}. This target
hook is the same as the @code{TARGET_VALID_POINTER_MODE} target hook,
such cases may improve things.
@end defmac
-@deftypefn {Target Hook} int TARGET_MODE_REP_EXTENDED (machine_mode @var{mode}, machine_mode @var{rep_mode})
+@deftypefn {Target Hook} int TARGET_MODE_REP_EXTENDED (scalar_int_mode @var{mode}, scalar_int_mode @var{rep_mode})
The representation of an integral mode can be such that the values
are always extended to a wider integral mode. Return
@code{SIGN_EXTEND} if values of @var{mode} are represented in
#include "expr.h"
#include "langhooks.h"
-static bool prefer_and_bit_test (machine_mode, int);
+static bool prefer_and_bit_test (scalar_int_mode, int);
static void do_jump_by_parts_greater (scalar_int_mode, tree, tree, int,
rtx_code_label *, rtx_code_label *,
profile_probability);
is preferred. */
static bool
-prefer_and_bit_test (machine_mode mode, int bitnum)
+prefer_and_bit_test (scalar_int_mode mode, int bitnum)
{
bool speed_p;
wide_int mask = wi::set_bit_in_zero (bitnum, GET_MODE_PRECISION (mode));
rtx temp;
int i;
tree type;
- machine_mode mode;
+ scalar_int_mode mode;
rtx_code_label *drop_through_label = NULL;
switch (code)
which has mode MODE. Initialize column C as a return address column. */
static void
-init_return_column_size (machine_mode mode, rtx mem, unsigned int c)
+init_return_column_size (scalar_int_mode mode, rtx mem, unsigned int c)
{
HOST_WIDE_INT offset = c * GET_MODE_SIZE (mode);
HOST_WIDE_INT size = GET_MODE_SIZE (Pmode);
possible. */
static dw_loc_descr_ref
-convert_descriptor_to_mode (machine_mode mode, dw_loc_descr_ref op)
+convert_descriptor_to_mode (scalar_int_mode mode, dw_loc_descr_ref op)
{
machine_mode outer_mode = mode;
dw_die_ref type_die;
static dw_loc_descr_ref
scompare_loc_descriptor_wide (enum dwarf_location_atom op,
- machine_mode op_mode,
+ scalar_int_mode op_mode,
dw_loc_descr_ref op0, dw_loc_descr_ref op1)
{
dw_die_ref type_die = base_type_for_mode (op_mode, 0);
static dw_loc_descr_ref
scompare_loc_descriptor_narrow (enum dwarf_location_atom op, rtx rtl,
- machine_mode op_mode,
+ scalar_int_mode op_mode,
dw_loc_descr_ref op0, dw_loc_descr_ref op1)
{
int shift = (DWARF2_ADDR_SIZE - GET_MODE_SIZE (op_mode)) * BITS_PER_UNIT;
{
rtx addr = XEXP (memref, 0);
rtx new_rtx;
- machine_mode address_mode;
+ scalar_int_mode address_mode;
int pbits;
struct mem_attrs attrs = *get_mem_attrs (memref), *defattrs;
unsigned HOST_WIDE_INT max_align;
#ifdef POINTERS_EXTEND_UNSIGNED
- machine_mode pointer_mode
+ scalar_int_mode pointer_mode
= targetm.addr_space.pointer_mode (attrs.addrspace);
#endif
static void
sjlj_emit_dispatch_table (rtx_code_label *dispatch_label, int num_dispatch)
{
- machine_mode unwind_word_mode = targetm.unwind_word_mode ();
- machine_mode filter_mode = targetm.eh_return_filter_mode ();
+ scalar_int_mode unwind_word_mode = targetm.unwind_word_mode ();
+ scalar_int_mode filter_mode = targetm.eh_return_filter_mode ();
eh_landing_pad lp;
rtx mem, fc, exc_ptr_reg, filter_reg;
rtx_insn *seq;
= expand_builtin_eh_common (CALL_EXPR_ARG (exp, 0));
eh_region src
= expand_builtin_eh_common (CALL_EXPR_ARG (exp, 1));
- machine_mode fmode = targetm.eh_return_filter_mode ();
+ scalar_int_mode fmode = targetm.eh_return_filter_mode ();
if (dst->exc_ptr_reg == NULL)
dst->exc_ptr_reg = gen_reg_rtx (ptr_mode);
it should return NULL if it can't be simplified without emitting insns. */
rtx
-convert_memory_address_addr_space_1 (machine_mode to_mode ATTRIBUTE_UNUSED,
+convert_memory_address_addr_space_1 (scalar_int_mode to_mode ATTRIBUTE_UNUSED,
rtx x, addr_space_t as ATTRIBUTE_UNUSED,
bool in_const ATTRIBUTE_UNUSED,
bool no_emit ATTRIBUTE_UNUSED)
gcc_assert (GET_MODE (x) == to_mode || GET_MODE (x) == VOIDmode);
return x;
#else /* defined(POINTERS_EXTEND_UNSIGNED) */
- machine_mode pointer_mode, address_mode, from_mode;
+ scalar_int_mode pointer_mode, address_mode, from_mode;
rtx temp;
enum rtx_code code;
arithmetic insns can be used. */
rtx
-convert_memory_address_addr_space (machine_mode to_mode, rtx x, addr_space_t as)
+convert_memory_address_addr_space (scalar_int_mode to_mode, rtx x,
+ addr_space_t as)
{
return convert_memory_address_addr_space_1 (to_mode, x, as, false, false);
}
memory_address_addr_space (machine_mode mode, rtx x, addr_space_t as)
{
rtx oldx = x;
- machine_mode address_mode = targetm.addr_space.address_mode (as);
+ scalar_int_mode address_mode = targetm.addr_space.address_mode (as);
x = convert_memory_address_addr_space (address_mode, x, as);
unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT, int, bool);
static void do_cmp_and_jump (rtx, rtx, enum rtx_code, machine_mode, rtx_code_label *);
-static rtx expand_smod_pow2 (machine_mode, rtx, HOST_WIDE_INT);
-static rtx expand_sdiv_pow2 (machine_mode, rtx, HOST_WIDE_INT);
+static rtx expand_smod_pow2 (scalar_int_mode, rtx, HOST_WIDE_INT);
+static rtx expand_sdiv_pow2 (scalar_int_mode, rtx, HOST_WIDE_INT);
/* Return a constant integer mask value of mode MODE with BITSIZE ones
followed by BITPOS zeros, or the complement of that if COMPLEMENT.
mask is zero-extended if BITSIZE+BITPOS is too small for MODE. */
static inline rtx
-mask_rtx (machine_mode mode, int bitpos, int bitsize, bool complement)
+mask_rtx (scalar_int_mode mode, int bitpos, int bitsize, bool complement)
{
return immed_wide_int_const
(wi::shifted_mask (bitpos, bitsize, complement,
};
static void
-init_expmed_one_conv (struct init_expmed_rtl *all, machine_mode to_mode,
- machine_mode from_mode, bool speed)
+init_expmed_one_conv (struct init_expmed_rtl *all, scalar_int_mode to_mode,
+ scalar_int_mode from_mode, bool speed)
{
int to_size, from_size;
rtx which;
{
/* Limit the search to the mode required by the corresponding
register insertion or extraction instruction, if any. */
- machine_mode limit_mode = word_mode;
+ scalar_int_mode limit_mode = word_mode;
extraction_insn insn;
if (get_best_reg_extraction_insn (&insn, pattern,
GET_MODE_BITSIZE (best_mode),
rtx
extract_low_bits (machine_mode mode, machine_mode src_mode, rtx src)
{
- machine_mode int_mode, src_int_mode;
+ scalar_int_mode int_mode, src_int_mode;
if (mode == src_mode)
return src;
static rtx expand_mult_const (machine_mode, rtx, HOST_WIDE_INT, rtx,
const struct algorithm *, enum mult_variant);
static unsigned HOST_WIDE_INT invert_mod2n (unsigned HOST_WIDE_INT, int);
-static rtx extract_high_half (machine_mode, rtx);
-static rtx expmed_mult_highpart (machine_mode, rtx, rtx, rtx, int, int);
-static rtx expmed_mult_highpart_optab (machine_mode, rtx, rtx, rtx,
+static rtx extract_high_half (scalar_int_mode, rtx);
+static rtx expmed_mult_highpart (scalar_int_mode, rtx, rtx, rtx, int, int);
+static rtx expmed_mult_highpart_optab (scalar_int_mode, rtx, rtx, rtx,
int, int);
/* Compute and return the best algorithm for multiplying by T.
The algorithm must cost less than cost_limit
MODE is the mode of operation. */
rtx
-expand_mult_highpart_adjust (machine_mode mode, rtx adj_operand, rtx op0,
+expand_mult_highpart_adjust (scalar_int_mode mode, rtx adj_operand, rtx op0,
rtx op1, rtx target, int unsignedp)
{
rtx tem;
/* Subroutine of expmed_mult_highpart. Return the MODE high part of OP. */
static rtx
-extract_high_half (machine_mode mode, rtx op)
+extract_high_half (scalar_int_mode mode, rtx op)
{
machine_mode wider_mode;
optab. OP1 is an rtx for the constant operand. */
static rtx
-expmed_mult_highpart_optab (machine_mode mode, rtx op0, rtx op1,
+expmed_mult_highpart_optab (scalar_int_mode mode, rtx op0, rtx op1,
rtx target, int unsignedp, int max_cost)
{
rtx narrow_op1 = gen_int_mode (INTVAL (op1), mode);
MAX_COST is the total allowed cost for the expanded RTL. */
static rtx
-expmed_mult_highpart (machine_mode mode, rtx op0, rtx op1,
+expmed_mult_highpart (scalar_int_mode mode, rtx op0, rtx op1,
rtx target, int unsignedp, int max_cost)
{
machine_mode wider_mode = GET_MODE_WIDER_MODE (mode).require ();
/* Expand signed modulus of OP0 by a power of two D in mode MODE. */
static rtx
-expand_smod_pow2 (machine_mode mode, rtx op0, HOST_WIDE_INT d)
+expand_smod_pow2 (scalar_int_mode mode, rtx op0, HOST_WIDE_INT d)
{
rtx result, temp, shift;
rtx_code_label *label;
This routine is only called for positive values of D. */
static rtx
-expand_sdiv_pow2 (machine_mode mode, rtx op0, HOST_WIDE_INT d)
+expand_sdiv_pow2 (scalar_int_mode mode, rtx op0, HOST_WIDE_INT d)
{
rtx temp;
rtx_code_label *label;
rtx
emit_store_flag_int (rtx target, rtx subtarget, enum rtx_code code, rtx op0,
- rtx op1, machine_mode mode, int unsignedp,
+ rtx op1, scalar_int_mode mode, int unsignedp,
int normalizep, rtx trueval)
{
machine_mode target_mode = target ? GET_MODE (target) : VOIDmode;
machine_mode, machine_mode, bool, rtx *);
extern rtx extract_low_bits (machine_mode, machine_mode, rtx);
extern rtx expand_mult (machine_mode, rtx, rtx, rtx, int);
-extern rtx expand_mult_highpart_adjust (machine_mode, rtx, rtx, rtx, rtx, int);
+extern rtx expand_mult_highpart_adjust (scalar_int_mode, rtx, rtx, rtx,
+ rtx, int);
#endif // EXPMED_H
void *m_cfndata;
public:
pieces_addr (rtx, bool, by_pieces_constfn, void *);
- rtx adjust (machine_mode, HOST_WIDE_INT);
+ rtx adjust (scalar_int_mode, HOST_WIDE_INT);
void increment_address (HOST_WIDE_INT);
void maybe_predec (HOST_WIDE_INT);
void maybe_postinc (HOST_WIDE_INT);
but we still modify the MEM's properties. */
rtx
-pieces_addr::adjust (machine_mode mode, HOST_WIDE_INT offset)
+pieces_addr::adjust (scalar_int_mode mode, HOST_WIDE_INT offset)
{
if (m_constfn)
return m_constfn (m_cfndata, offset, mode);
int
can_store_by_pieces (unsigned HOST_WIDE_INT len,
- rtx (*constfun) (void *, HOST_WIDE_INT, machine_mode),
+ rtx (*constfun) (void *, HOST_WIDE_INT, scalar_int_mode),
void *constfundata, unsigned int align, bool memsetp)
{
unsigned HOST_WIDE_INT l;
rtx
store_by_pieces (rtx to, unsigned HOST_WIDE_INT len,
- rtx (*constfun) (void *, HOST_WIDE_INT, machine_mode),
+ rtx (*constfun) (void *, HOST_WIDE_INT, scalar_int_mode),
void *constfundata, unsigned int align, bool memsetp, int endp)
{
if (len == 0)
Return const0_rtx unconditionally. */
static rtx
-clear_by_pieces_1 (void *, HOST_WIDE_INT, machine_mode)
+clear_by_pieces_1 (void *, HOST_WIDE_INT, scalar_int_mode)
{
return const0_rtx;
}
The TARGET, TMODE and MODIFIER arguments are as for expand_expr. */
static rtx
-expand_expr_addr_expr_1 (tree exp, rtx target, machine_mode tmode,
+expand_expr_addr_expr_1 (tree exp, rtx target, scalar_int_mode tmode,
enum expand_modifier modifier, addr_space_t as)
{
rtx result, subtarget;
enum expand_modifier modifier)
{
addr_space_t as = ADDR_SPACE_GENERIC;
- machine_mode address_mode = Pmode;
- machine_mode pointer_mode = ptr_mode;
+ scalar_int_mode address_mode = Pmode;
+ scalar_int_mode pointer_mode = ptr_mode;
machine_mode rmode;
rtx result;
/* We can get called with some Weird Things if the user does silliness
like "(short) &a". In that case, convert_memory_address won't do
the right thing, so ignore the given target mode. */
- machine_mode new_tmode = (tmode == pointer_mode
- ? pointer_mode
- : address_mode);
+ scalar_int_mode new_tmode = (tmode == pointer_mode
+ ? pointer_mode
+ : address_mode);
result = expand_expr_addr_expr_1 (TREE_OPERAND (exp, 0), target,
new_tmode, modifier, as);
/* Writing into CONST_DECL is always invalid, but handle it
gracefully. */
addr_space_t as = TYPE_ADDR_SPACE (TREE_TYPE (exp));
- machine_mode address_mode = targetm.addr_space.address_mode (as);
+ scalar_int_mode address_mode = targetm.addr_space.address_mode (as);
op0 = expand_expr_addr_expr_1 (exp, NULL_RTX, address_mode,
EXPAND_NORMAL, as);
op0 = memory_address_addr_space (mode, op0, as);
profile_probability default_probability)
{
struct expand_operand ops[5];
- machine_mode index_mode = SImode;
+ scalar_int_mode index_mode = SImode;
rtx op1, op2, index;
if (! targetm.have_casesi ())
BLOCK_OP_TAILCALL
};
-typedef rtx (*by_pieces_constfn) (void *, HOST_WIDE_INT, machine_mode);
+typedef rtx (*by_pieces_constfn) (void *, HOST_WIDE_INT, scalar_int_mode);
extern rtx emit_block_move (rtx, rtx, rtx, enum block_op_methods);
extern rtx emit_block_move_hints (rtx, rtx, rtx, enum block_op_methods,
rtx_insn *prev;
int rel_align = 0;
addr_diff_vec_flags flags;
- machine_mode vec_mode;
+ scalar_int_mode vec_mode;
/* Avoid automatic aggregate initialization. */
flags = ADDR_DIFF_VEC_FLAGS (body);
{
tree t;
double_int temp, temp_trunc;
- unsigned int mode;
+ machine_mode mode;
/* Right shift FIXED_CST to temp by fbit. */
temp = TREE_FIXED_CST (arg1).data;
static void
expand_arith_overflow_result_store (tree lhs, rtx target,
- machine_mode mode, rtx res)
+ scalar_int_mode mode, rtx res)
{
scalar_int_mode tgtmode
= as_a <scalar_int_mode> (GET_MODE_INNER (GET_MODE (target)));
{
struct separate_ops ops;
int prec = GET_MODE_PRECISION (mode);
- scalar_int_mode hmode;
- machine_mode wmode;
+ scalar_int_mode hmode, wmode;
ops.op0 = make_tree (type, op0);
ops.op1 = make_tree (type, op1);
ops.op2 = NULL_TREE;
int nonneg = 0;
bool increment_count;
basic_block loop_end = desc->out_edge->src;
- machine_mode mode;
+ scalar_int_mode mode;
widest_int iterations;
jump_insn = BB_END (loop_end);
static bool
doloop_optimize (struct loop *loop)
{
- machine_mode mode;
+ scalar_int_mode mode;
rtx doloop_reg;
rtx count;
widest_int iterations, iterations_max;
value are the same as for the parent routine. */
static bool
-expand_subword_shift (machine_mode op1_mode, optab binoptab,
+expand_subword_shift (scalar_int_mode op1_mode, optab binoptab,
rtx outof_input, rtx into_input, rtx op1,
rtx outof_target, rtx into_target,
int unsignedp, enum optab_methods methods,
arguments are the same as the parent routine. */
static bool
-expand_doubleword_shift_condmove (machine_mode op1_mode, optab binoptab,
+expand_doubleword_shift_condmove (scalar_int_mode op1_mode, optab binoptab,
enum rtx_code cmp_code, rtx cmp1, rtx cmp2,
rtx outof_input, rtx into_input,
rtx subword_op1, rtx superword_op1,
Return true if the shift could be successfully synthesized. */
static bool
-expand_doubleword_shift (machine_mode op1_mode, optab binoptab,
+expand_doubleword_shift (scalar_int_mode op1_mode, optab binoptab,
rtx outof_input, rtx into_input, rtx op1,
rtx outof_target, rtx into_target,
int unsignedp, enum optab_methods methods,
/* Try calculating clz of a double-word quantity as two clz's of word-sized
quantities, choosing which based on whether the high word is nonzero. */
static rtx
-expand_doubleword_clz (machine_mode mode, rtx op0, rtx target)
+expand_doubleword_clz (scalar_int_mode mode, rtx op0, rtx target)
{
rtx xop0 = force_reg (mode, op0);
rtx subhi = gen_highpart (word_mode, xop0);
/* Try calculating popcount of a double-word quantity as two popcount's of
word-sized quantities and summing up the results. */
static rtx
-expand_doubleword_popcount (machine_mode mode, rtx op0, rtx target)
+expand_doubleword_popcount (scalar_int_mode mode, rtx op0, rtx target)
{
rtx t0, t1, t;
rtx_insn *seq;
as
(parity:narrow (low (x) ^ high (x))) */
static rtx
-expand_doubleword_parity (machine_mode mode, rtx op0, rtx target)
+expand_doubleword_parity (scalar_int_mode mode, rtx op0, rtx target)
{
rtx t = expand_binop (word_mode, xor_optab,
operand_subword_force (op0, 0, mode),
{
const struct real_format *fmt;
int bitpos, word, nwords, i;
- machine_mode imode;
+ scalar_int_mode imode;
rtx temp;
rtx_insn *insns;
enum rtx_code swapped = swap_condition (comparison);
enum rtx_code reversed = reverse_condition_maybe_unordered (comparison);
machine_mode orig_mode = GET_MODE (x);
- machine_mode mode, cmp_mode;
+ machine_mode mode;
rtx true_rtx, false_rtx;
rtx value, target, equiv;
rtx_insn *insns;
rtx libfunc = 0;
bool reversed_p = false;
- cmp_mode = targetm.libgcc_cmp_return_mode ();
+ scalar_int_mode cmp_mode = targetm.libgcc_cmp_return_mode ();
FOR_EACH_MODE_FROM (mode, orig_mode)
{
extern int byte_lowpart_offset (machine_mode, machine_mode);
extern rtx make_safe_from (rtx, rtx);
-extern rtx convert_memory_address_addr_space_1 (machine_mode, rtx,
+extern rtx convert_memory_address_addr_space_1 (scalar_int_mode, rtx,
addr_space_t, bool, bool);
-extern rtx convert_memory_address_addr_space (machine_mode, rtx,
+extern rtx convert_memory_address_addr_space (scalar_int_mode, rtx,
addr_space_t);
#define convert_memory_address(to_mode,x) \
convert_memory_address_addr_space ((to_mode), (x), ADDR_SPACE_GENERIC)
return single_set_2 (insn, PATTERN (insn));
}
-extern machine_mode get_address_mode (rtx mem);
+extern scalar_int_mode get_address_mode (rtx mem);
extern int rtx_addr_can_trap_p (const_rtx);
extern bool nonzero_address_p (const_rtx);
extern int rtx_unstable_p (const_rtx);
extern unsigned int variable_tracking_main (void);
/* In stor-layout.c. */
-extern void get_mode_bounds (machine_mode, int, machine_mode,
- rtx *, rtx *);
+extern void get_mode_bounds (scalar_int_mode, int,
+ scalar_int_mode, rtx *, rtx *);
/* In loop-iv.c */
extern rtx canon_condition (rtx);
/* Return the mode of MEM's address. */
-machine_mode
+scalar_int_mode
get_address_mode (rtx mem)
{
machine_mode mode;
SIGN). The returned constants are made to be usable in TARGET_MODE. */
void
-get_mode_bounds (machine_mode mode, int sign,
- machine_mode target_mode,
+get_mode_bounds (scalar_int_mode mode, int sign,
+ scalar_int_mode target_mode,
rtx *mmin, rtx *mmax)
{
unsigned size = GET_MODE_PRECISION (mode);
DEFHOOK_UNDOC
(eh_return_filter_mode,
"Return machine mode for filter value.",
- machine_mode, (void),
+ scalar_int_mode, (void),
default_eh_return_filter_mode)
/* Return machine mode for libgcc expanded cmp instructions. */
of compare instructions expanded to libgcc calls. If not defined\n\
@code{word_mode} is returned which is the right choice for a majority of\n\
targets.",
- machine_mode, (void),
+ scalar_int_mode, (void),
default_libgcc_cmp_return_mode)
/* Return machine mode for libgcc expanded shift instructions. */
of shift instructions expanded to libgcc calls. If not defined\n\
@code{word_mode} is returned which is the right choice for a majority of\n\
targets.",
- machine_mode, (void),
+ scalar_int_mode, (void),
default_libgcc_shift_count_mode)
/* Return machine mode to be used for _Unwind_Word type. */
(unwind_word_mode,
"Return machine mode to be used for @code{_Unwind_Word} type.\n\
The default is to use @code{word_mode}.",
- machine_mode, (void),
+ scalar_int_mode, (void),
default_unwind_word_mode)
/* Given two decls, merge their attributes and return the result. */
In order to enforce the representation of @code{mode},\n\
@code{TRULY_NOOP_TRUNCATION} should return false when truncating to\n\
@code{mode}.",
- int, (machine_mode mode, machine_mode rep_mode),
+ int, (scalar_int_mode mode, scalar_int_mode rep_mode),
default_mode_rep_extended)
/* True if MODE is valid for a pointer in __attribute__((mode("MODE"))). */
"Define this to return nonzero if the port can handle pointers\n\
with machine mode @var{mode}. The default version of this\n\
hook returns true for both @code{ptr_mode} and @code{Pmode}.",
- bool, (machine_mode mode),
+ bool, (scalar_int_mode mode),
default_valid_pointer_mode)
/* Disambiguate with errno. */
"Define this to return the machine mode to use for pointers to\n\
@var{address_space} if the target supports named address spaces.\n\
The default version of this hook returns @code{ptr_mode}.",
- machine_mode, (addr_space_t address_space),
+ scalar_int_mode, (addr_space_t address_space),
default_addr_space_pointer_mode)
/* MODE to use for an address in another address space. */
"Define this to return the machine mode to use for addresses in\n\
@var{address_space} if the target supports named address spaces.\n\
The default version of this hook returns @code{Pmode}.",
- machine_mode, (addr_space_t address_space),
+ scalar_int_mode, (addr_space_t address_space),
default_addr_space_address_mode)
/* True if MODE is valid for a pointer in __attribute__((mode("MODE")))
version of this hook returns true for the modes returned by either the\n\
@code{TARGET_ADDR_SPACE_POINTER_MODE} or @code{TARGET_ADDR_SPACE_ADDRESS_MODE}\n\
target hooks for the given address space.",
- bool, (machine_mode mode, addr_space_t as),
+ bool, (scalar_int_mode mode, addr_space_t as),
default_addr_space_valid_pointer_mode)
/* True if an address is a valid memory address to a given named address
!= default_setup_incoming_varargs);
}
-machine_mode
+scalar_int_mode
default_eh_return_filter_mode (void)
{
return targetm.unwind_word_mode ();
}
-machine_mode
+scalar_int_mode
default_libgcc_cmp_return_mode (void)
{
return word_mode;
}
-machine_mode
+scalar_int_mode
default_libgcc_shift_count_mode (void)
{
return word_mode;
}
-machine_mode
+scalar_int_mode
default_unwind_word_mode (void)
{
return word_mode;
/* The default implementation of TARGET_MODE_REP_EXTENDED. */
int
-default_mode_rep_extended (machine_mode mode ATTRIBUTE_UNUSED,
- machine_mode mode_rep ATTRIBUTE_UNUSED)
+default_mode_rep_extended (scalar_int_mode, scalar_int_mode)
{
return UNKNOWN;
}
/* Determine whether or not a pointer mode is valid. Assume defaults
of ptr_mode or Pmode - can be overridden. */
bool
-default_valid_pointer_mode (machine_mode mode)
+default_valid_pointer_mode (scalar_int_mode mode)
{
return (mode == ptr_mode || mode == Pmode);
}
/* Return the mode for a pointer to a given ADDRSPACE,
defaulting to ptr_mode for all address spaces. */
-machine_mode
+scalar_int_mode
default_addr_space_pointer_mode (addr_space_t addrspace ATTRIBUTE_UNUSED)
{
return ptr_mode;
/* Return the mode for an address in a given ADDRSPACE,
defaulting to Pmode for all address spaces. */
-machine_mode
+scalar_int_mode
default_addr_space_address_mode (addr_space_t addrspace ATTRIBUTE_UNUSED)
{
return Pmode;
To match the above, the same modes apply to all address spaces. */
bool
-default_addr_space_valid_pointer_mode (machine_mode mode,
+default_addr_space_valid_pointer_mode (scalar_int_mode mode,
addr_space_t as ATTRIBUTE_UNUSED)
{
return targetm.valid_pointer_mode (mode);
extern rtx default_builtin_setjmp_frame_value (void);
extern bool default_pretend_outgoing_varargs_named (cumulative_args_t);
-extern machine_mode default_eh_return_filter_mode (void);
-extern machine_mode default_libgcc_cmp_return_mode (void);
-extern machine_mode default_libgcc_shift_count_mode (void);
-extern machine_mode default_unwind_word_mode (void);
+extern scalar_int_mode default_eh_return_filter_mode (void);
+extern scalar_int_mode default_libgcc_cmp_return_mode (void);
+extern scalar_int_mode default_libgcc_shift_count_mode (void);
+extern scalar_int_mode default_unwind_word_mode (void);
extern unsigned HOST_WIDE_INT default_shift_truncation_mask
(machine_mode);
extern unsigned int default_min_divisions_for_recip_mul (machine_mode);
-extern int default_mode_rep_extended (machine_mode, machine_mode);
+extern int default_mode_rep_extended (scalar_int_mode, scalar_int_mode);
extern tree default_stack_protect_guard (void);
extern tree default_external_stack_protect_fail (void);
extern bool default_target_option_valid_attribute_p (tree, tree, tree, int);
extern bool default_target_option_pragma_parse (tree, tree);
extern bool default_target_can_inline_p (tree, tree);
-extern bool default_valid_pointer_mode (machine_mode);
+extern bool default_valid_pointer_mode (scalar_int_mode);
extern bool default_ref_may_alias_errno (struct ao_ref *);
-extern machine_mode default_addr_space_pointer_mode (addr_space_t);
-extern machine_mode default_addr_space_address_mode (addr_space_t);
-extern bool default_addr_space_valid_pointer_mode (machine_mode,
+extern scalar_int_mode default_addr_space_pointer_mode (addr_space_t);
+extern scalar_int_mode default_addr_space_address_mode (addr_space_t);
+extern bool default_addr_space_valid_pointer_mode (scalar_int_mode,
addr_space_t);
extern bool default_addr_space_legitimate_address_p (machine_mode, rtx,
bool, addr_space_t);
addr_for_mem_ref (struct mem_address *addr, addr_space_t as,
bool really_expand)
{
- machine_mode address_mode = targetm.addr_space.address_mode (as);
- machine_mode pointer_mode = targetm.addr_space.pointer_mode (as);
+ scalar_int_mode address_mode = targetm.addr_space.address_mode (as);
+ scalar_int_mode pointer_mode = targetm.addr_space.pointer_mode (as);
rtx address, sym, bse, idx, st, off;
struct mem_addr_template *templ;
the cost in COST. */
static bool
-get_shiftadd_cost (tree expr, machine_mode mode, comp_cost cost0,
+get_shiftadd_cost (tree expr, scalar_int_mode mode, comp_cost cost0,
comp_cost cost1, tree mult, bool speed, comp_cost *cost)
{
comp_cost res;
return type;
scalar_int_mode type_mode = SCALAR_INT_TYPE_MODE (type);
- machine_mode mode = get_narrowest_mode (type_mode);
+ scalar_int_mode mode = get_narrowest_mode (type_mode);
if (GET_MODE_SIZE (type_mode) <= GET_MODE_SIZE (mode))
return type;
value_range *vr = get_value_range (rhs1);
scalar_float_mode fltmode
= SCALAR_FLOAT_TYPE_MODE (TREE_TYPE (gimple_assign_lhs (stmt)));
- machine_mode mode;
+ scalar_int_mode mode;
tree tem;
gassign *conv;
/* Transform X into narrower mode MODE from wider mode WMODE. */
static rtx
-use_narrower_mode (rtx x, machine_mode mode, machine_mode wmode)
+use_narrower_mode (rtx x, scalar_int_mode mode, scalar_int_mode wmode)
{
rtx op0, op1;
if (CONSTANT_P (x))