#define __XTENSA_PROTOS_H__
/* Functions to test whether an immediate fits in a given field. */
-extern int xtensa_simm7 PARAMS ((int));
-extern int xtensa_simm8 PARAMS ((int));
-extern int xtensa_simm8x256 PARAMS ((int));
-extern int xtensa_simm12b PARAMS ((int));
-extern int xtensa_uimm8 PARAMS ((int));
-extern int xtensa_uimm8x2 PARAMS ((int));
-extern int xtensa_uimm8x4 PARAMS ((int));
-extern int xtensa_ai4const PARAMS ((int));
-extern int xtensa_lsi4x4 PARAMS ((int));
-extern int xtensa_b4const PARAMS ((int));
-extern int xtensa_b4constu PARAMS ((int));
-extern int xtensa_tp7 PARAMS ((int));
+extern int xtensa_simm7 (int);
+extern int xtensa_simm8 (int);
+extern int xtensa_simm8x256 (int);
+extern int xtensa_simm12b (int);
+extern int xtensa_uimm8 (int);
+extern int xtensa_uimm8x2 (int);
+extern int xtensa_uimm8x4 (int);
+extern int xtensa_ai4const (int);
+extern int xtensa_lsi4x4 (int);
+extern int xtensa_b4const (int);
+extern int xtensa_b4constu (int);
+extern int xtensa_tp7 (int);
/* Functions within xtensa.c that we reference. */
#ifdef RTX_CODE
-extern int xt_true_regnum PARAMS ((rtx));
-extern int add_operand PARAMS ((rtx, enum machine_mode));
-extern int arith_operand PARAMS ((rtx, enum machine_mode));
-extern int nonimmed_operand PARAMS ((rtx, enum machine_mode));
-extern int mem_operand PARAMS ((rtx, enum machine_mode));
-extern int xtensa_valid_move PARAMS ((enum machine_mode, rtx *operands));
-extern int mask_operand PARAMS ((rtx, enum machine_mode));
-extern int extui_fldsz_operand PARAMS ((rtx, enum machine_mode));
-extern int sext_operand PARAMS ((rtx, enum machine_mode));
-extern int sext_fldsz_operand PARAMS ((rtx, enum machine_mode));
-extern int lsbitnum_operand PARAMS ((rtx, enum machine_mode));
-extern int branch_operand PARAMS ((rtx, enum machine_mode));
-extern int ubranch_operand PARAMS ((rtx, enum machine_mode));
-extern int call_insn_operand PARAMS ((rtx, enum machine_mode));
-extern int move_operand PARAMS ((rtx, enum machine_mode));
-extern int smalloffset_mem_p PARAMS ((rtx));
-extern int constantpool_address_p PARAMS ((rtx));
-extern int constantpool_mem_p PARAMS ((rtx));
-extern int const_float_1_operand PARAMS ((rtx, enum machine_mode));
-extern int fpmem_offset_operand PARAMS ((rtx, enum machine_mode));
-extern void xtensa_extend_reg PARAMS ((rtx, rtx));
-extern int branch_operator PARAMS ((rtx, enum machine_mode));
-extern int ubranch_operator PARAMS ((rtx, enum machine_mode));
-extern int boolean_operator PARAMS ((rtx, enum machine_mode));
-extern void xtensa_expand_conditional_branch PARAMS ((rtx *, enum rtx_code));
-extern int xtensa_expand_conditional_move PARAMS ((rtx *, int));
-extern int xtensa_expand_scc PARAMS ((rtx *));
-extern int xtensa_expand_block_move PARAMS ((rtx *));
-extern void xtensa_split_operand_pair PARAMS ((rtx *, enum machine_mode));
-extern int xtensa_emit_move_sequence PARAMS ((rtx *, enum machine_mode));
-extern bool xtensa_copy_incoming_a7 PARAMS ((rtx *, enum machine_mode));
-extern void xtensa_emit_block_move PARAMS ((rtx *, rtx *, int));
-extern void xtensa_expand_nonlocal_goto PARAMS ((rtx *));
-extern void xtensa_emit_loop_end PARAMS ((rtx, rtx *));
-extern char * xtensa_emit_call PARAMS ((int, rtx *));
+extern int xt_true_regnum (rtx);
+extern int add_operand (rtx, enum machine_mode);
+extern int arith_operand (rtx, enum machine_mode);
+extern int nonimmed_operand (rtx, enum machine_mode);
+extern int mem_operand (rtx, enum machine_mode);
+extern int xtensa_valid_move (enum machine_mode, rtx *);
+extern int mask_operand (rtx, enum machine_mode);
+extern int extui_fldsz_operand (rtx, enum machine_mode);
+extern int sext_operand (rtx, enum machine_mode);
+extern int sext_fldsz_operand (rtx, enum machine_mode);
+extern int lsbitnum_operand (rtx, enum machine_mode);
+extern int branch_operand (rtx, enum machine_mode);
+extern int ubranch_operand (rtx, enum machine_mode);
+extern int call_insn_operand (rtx, enum machine_mode);
+extern int move_operand (rtx, enum machine_mode);
+extern int smalloffset_mem_p (rtx);
+extern int constantpool_address_p (rtx);
+extern int constantpool_mem_p (rtx);
+extern int const_float_1_operand (rtx, enum machine_mode);
+extern int fpmem_offset_operand (rtx, enum machine_mode);
+extern void xtensa_extend_reg (rtx, rtx);
+extern int branch_operator (rtx, enum machine_mode);
+extern int ubranch_operator (rtx, enum machine_mode);
+extern int boolean_operator (rtx, enum machine_mode);
+extern void xtensa_expand_conditional_branch (rtx *, enum rtx_code);
+extern int xtensa_expand_conditional_move (rtx *, int);
+extern int xtensa_expand_scc (rtx *);
+extern int xtensa_expand_block_move (rtx *);
+extern void xtensa_split_operand_pair (rtx *, enum machine_mode);
+extern int xtensa_emit_move_sequence (rtx *, enum machine_mode);
+extern bool xtensa_copy_incoming_a7 (rtx *, enum machine_mode);
+extern void xtensa_emit_block_move (rtx *, rtx *, int);
+extern void xtensa_expand_nonlocal_goto (rtx *);
+extern void xtensa_emit_loop_end (rtx, rtx *);
+extern char *xtensa_emit_call (int, rtx *);
#ifdef TREE_CODE
-extern void init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, rtx));
-extern void xtensa_va_start PARAMS ((tree, rtx));
-extern rtx xtensa_va_arg PARAMS ((tree, tree));
+extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx);
+extern void xtensa_va_start (tree, rtx);
+extern rtx xtensa_va_arg (tree, tree);
#endif /* TREE_CODE */
-extern void print_operand PARAMS ((FILE *, rtx, int));
-extern void print_operand_address PARAMS ((FILE *, rtx));
-extern void xtensa_output_literal
- PARAMS ((FILE *, rtx, enum machine_mode, int labelno));
-extern rtx xtensa_return_addr PARAMS ((int, rtx));
-extern rtx xtensa_builtin_saveregs PARAMS ((void));
-extern enum reg_class xtensa_preferred_reload_class
- PARAMS ((rtx, enum reg_class, int));
-extern enum reg_class xtensa_secondary_reload_class
- PARAMS ((enum reg_class, enum machine_mode, rtx, int));
-extern int a7_overlap_mentioned_p PARAMS ((rtx x));
+extern void print_operand (FILE *, rtx, int);
+extern void print_operand_address (FILE *, rtx);
+extern void xtensa_output_literal (FILE *, rtx, enum machine_mode, int);
+extern rtx xtensa_return_addr (int, rtx);
+extern rtx xtensa_builtin_saveregs (void);
+extern enum reg_class xtensa_preferred_reload_class (rtx, enum reg_class, int);
+extern enum reg_class xtensa_secondary_reload_class (enum reg_class,
+ enum machine_mode, rtx,
+ int);
+extern int a7_overlap_mentioned_p (rtx);
#endif /* RTX_CODE */
#ifdef TREE_CODE
-extern void function_arg_advance
- PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree));
-extern struct rtx_def * function_arg
- PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int));
-extern tree xtensa_build_va_list PARAMS ((void));
+extern void function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, tree);
+extern struct rtx_def *function_arg (CUMULATIVE_ARGS *, enum machine_mode,
+ tree, int);
+extern tree xtensa_build_va_list (void);
#endif /* TREE_CODE */
-extern int xtensa_mask_immediate PARAMS ((int));
-extern int xtensa_mem_offset PARAMS ((unsigned, enum machine_mode));
-extern void xtensa_setup_frame_addresses PARAMS ((void));
-extern int xtensa_dbx_register_number PARAMS ((int));
-extern void override_options PARAMS ((void));
-extern long compute_frame_size PARAMS ((int));
-extern int xtensa_frame_pointer_required PARAMS ((void));
-extern void xtensa_expand_prologue PARAMS ((void));
-extern void order_regs_for_local_alloc PARAMS ((void));
+extern int xtensa_mask_immediate (int);
+extern int xtensa_mem_offset (unsigned, enum machine_mode);
+extern void xtensa_setup_frame_addresses (void);
+extern int xtensa_dbx_register_number (int);
+extern void override_options (void);
+extern long compute_frame_size (int);
+extern int xtensa_frame_pointer_required (void);
+extern void xtensa_expand_prologue (void);
+extern void order_regs_for_local_alloc (void);
#endif /* !__XTENSA_PROTOS_H__ */
arrays indexed by the test type, and not worry about the order
of EQ, NE, etc. */
-enum internal_test {
- ITEST_EQ,
- ITEST_NE,
- ITEST_GT,
- ITEST_GE,
- ITEST_LT,
- ITEST_LE,
- ITEST_GTU,
- ITEST_GEU,
- ITEST_LTU,
- ITEST_LEU,
- ITEST_MAX
- };
+enum internal_test
+{
+ ITEST_EQ,
+ ITEST_NE,
+ ITEST_GT,
+ ITEST_GE,
+ ITEST_LT,
+ ITEST_LE,
+ ITEST_GTU,
+ ITEST_GEU,
+ ITEST_LTU,
+ ITEST_LEU,
+ ITEST_MAX
+};
/* Cached operands, and operator to compare for use in set/branch on
condition codes. */
NO_REGS, NO_REGS, NO_REGS, NO_REGS,
};
-static int b4const_or_zero PARAMS ((int));
-static enum internal_test map_test_to_internal_test PARAMS ((enum rtx_code));
-static rtx gen_int_relational PARAMS ((enum rtx_code, rtx, rtx, int *));
-static rtx gen_float_relational PARAMS ((enum rtx_code, rtx, rtx));
-static rtx gen_conditional_move PARAMS ((rtx));
-static rtx fixup_subreg_mem PARAMS ((rtx x));
-static enum machine_mode xtensa_find_mode_for_size PARAMS ((unsigned));
-static struct machine_function * xtensa_init_machine_status PARAMS ((void));
-static void printx PARAMS ((FILE *, signed int));
-static void xtensa_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
-static unsigned int xtensa_multibss_section_type_flags
- PARAMS ((tree, const char *, int)) ATTRIBUTE_UNUSED;
-static void xtensa_select_rtx_section
- PARAMS ((enum machine_mode, rtx, unsigned HOST_WIDE_INT));
-static bool xtensa_rtx_costs PARAMS ((rtx, int, int, int *));
+static int b4const_or_zero (int);
+static enum internal_test map_test_to_internal_test (enum rtx_code);
+static rtx gen_int_relational (enum rtx_code, rtx, rtx, int *);
+static rtx gen_float_relational (enum rtx_code, rtx, rtx);
+static rtx gen_conditional_move (rtx);
+static rtx fixup_subreg_mem (rtx);
+static enum machine_mode xtensa_find_mode_for_size (unsigned);
+static struct machine_function * xtensa_init_machine_status (void);
+static void printx (FILE *, signed int);
+static void xtensa_function_epilogue (FILE *, HOST_WIDE_INT);
+static unsigned int xtensa_multibss_section_type_flags (tree, const char *,
+ int) ATTRIBUTE_UNUSED;
+static void xtensa_select_rtx_section (enum machine_mode, rtx,
+ unsigned HOST_WIDE_INT);
+static bool xtensa_rtx_costs (rtx, int, int, int *);
static int current_function_arg_words;
static const int reg_nonleaf_alloc_order[FIRST_PSEUDO_REGISTER] =
*/
int
-xtensa_b4constu (v)
- int v;
+xtensa_b4constu (int v)
{
switch (v)
{
}
int
-xtensa_simm8x256 (v)
- int v;
+xtensa_simm8x256 (int v)
{
return (v & 255) == 0 && (v >= -32768 && v <= 32512);
}
int
-xtensa_ai4const (v)
- int v;
+xtensa_ai4const (int v)
{
return (v == -1 || (v >= 1 && v <= 15));
}
int
-xtensa_simm7 (v)
- int v;
+xtensa_simm7 (int v)
{
return v >= -32 && v <= 95;
}
int
-xtensa_b4const (v)
- int v;
+xtensa_b4const (int v)
{
switch (v)
{
}
int
-xtensa_simm8 (v)
- int v;
+xtensa_simm8 (int v)
{
return v >= -128 && v <= 127;
}
int
-xtensa_tp7 (v)
- int v;
+xtensa_tp7 (int v)
{
return (v >= 7 && v <= 22);
}
int
-xtensa_lsi4x4 (v)
- int v;
+xtensa_lsi4x4 (int v)
{
return (v & 3) == 0 && (v >= 0 && v <= 60);
}
int
-xtensa_simm12b (v)
- int v;
+xtensa_simm12b (int v)
{
return v >= -2048 && v <= 2047;
}
int
-xtensa_uimm8 (v)
- int v;
+xtensa_uimm8 (int v)
{
return v >= 0 && v <= 255;
}
int
-xtensa_uimm8x2 (v)
- int v;
+xtensa_uimm8x2 (int v)
{
return (v & 1) == 0 && (v >= 0 && v <= 510);
}
int
-xtensa_uimm8x4 (v)
- int v;
+xtensa_uimm8x4 (int v)
{
return (v & 3) == 0 && (v >= 0 && v <= 1020);
}
works even when reg_renumber is not initialized. */
int
-xt_true_regnum (x)
- rtx x;
+xt_true_regnum (rtx x)
{
if (GET_CODE (x) == REG)
{
int
-add_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+add_operand (rtx op, enum machine_mode mode)
{
if (GET_CODE (op) == CONST_INT)
return (xtensa_simm8 (INTVAL (op)) || xtensa_simm8x256 (INTVAL (op)));
int
-arith_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+arith_operand (rtx op, enum machine_mode mode)
{
if (GET_CODE (op) == CONST_INT)
return xtensa_simm8 (INTVAL (op));
int
-nonimmed_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+nonimmed_operand (rtx op, enum machine_mode mode)
{
/* We cannot use the standard nonimmediate_operand() predicate because
it includes constant pool memory operands. */
int
-mem_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+mem_operand (rtx op, enum machine_mode mode)
{
/* We cannot use the standard memory_operand() predicate because
it includes constant pool memory operands. */
int
-xtensa_valid_move (mode, operands)
- enum machine_mode mode;
- rtx *operands;
+xtensa_valid_move (enum machine_mode mode, rtx *operands)
{
/* Either the destination or source must be a register, and the
MAC16 accumulator doesn't count. */
int
-mask_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+mask_operand (rtx op, enum machine_mode mode)
{
if (GET_CODE (op) == CONST_INT)
return xtensa_mask_immediate (INTVAL (op));
int
-extui_fldsz_operand (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+extui_fldsz_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
return ((GET_CODE (op) == CONST_INT)
&& xtensa_mask_immediate ((1 << INTVAL (op)) - 1));
int
-sext_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+sext_operand (rtx op, enum machine_mode mode)
{
if (TARGET_SEXT)
return nonimmed_operand (op, mode);
int
-sext_fldsz_operand (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+sext_fldsz_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
return ((GET_CODE (op) == CONST_INT) && xtensa_tp7 (INTVAL (op) - 1));
}
int
-lsbitnum_operand (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+lsbitnum_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
if (GET_CODE (op) == CONST_INT)
{
static int
-b4const_or_zero (v)
- int v;
+b4const_or_zero (int v)
{
if (v == 0)
return TRUE;
int
-branch_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+branch_operand (rtx op, enum machine_mode mode)
{
if (GET_CODE (op) == CONST_INT)
return b4const_or_zero (INTVAL (op));
int
-ubranch_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+ubranch_operand (rtx op, enum machine_mode mode)
{
if (GET_CODE (op) == CONST_INT)
return xtensa_b4constu (INTVAL (op));
int
-call_insn_operand (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+call_insn_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
if ((GET_CODE (op) == REG)
&& (op != arg_pointer_rtx)
int
-move_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+move_operand (rtx op, enum machine_mode mode)
{
if (register_operand (op, mode)
|| memory_operand (op, mode))
int
-smalloffset_mem_p (op)
- rtx op;
+smalloffset_mem_p (rtx op)
{
if (GET_CODE (op) == MEM)
{
int
-constantpool_address_p (addr)
- rtx addr;
+constantpool_address_p (rtx addr)
{
rtx sym = addr;
int
-constantpool_mem_p (op)
- rtx op;
+constantpool_mem_p (rtx op)
{
if (GET_CODE (op) == MEM)
return constantpool_address_p (XEXP (op, 0));
/* Accept the floating point constant 1 in the appropriate mode. */
int
-const_float_1_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+const_float_1_operand (rtx op, enum machine_mode mode)
{
REAL_VALUE_TYPE d;
static REAL_VALUE_TYPE onedf;
int
-fpmem_offset_operand (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+fpmem_offset_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
if (GET_CODE (op) == CONST_INT)
return xtensa_mem_offset (INTVAL (op), SFmode);
void
-xtensa_extend_reg (dst, src)
- rtx dst;
- rtx src;
+xtensa_extend_reg (rtx dst, rtx src)
{
rtx temp = gen_reg_rtx (SImode);
rtx shift = GEN_INT (BITS_PER_WORD - GET_MODE_BITSIZE (GET_MODE (src)));
int
-branch_operator (x, mode)
- rtx x;
- enum machine_mode mode;
+branch_operator (rtx x, enum machine_mode mode)
{
if (GET_MODE (x) != mode)
return FALSE;
int
-ubranch_operator (x, mode)
- rtx x;
- enum machine_mode mode;
+ubranch_operator (rtx x, enum machine_mode mode)
{
if (GET_MODE (x) != mode)
return FALSE;
int
-boolean_operator (x, mode)
- rtx x;
- enum machine_mode mode;
+boolean_operator (rtx x, enum machine_mode mode)
{
if (GET_MODE (x) != mode)
return FALSE;
int
-xtensa_mask_immediate (v)
- int v;
+xtensa_mask_immediate (int v)
{
#define MAX_MASK_SIZE 16
int mask_size;
int
-xtensa_mem_offset (v, mode)
- unsigned v;
- enum machine_mode mode;
+xtensa_mem_offset (unsigned v, enum machine_mode mode)
{
switch (mode)
{
}
-/* Make normal rtx_code into something we can index from an array */
+/* Make normal rtx_code into something we can index from an array. */
static enum internal_test
-map_test_to_internal_test (test_code)
- enum rtx_code test_code;
+map_test_to_internal_test (enum rtx_code test_code)
{
enum internal_test test = ITEST_MAX;
the comparison expression. */
static rtx
-gen_int_relational (test_code, cmp0, cmp1, p_invert)
- enum rtx_code test_code; /* relational test (EQ, etc) */
- rtx cmp0; /* first operand to compare */
- rtx cmp1; /* second operand to compare */
- int *p_invert; /* whether branch needs to reverse its test */
+gen_int_relational (enum rtx_code test_code, /* relational test (EQ, etc) */
+ rtx cmp0, /* first operand to compare */
+ rtx cmp1, /* second operand to compare */
+ int *p_invert /* whether branch needs to reverse test */)
{
- struct cmp_info {
+ struct cmp_info
+ {
enum rtx_code test_code; /* test code to use in insn */
- int (*const_range_p) PARAMS ((int)); /* predicate function to check range */
+ int (*const_range_p) (int); /* predicate function to check range */
int const_add; /* constant to add (convert LE -> LT) */
int reverse_regs; /* reverse registers in test */
int invert_const; /* != 0 if invert value if cmp1 is constant */
the comparison expression. */
static rtx
-gen_float_relational (test_code, cmp0, cmp1)
- enum rtx_code test_code; /* relational test (EQ, etc) */
- rtx cmp0; /* first operand to compare */
- rtx cmp1; /* second operand to compare */
+gen_float_relational (enum rtx_code test_code, /* relational test (EQ, etc) */
+ rtx cmp0, /* first operand to compare */
+ rtx cmp1 /* second operand to compare */)
{
- rtx (*gen_fn) PARAMS ((rtx, rtx, rtx));
+ rtx (*gen_fn) (rtx, rtx, rtx);
rtx brtmp;
int reverse_regs, invert;
void
-xtensa_expand_conditional_branch (operands, test_code)
- rtx *operands;
- enum rtx_code test_code;
+xtensa_expand_conditional_branch (rtx *operands, enum rtx_code test_code)
{
enum cmp_type type = branch_type;
rtx cmp0 = branch_cmp[0];
static rtx
-gen_conditional_move (cmp)
- rtx cmp;
+gen_conditional_move (rtx cmp)
{
enum rtx_code code = GET_CODE (cmp);
rtx op0 = branch_cmp[0];
int
-xtensa_expand_conditional_move (operands, isflt)
- rtx *operands;
- int isflt;
+xtensa_expand_conditional_move (rtx *operands, int isflt)
{
rtx cmp;
- rtx (*gen_fn) PARAMS ((rtx, rtx, rtx, rtx, rtx));
+ rtx (*gen_fn) (rtx, rtx, rtx, rtx, rtx);
if (!(cmp = gen_conditional_move (operands[1])))
return 0;
int
-xtensa_expand_scc (operands)
- rtx *operands;
+xtensa_expand_scc (rtx *operands)
{
rtx dest = operands[0];
rtx cmp = operands[1];
rtx one_tmp, zero_tmp;
- rtx (*gen_fn) PARAMS ((rtx, rtx, rtx, rtx, rtx));
+ rtx (*gen_fn) (rtx, rtx, rtx, rtx, rtx);
if (!(cmp = gen_conditional_move (cmp)))
return 0;
for the output, i.e., the input operands are twice as big as MODE. */
void
-xtensa_split_operand_pair (operands, mode)
- rtx operands[4];
- enum machine_mode mode;
+xtensa_split_operand_pair (rtx operands[4], enum machine_mode mode)
{
switch (GET_CODE (operands[1]))
{
normally. */
int
-xtensa_emit_move_sequence (operands, mode)
- rtx *operands;
- enum machine_mode mode;
+xtensa_emit_move_sequence (rtx *operands, enum machine_mode mode)
{
if (CONSTANT_P (operands[1])
&& GET_CODE (operands[1]) != CONSTANT_P_RTX
static rtx
-fixup_subreg_mem (x)
- rtx x;
+fixup_subreg_mem (rtx x)
{
if (GET_CODE (x) == SUBREG
&& GET_CODE (SUBREG_REG (x)) == REG
the scheduler away, we should avoid any problems. */
bool
-xtensa_copy_incoming_a7 (operands, mode)
- rtx *operands;
- enum machine_mode mode;
+xtensa_copy_incoming_a7 (rtx *operands, enum machine_mode mode)
{
if (a7_overlap_mentioned_p (operands[1])
&& !cfun->machine->incoming_a7_copied)
operands[3] is the alignment */
int
-xtensa_expand_block_move (operands)
- rtx *operands;
+xtensa_expand_block_move (rtx *operands)
{
rtx dest = operands[0];
rtx src = operands[1];
temporary registers, store those N values, and repeat until the
complete block has been moved. N=delay_slots+1 */
-struct meminsnbuf {
+struct meminsnbuf
+{
char template[30];
rtx operands[2];
};
void
-xtensa_emit_block_move (operands, tmpregs, delay_slots)
- rtx *operands;
- rtx *tmpregs;
- int delay_slots;
+xtensa_emit_block_move (rtx *operands, rtx *tmpregs, int delay_slots)
{
rtx dest = operands[0];
rtx src = operands[1];
static enum machine_mode
-xtensa_find_mode_for_size (item_size)
- unsigned item_size;
+xtensa_find_mode_for_size (unsigned item_size)
{
enum machine_mode mode, tmode;
void
-xtensa_expand_nonlocal_goto (operands)
- rtx *operands;
+xtensa_expand_nonlocal_goto (rtx *operands)
{
rtx goto_handler = operands[1];
rtx containing_fp = operands[3];
static struct machine_function *
-xtensa_init_machine_status ()
+xtensa_init_machine_status (void)
{
return ggc_alloc_cleared (sizeof (struct machine_function));
}
void
-xtensa_setup_frame_addresses ()
+xtensa_setup_frame_addresses (void)
{
/* Set flag to cause FRAME_POINTER_REQUIRED to be set. */
cfun->machine->accesses_prev_frame = 1;
when the branch is taken. */
void
-xtensa_emit_loop_end (insn, operands)
- rtx insn;
- rtx *operands;
+xtensa_emit_loop_end (rtx insn, rtx *operands)
{
char done = 0;
char *
-xtensa_emit_call (callop, operands)
- int callop;
- rtx *operands;
+xtensa_emit_call (int callop, rtx *operands)
{
static char result[64];
rtx tgt = operands[callop];
/* Return the stabs register number to use for 'regno'. */
int
-xtensa_dbx_register_number (regno)
- int regno;
+xtensa_dbx_register_number (int regno)
{
int first = -1;
/* Initialize CUMULATIVE_ARGS for a function. */
void
-init_cumulative_args (cum, fntype, libname)
- CUMULATIVE_ARGS *cum; /* argument info to initialize */
- tree fntype ATTRIBUTE_UNUSED; /* tree ptr for function decl */
- rtx libname ATTRIBUTE_UNUSED; /* SYMBOL_REF of library name or 0 */
+init_cumulative_args (CUMULATIVE_ARGS *cum,
+ tree fntype ATTRIBUTE_UNUSED,
+ rtx libname ATTRIBUTE_UNUSED)
{
cum->arg_words = 0;
}
+
/* Advance the argument to the next argument position. */
void
-function_arg_advance (cum, mode, type)
- CUMULATIVE_ARGS *cum; /* current arg information */
- enum machine_mode mode; /* current arg mode */
- tree type; /* type of the argument or 0 if lib support */
+function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type)
{
int words, max;
int *arg_words;
/* Return an RTL expression containing the register for the given mode,
- or 0 if the argument is to be passed on the stack. */
+ or 0 if the argument is to be passed on the stack. INCOMING_P is non-zero
+ if this is an incoming argument to the current function. */
rtx
-function_arg (cum, mode, type, incoming_p)
- CUMULATIVE_ARGS *cum; /* current arg information */
- enum machine_mode mode; /* current arg mode */
- tree type; /* type of the argument or 0 if lib support */
- int incoming_p; /* computing the incoming registers? */
+function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
+ int incoming_p)
{
int regbase, words, max;
int *arg_words;
void
-override_options ()
+override_options (void)
{
int regno;
enum machine_mode mode;
*/
static void
-printx (file, val)
- FILE *file;
- signed int val;
+printx (FILE *file, signed int val)
{
- /* print a hexadecimal value in a nice way */
+ /* Print a hexadecimal value in a nice way. */
if ((val > -0xa) && (val < 0xa))
fprintf (file, "%d", val);
else if (val < 0)
void
-print_operand (file, x, letter)
- FILE *file; /* file to write to */
- rtx x; /* operand to print */
- int letter; /* %<letter> or 0 */
+print_operand (FILE *file, rtx x, int letter)
{
if (!x)
error ("PRINT_OPERAND null pointer");
reference whose address is ADDR. ADDR is an RTL expression. */
void
-print_operand_address (file, addr)
- FILE *file;
- rtx addr;
+print_operand_address (FILE *file, rtx addr)
{
if (!addr)
error ("PRINT_OPERAND_ADDRESS, null pointer");
void
-xtensa_output_literal (file, x, mode, labelno)
- FILE *file;
- rtx x;
- enum machine_mode mode;
- int labelno;
+xtensa_output_literal (FILE *file, rtx x, enum machine_mode mode, int labelno)
{
long value_long[2];
REAL_VALUE_TYPE r;
#define XTENSA_STACK_ALIGN(LOC) (((LOC) + STACK_BYTES-1) & ~(STACK_BYTES-1))
long
-compute_frame_size (size)
- int size; /* # of var. bytes allocated */
+compute_frame_size (int size)
{
- /* add space for the incoming static chain value */
+ /* Add space for the incoming static chain value. */
if (current_function_needs_context)
size += (1 * UNITS_PER_WORD);
int
-xtensa_frame_pointer_required ()
+xtensa_frame_pointer_required (void)
{
/* The code to expand builtin_frame_addr and builtin_return_addr
currently uses the hard_frame_pointer instead of frame_pointer.
void
-xtensa_expand_prologue ()
+xtensa_expand_prologue (void)
{
HOST_WIDE_INT total_size;
rtx size_rtx;
/* Clear variables at function end. */
void
-xtensa_function_epilogue (file, size)
- FILE *file ATTRIBUTE_UNUSED;
- HOST_WIDE_INT size ATTRIBUTE_UNUSED;
+xtensa_function_epilogue (FILE *file ATTRIBUTE_UNUSED,
+ HOST_WIDE_INT size ATTRIBUTE_UNUSED)
{
xtensa_current_frame_size = 0;
}
rtx
-xtensa_return_addr (count, frame)
- int count;
- rtx frame;
+xtensa_return_addr (int count, rtx frame)
{
rtx result, retaddr;
argument word N for N >= 6. */
tree
-xtensa_build_va_list ()
+xtensa_build_va_list (void)
{
tree f_stk, f_reg, f_ndx, record, type_decl;
address of the saved registers. */
rtx
-xtensa_builtin_saveregs ()
+xtensa_builtin_saveregs (void)
{
rtx gp_regs, dest;
int arg_words = current_function_arg_words;
current function to fill in an initial va_list. */
void
-xtensa_va_start (valist, nextarg)
- tree valist;
- rtx nextarg ATTRIBUTE_UNUSED;
+xtensa_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED)
{
tree f_stk, stk;
tree f_reg, reg;
/* Implement `va_arg'. */
rtx
-xtensa_va_arg (valist, type)
- tree valist, type;
+xtensa_va_arg (tree valist, tree type)
{
tree f_stk, stk;
tree f_reg, reg;
/* First align __va_ndx to a double word boundary if necessary for this arg:
if (__alignof__ (TYPE) > 4)
- (AP).__va_ndx = (((AP).__va_ndx + 7) & -8)
- */
+ (AP).__va_ndx = (((AP).__va_ndx + 7) & -8); */
if (TYPE_ALIGN (type) > BITS_PER_WORD)
{
/* Increment __va_ndx to point past the argument:
orig_ndx = (AP).__va_ndx;
- (AP).__va_ndx += __va_size (TYPE);
- */
+ (AP).__va_ndx += __va_size (TYPE); */
orig_ndx = gen_reg_rtx (SImode);
r = expand_expr (ndx, orig_ndx, SImode, EXPAND_NORMAL);
if ((AP).__va_ndx <= __MAX_ARGS_IN_REGISTERS * 4
&& !MUST_PASS_IN_STACK (type))
- __array = (AP).__va_reg;
- */
+ __array = (AP).__va_reg; */
array = gen_reg_rtx (Pmode);
if (orig_ndx < __MAX_ARGS_IN_REGISTERS * 4)
(AP).__va_ndx = __MAX_ARGS_IN_REGISTERS * 4 + __va_size (TYPE);
__array = (AP).__va_stk;
- }
- */
+ } */
lab_false2 = gen_label_rtx ();
emit_cmp_and_jump_insns (orig_ndx,
: __va_size (TYPE))
The results are endian-dependent because values smaller than one word
- are aligned differently.
- */
+ are aligned differently. */
size = gen_reg_rtx (SImode);
emit_move_insn (size, va_size);
enum reg_class
-xtensa_preferred_reload_class (x, class, isoutput)
- rtx x;
- enum reg_class class;
- int isoutput;
+xtensa_preferred_reload_class (rtx x, enum reg_class class, int isoutput)
{
if (!isoutput && CONSTANT_P (x) && GET_CODE (x) == CONST_DOUBLE)
return NO_REGS;
enum reg_class
-xtensa_secondary_reload_class (class, mode, x, isoutput)
- enum reg_class class;
- enum machine_mode mode ATTRIBUTE_UNUSED;
- rtx x;
- int isoutput;
+xtensa_secondary_reload_class (enum reg_class class,
+ enum machine_mode mode ATTRIBUTE_UNUSED,
+ rtx x, int isoutput)
{
int regno;
void
-order_regs_for_local_alloc ()
+order_regs_for_local_alloc (void)
{
if (!leaf_function_p ())
{
references to a7 (as opposed to hard_frame_pointer_rtx). */
int
-a7_overlap_mentioned_p (x)
- rtx x;
+a7_overlap_mentioned_p (rtx x)
{
int i, j;
unsigned int x_regno;
name ends with ".bss", add SECTION_BSS to the flags. */
static unsigned int
-xtensa_multibss_section_type_flags (decl, name, reloc)
- tree decl;
- const char *name;
- int reloc;
+xtensa_multibss_section_type_flags (tree decl, const char *name, int reloc)
{
unsigned int flags = default_section_type_flags (decl, name, reloc);
const char *suffix;
/* The literal pool stays with the function. */
static void
-xtensa_select_rtx_section (mode, x, align)
- enum machine_mode mode ATTRIBUTE_UNUSED;
- rtx x ATTRIBUTE_UNUSED;
- unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED;
+xtensa_select_rtx_section (enum machine_mode mode ATTRIBUTE_UNUSED,
+ rtx x ATTRIBUTE_UNUSED,
+ unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED)
{
function_section (current_function_decl);
}
+
/* Compute a (partial) cost for rtx X. Return true if the complete
cost has been computed, and false if subexpressions should be
scanned. In either case, *TOTAL contains the cost result. */
static bool
-xtensa_rtx_costs (x, code, outer_code, total)
- rtx x;
- int code, outer_code;
- int *total;
+xtensa_rtx_costs (rtx x, int code, int outer_code, int *total)
{
switch (code)
{