static int sequent_regs_live (void);
static const char *ptrreg_to_str (int);
static const char *cond_string (enum rtx_code);
-static int avr_num_arg_regs (enum machine_mode, const_tree);
-static int avr_operand_rtx_cost (rtx, enum machine_mode, enum rtx_code,
+static int avr_num_arg_regs (machine_mode, const_tree);
+static int avr_operand_rtx_cost (rtx, machine_mode, enum rtx_code,
int, bool);
static void output_reload_in_const (rtx*, rtx, int*, bool);
static struct machine_function * avr_init_machine_status (void);
{
int i;
- enum machine_mode mode = GET_MODE (xval);
+ machine_mode mode = GET_MODE (xval);
if (VOIDmode == mode)
mode = SImode;
rtx
avr_to_int_mode (rtx x)
{
- enum machine_mode mode = GET_MODE (x);
+ machine_mode mode = GET_MODE (x);
return VOIDmode == mode
? x
/* Implement `TARGET_SCALAR_MODE_SUPPORTED_P'. */
static bool
-avr_scalar_mode_supported_p (enum machine_mode mode)
+avr_scalar_mode_supported_p (machine_mode mode)
{
if (ALL_FIXED_POINT_MODE_P (mode))
return true;
/* Helper for the function below. */
static void
-avr_adjust_type_node (tree *node, enum machine_mode mode, int sat_p)
+avr_adjust_type_node (tree *node, machine_mode mode, int sat_p)
{
*node = make_node (FIXED_POINT_TYPE);
TYPE_SATURATING (*node) = sat_p;
machine for a memory operand of mode MODE. */
static bool
-avr_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
+avr_legitimate_address_p (machine_mode mode, rtx x, bool strict)
{
bool ok = CONSTANT_ADDRESS_P (x);
memory address for an operand of mode MODE */
static rtx
-avr_legitimize_address (rtx x, rtx oldx, enum machine_mode mode)
+avr_legitimize_address (rtx x, rtx oldx, machine_mode mode)
{
bool big_offset_p = false;
than 63 bytes or for R++ or --R addressing. */
rtx
-avr_legitimize_reload_address (rtx *px, enum machine_mode mode,
+avr_legitimize_reload_address (rtx *px, machine_mode mode,
int opnum, int type, int addr_type,
int ind_levels ATTRIBUTE_UNUSED,
rtx (*mk_memloc)(rtx,int))
static reg_class_t
avr_secondary_reload (bool in_p, rtx x,
reg_class_t reload_class ATTRIBUTE_UNUSED,
- enum machine_mode mode, secondary_reload_info *sri)
+ machine_mode mode, secondary_reload_info *sri)
{
if (in_p
&& MEM_P (x)
/* Return 0 if undefined, 1 if always true or always false. */
int
-avr_simplify_comparison_p (enum machine_mode mode, RTX_CODE op, rtx x)
+avr_simplify_comparison_p (machine_mode mode, RTX_CODE op, rtx x)
{
unsigned int max = (mode == QImode ? 0xff :
mode == HImode ? 0xffff :
/* Returns the number of registers to allocate for a function argument. */
static int
-avr_num_arg_regs (enum machine_mode mode, const_tree type)
+avr_num_arg_regs (machine_mode mode, const_tree type)
{
int size;
in a register, and which register. */
static rtx
-avr_function_arg (cumulative_args_t cum_v, enum machine_mode mode,
+avr_function_arg (cumulative_args_t cum_v, machine_mode mode,
const_tree type, bool named ATTRIBUTE_UNUSED)
{
CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
in the argument list. */
static void
-avr_function_arg_advance (cumulative_args_t cum_v, enum machine_mode mode,
+avr_function_arg_advance (cumulative_args_t cum_v, machine_mode mode,
const_tree type, bool named ATTRIBUTE_UNUSED)
{
CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
bool
avr_load_libgcc_p (rtx op)
{
- enum machine_mode mode = GET_MODE (op);
+ machine_mode mode = GET_MODE (op);
int n_bytes = GET_MODE_SIZE (mode);
return (n_bytes > 2
/* Return true if a value of mode MODE is read by __xload_* function. */
bool
-avr_xload_libgcc_p (enum machine_mode mode)
+avr_xload_libgcc_p (machine_mode mode)
{
int n_bytes = GET_MODE_SIZE (mode);
IN / OUT instruction will be generated. */
bool
-tiny_valid_direct_memory_access_range (rtx op, enum machine_mode mode)
+tiny_valid_direct_memory_access_range (rtx op, machine_mode mode)
{
rtx x;
rtx xval = xop[1];
/* MODE of the comparison. */
- enum machine_mode mode;
+ machine_mode mode;
/* Number of bytes to operate on. */
int i, n_bytes = GET_MODE_SIZE (GET_MODE (xreg));
enum rtx_code code_sat, int sign, bool out_label)
{
/* MODE of the operation. */
- enum machine_mode mode = GET_MODE (xop[0]);
+ machine_mode mode = GET_MODE (xop[0]);
/* INT_MODE of the same size. */
- enum machine_mode imode = int_mode_for_mode (mode);
+ machine_mode imode = int_mode_for_mode (mode);
/* Number of bytes to operate on. */
int i, n_bytes = GET_MODE_SIZE (mode);
static const char*
avr_out_plus_symbol (rtx *xop, enum rtx_code code, int *plen, int *pcc)
{
- enum machine_mode mode = GET_MODE (xop[0]);
+ machine_mode mode = GET_MODE (xop[0]);
/* Only pointer modes want to add symbols. */
rtx op[4];
rtx xpattern = INSN_P (insn) ? single_set (as_a <rtx_insn *> (insn)) : insn;
rtx xdest = SET_DEST (xpattern);
- enum machine_mode mode = GET_MODE (xdest);
- enum machine_mode imode = int_mode_for_mode (mode);
+ machine_mode mode = GET_MODE (xdest);
+ machine_mode imode = int_mode_for_mode (mode);
int n_bytes = GET_MODE_SIZE (mode);
enum rtx_code code_sat = GET_CODE (SET_SRC (xpattern));
enum rtx_code code
/* CODE and MODE of the operation. */
rtx xpattern = INSN_P (insn) ? single_set (as_a <rtx_insn *> (insn)) : insn;
enum rtx_code code = GET_CODE (SET_SRC (xpattern));
- enum machine_mode mode = GET_MODE (xop[0]);
+ machine_mode mode = GET_MODE (xop[0]);
/* Number of bytes to operate on. */
int i, n_bytes = GET_MODE_SIZE (mode);
for (i = 0; i < sizeof (val) / sizeof (*val); i++)
{
- enum machine_mode mode;
+ machine_mode mode;
xop[i] = operands[i];
const char*
avr_out_round (rtx_insn *insn ATTRIBUTE_UNUSED, rtx *xop, int *plen)
{
- enum machine_mode mode = GET_MODE (xop[0]);
- enum machine_mode imode = int_mode_for_mode (mode);
+ machine_mode mode = GET_MODE (xop[0]);
+ machine_mode imode = int_mode_for_mode (mode);
// The smallest fractional bit not cleared by the rounding is 2^(-RP).
int fbit = (int) GET_MODE_FBIT (mode);
double_int i_add = double_int_zero.set_bit (fbit-1 - INTVAL (xop[2]));
avr_rotate_bytes (rtx operands[])
{
int i, j;
- enum machine_mode mode = GET_MODE (operands[0]);
+ machine_mode mode = GET_MODE (operands[0]);
bool overlapped = reg_overlap_mentioned_p (operands[0], operands[1]);
bool same_reg = rtx_equal_p (operands[0], operands[1]);
int num = INTVAL (operands[2]);
rtx scratch = operands[3];
/* Work out if byte or word move is needed. Odd byte rotates need QImode.
Word move if no scratch is needed, otherwise use size of scratch. */
- enum machine_mode move_mode = QImode;
+ machine_mode move_mode = QImode;
int move_size, offset, size;
if (num & 0xf)
/* Implement `TARGET_REGISTER_MOVE_COST' */
static int
-avr_register_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED,
+avr_register_move_cost (machine_mode mode ATTRIBUTE_UNUSED,
reg_class_t from, reg_class_t to)
{
return (from == STACK_REG ? 6
/* Implement `TARGET_MEMORY_MOVE_COST' */
static int
-avr_memory_move_cost (enum machine_mode mode,
+avr_memory_move_cost (machine_mode mode,
reg_class_t rclass ATTRIBUTE_UNUSED,
bool in ATTRIBUTE_UNUSED)
{
operand's parent operator. */
static int
-avr_operand_rtx_cost (rtx x, enum machine_mode mode, enum rtx_code outer,
+avr_operand_rtx_cost (rtx x, machine_mode mode, enum rtx_code outer,
int opno, bool speed)
{
enum rtx_code code = GET_CODE (x);
int opno ATTRIBUTE_UNUSED, int *total, bool speed)
{
enum rtx_code code = (enum rtx_code) codearg;
- enum machine_mode mode = GET_MODE (x);
+ machine_mode mode = GET_MODE (x);
HOST_WIDE_INT val;
switch (code)
/* Implement `TARGET_ADDRESS_COST'. */
static int
-avr_address_cost (rtx x, enum machine_mode mode ATTRIBUTE_UNUSED,
+avr_address_cost (rtx x, machine_mode mode ATTRIBUTE_UNUSED,
addr_space_t as ATTRIBUTE_UNUSED,
bool speed ATTRIBUTE_UNUSED)
{
&& SET_DEST (pattern) == cc0_rtx
&& GET_CODE (SET_SRC (pattern)) == COMPARE)
{
- enum machine_mode mode0 = GET_MODE (XEXP (SET_SRC (pattern), 0));
- enum machine_mode mode1 = GET_MODE (XEXP (SET_SRC (pattern), 1));
+ machine_mode mode0 = GET_MODE (XEXP (SET_SRC (pattern), 0));
+ machine_mode mode1 = GET_MODE (XEXP (SET_SRC (pattern), 1));
/* The 64-bit comparisons have fixed operands ACC_A and ACC_B.
They must not be swapped, thus skip them. */
rtx x = XEXP (pattern, 1);
rtx src = SET_SRC (pat);
rtx t = XEXP (src,0);
- enum machine_mode mode = GET_MODE (XEXP (pattern, 0));
+ machine_mode mode = GET_MODE (XEXP (pattern, 0));
if (avr_simplify_comparison_p (mode, GET_CODE (t), x))
{
library function returns a value of mode MODE. */
static rtx
-avr_libcall_value (enum machine_mode mode,
+avr_libcall_value (machine_mode mode,
const_rtx func ATTRIBUTE_UNUSED)
{
int offs = GET_MODE_SIZE (mode);
(this way we don't have to check for odd registers everywhere). */
int
-avr_hard_regno_mode_ok (int regno, enum machine_mode mode)
+avr_hard_regno_mode_ok (int regno, machine_mode mode)
{
/* NOTE: 8-bit values must not be disallowed for R28 or R29.
Disallowing QI et al. in these regs might lead to code like
/* Implement `HARD_REGNO_CALL_PART_CLOBBERED'. */
int
-avr_hard_regno_call_part_clobbered (unsigned regno, enum machine_mode mode)
+avr_hard_regno_call_part_clobbered (unsigned regno, machine_mode mode)
{
/* FIXME: This hook gets called with MODE:REGNO combinations that don't
represent valid hard registers like, e.g. HI:29. Returning TRUE
/* Implement `MODE_CODE_BASE_REG_CLASS'. */
enum reg_class
-avr_mode_code_base_reg_class (enum machine_mode mode ATTRIBUTE_UNUSED,
+avr_mode_code_base_reg_class (machine_mode mode ATTRIBUTE_UNUSED,
addr_space_t as, RTX_CODE outer_code,
RTX_CODE index_code ATTRIBUTE_UNUSED)
{
bool
avr_regno_mode_code_ok_for_base_p (int regno,
- enum machine_mode mode ATTRIBUTE_UNUSED,
+ machine_mode mode ATTRIBUTE_UNUSED,
addr_space_t as ATTRIBUTE_UNUSED,
RTX_CODE outer_code,
RTX_CODE index_code ATTRIBUTE_UNUSED)
int clobber_val = 1234;
bool cooked_clobber_p = false;
bool set_p = false;
- enum machine_mode mode = GET_MODE (dest);
+ machine_mode mode = GET_MODE (dest);
int n, n_bytes = GET_MODE_SIZE (mode);
gcc_assert (REG_P (dest)
/* Implement `TARGET_ADDR_SPACE_ADDRESS_MODE'. */
-static enum machine_mode
+static machine_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 enum machine_mode
+static machine_mode
avr_addr_space_pointer_mode (addr_space_t as)
{
return avr_addr_space_address_mode (as);
/* Implement `TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P'. */
static bool
-avr_addr_space_legitimate_address_p (enum machine_mode mode, rtx x,
+avr_addr_space_legitimate_address_p (machine_mode mode, rtx x,
bool strict, addr_space_t as)
{
bool ok = false;
static rtx
avr_addr_space_legitimize_address (rtx x, rtx old_x,
- enum machine_mode mode, addr_space_t as)
+ machine_mode mode, addr_space_t as)
{
if (ADDR_SPACE_GENERIC_P (as))
return avr_legitimize_address (x, old_x, mode);
avr_emit_movmemhi (rtx *xop)
{
HOST_WIDE_INT count;
- enum machine_mode loop_mode;
+ machine_mode loop_mode;
addr_space_t as = MEM_ADDR_SPACE (xop[1]);
rtx loop_reg, addr1, a_src, a_dest, insn, xas;
rtx a_hi8 = NULL_RTX;
avr_out_movmem (rtx_insn *insn ATTRIBUTE_UNUSED, rtx *op, int *plen)
{
addr_space_t as = (addr_space_t) INTVAL (op[0]);
- enum machine_mode loop_mode = GET_MODE (op[1]);
+ machine_mode loop_mode = GET_MODE (op[1]);
bool sbiw_p = test_hard_reg_class (ADDW_REGS, op[1]);
rtx xop[3];
{
rtx pat, xop[3];
int n, n_args = call_expr_nargs (exp);
- enum machine_mode tmode = insn_data[icode].operand[0].mode;
+ machine_mode tmode = insn_data[icode].operand[0].mode;
gcc_assert (n_args >= 1 && n_args <= 3);
{
tree arg = CALL_EXPR_ARG (exp, n);
rtx op = expand_expr (arg, NULL_RTX, VOIDmode, EXPAND_NORMAL);
- enum machine_mode opmode = GET_MODE (op);
- enum machine_mode mode = insn_data[icode].operand[n+1].mode;
+ machine_mode opmode = GET_MODE (op);
+ machine_mode mode = insn_data[icode].operand[n+1].mode;
if ((opmode == SImode || opmode == VOIDmode) && mode == HImode)
{
static rtx
avr_expand_builtin (tree exp, rtx target,
rtx subtarget ATTRIBUTE_UNUSED,
- enum machine_mode mode ATTRIBUTE_UNUSED,
+ machine_mode mode ATTRIBUTE_UNUSED,
int ignore)
{
tree fndecl = TREE_OPERAND (CALL_EXPR_FN (exp), 0);