sparc-protos.h: Don't use the PARAMS macro.

* config/sparc/sparc-protos.h: Don't use the PARAMS macro.
	* config/sparc/sparc.c: Likewise.

From-SVN: r70509
This commit is contained in:
Kaveh R. Ghazi 2003-08-16 22:13:39 +00:00 committed by Kaveh Ghazi
parent ae7a543957
commit e80d5f8061
3 changed files with 142 additions and 152 deletions

View File

@ -1,3 +1,8 @@
2003-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* config/sparc/sparc-protos.h: Don't use the PARAMS macro.
* config/sparc/sparc.c: Likewise.
2003-08-16 Nathan Sidwell <nathan@codesourcery.com>
PR c++/11512

View File

@ -27,99 +27,95 @@ Boston, MA 02111-1307, USA. */
extern bool sparc_emitting_epilogue;
#ifdef TREE_CODE
extern struct rtx_def *function_value PARAMS ((tree, enum machine_mode, int));
extern void function_arg_advance PARAMS ((CUMULATIVE_ARGS *,
enum machine_mode, tree, int));
extern struct rtx_def *function_arg PARAMS ((const CUMULATIVE_ARGS *,
enum machine_mode,
tree, int, int));
extern int function_arg_partial_nregs PARAMS ((const CUMULATIVE_ARGS *,
enum machine_mode,
tree, int));
extern int function_arg_pass_by_reference PARAMS ((const CUMULATIVE_ARGS *,
enum machine_mode,
tree, int));
extern struct rtx_def *sparc_builtin_saveregs PARAMS ((void));
extern struct rtx_def *function_value (tree, enum machine_mode, int);
extern void function_arg_advance (CUMULATIVE_ARGS *,
enum machine_mode, tree, int);
extern struct rtx_def *function_arg (const CUMULATIVE_ARGS *,
enum machine_mode, tree, int, int);
extern int function_arg_partial_nregs (const CUMULATIVE_ARGS *,
enum machine_mode, tree, int);
extern int function_arg_pass_by_reference (const CUMULATIVE_ARGS *,
enum machine_mode, tree, int);
extern struct rtx_def *sparc_builtin_saveregs (void);
#ifdef RTX_CODE
extern void init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, rtx, tree));
extern void sparc_va_start PARAMS ((tree, rtx));
extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree);
extern void sparc_va_start (tree, rtx);
#endif
extern struct rtx_def *sparc_va_arg PARAMS ((tree, tree));
extern unsigned long sparc_type_code PARAMS ((tree));
extern struct rtx_def *sparc_va_arg (tree, tree);
extern unsigned long sparc_type_code (tree);
#ifdef ARGS_SIZE_RTX
/* expr.h defines ARGS_SIZE_RTX and `enum direction' */
extern enum direction function_arg_padding PARAMS ((enum machine_mode, tree));
extern enum direction function_arg_padding (enum machine_mode, tree);
#endif /* ARGS_SIZE_RTX */
#endif /* TREE_CODE */
extern void load_pic_register PARAMS ((void));
extern void order_regs_for_local_alloc PARAMS ((void));
extern int compute_frame_size PARAMS ((int, int));
extern int check_pic PARAMS ((int));
extern int short_branch PARAMS ((int, int));
extern int sparc_flat_epilogue_delay_slots PARAMS ((void));
extern unsigned long sparc_flat_compute_frame_size PARAMS ((int));
extern void sparc_profile_hook PARAMS ((int));
extern void sparc_override_options PARAMS ((void));
extern int leaf_return_peephole_ok PARAMS ((void));
extern void sparc_output_scratch_registers PARAMS ((FILE *));
extern void sparc_flat_save_restore PARAMS ((FILE *, const char *,
unsigned int, unsigned long,
unsigned long, const char *,
const char *, unsigned long));
extern void load_pic_register (void);
extern void order_regs_for_local_alloc (void);
extern int compute_frame_size (int, int);
extern int check_pic (int);
extern int short_branch (int, int);
extern int sparc_flat_epilogue_delay_slots (void);
extern unsigned long sparc_flat_compute_frame_size (int);
extern void sparc_profile_hook (int);
extern void sparc_override_options (void);
extern int leaf_return_peephole_ok (void);
extern void sparc_output_scratch_registers (FILE *);
extern void sparc_flat_save_restore (FILE *, const char *,
unsigned int, unsigned long,
unsigned long, const char *,
const char *, unsigned long);
#ifdef RTX_CODE
extern enum machine_mode select_cc_mode PARAMS ((enum rtx_code, rtx, rtx));
extern enum machine_mode select_cc_mode (enum rtx_code, rtx, rtx);
/* Define the function that build the compare insn for scc and bcc. */
extern rtx gen_compare_reg PARAMS ((enum rtx_code code, rtx, rtx));
extern void sparc_emit_float_lib_cmp PARAMS ((rtx, rtx, enum rtx_code));
extern void sparc_emit_floatunsdi PARAMS ((rtx [2]));
extern void emit_tfmode_binop PARAMS ((enum rtx_code, rtx *));
extern void emit_tfmode_unop PARAMS ((enum rtx_code, rtx *));
extern void emit_tfmode_cvt PARAMS ((enum rtx_code, rtx *));
extern rtx gen_compare_reg (enum rtx_code code, rtx, rtx);
extern void sparc_emit_float_lib_cmp (rtx, rtx, enum rtx_code);
extern void sparc_emit_floatunsdi (rtx [2]);
extern void emit_tfmode_binop (enum rtx_code, rtx *);
extern void emit_tfmode_unop (enum rtx_code, rtx *);
extern void emit_tfmode_cvt (enum rtx_code, rtx *);
/* This function handles all v9 scc insns */
extern int gen_v9_scc PARAMS ((enum rtx_code, rtx *));
extern void sparc_initialize_trampoline PARAMS ((rtx, rtx, rtx));
extern void sparc64_initialize_trampoline PARAMS ((rtx, rtx, rtx));
extern rtx legitimize_pic_address PARAMS ((rtx, enum machine_mode, rtx));
extern void sparc_defer_case_vector PARAMS ((rtx, rtx, int));
extern void sparc_emit_set_const32 PARAMS ((rtx, rtx));
extern void sparc_emit_set_const64 PARAMS ((rtx, rtx));
extern void sparc_emit_set_symbolic_const64 PARAMS ((rtx, rtx, rtx));
extern int sparc_splitdi_legitimate PARAMS ((rtx, rtx));
extern int sparc_absnegfloat_split_legitimate PARAMS ((rtx, rtx));
extern char *output_cbranch PARAMS ((rtx, rtx, int, int, int, int, rtx));
extern const char *output_sibcall PARAMS ((rtx, rtx));
extern char *output_v9branch PARAMS ((rtx, rtx, int, int, int, int, int,
rtx));
extern void emit_v9_brxx_insn PARAMS ((enum rtx_code, rtx, rtx));
extern void print_operand PARAMS ((FILE *, rtx, int));
extern int mems_ok_for_ldd_peep PARAMS ((rtx, rtx, rtx));
extern int arith_double_4096_operand PARAMS ((rtx, enum machine_mode));
extern int arith_4096_operand PARAMS ((rtx, enum machine_mode));
extern int zero_operand PARAMS ((rtx, enum machine_mode));
extern int fp_zero_operand PARAMS ((rtx, enum machine_mode));
extern int reg_or_0_operand PARAMS ((rtx, enum machine_mode));
extern int empty_delay_slot PARAMS ((rtx));
extern int eligible_for_epilogue_delay PARAMS ((rtx, int));
extern int eligible_for_sibcall_delay PARAMS ((rtx));
extern int emit_move_sequence PARAMS ((rtx, enum machine_mode));
extern int fp_sethi_p PARAMS ((rtx));
extern int fp_mov_p PARAMS ((rtx));
extern int fp_high_losum_p PARAMS ((rtx));
extern int mem_min_alignment PARAMS ((rtx, int));
extern int pic_address_needs_scratch PARAMS ((rtx));
extern int reg_unused_after PARAMS ((rtx, rtx));
extern int register_ok_for_ldd PARAMS ((rtx));
extern int registers_ok_for_ldd_peep PARAMS ((rtx, rtx));
extern int sparc_flat_eligible_for_epilogue_delay PARAMS ((rtx, int));
extern int v9_regcmp_p PARAMS ((enum rtx_code));
extern char *sparc_v8plus_shift PARAMS ((rtx *, rtx, const char *));
extern int gen_v9_scc (enum rtx_code, rtx *);
extern void sparc_initialize_trampoline (rtx, rtx, rtx);
extern void sparc64_initialize_trampoline (rtx, rtx, rtx);
extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
extern void sparc_defer_case_vector (rtx, rtx, int);
extern void sparc_emit_set_const32 (rtx, rtx);
extern void sparc_emit_set_const64 (rtx, rtx);
extern void sparc_emit_set_symbolic_const64 (rtx, rtx, rtx);
extern int sparc_splitdi_legitimate (rtx, rtx);
extern int sparc_absnegfloat_split_legitimate (rtx, rtx);
extern char *output_cbranch (rtx, rtx, int, int, int, int, rtx);
extern const char *output_sibcall (rtx, rtx);
extern char *output_v9branch (rtx, rtx, int, int, int, int, int, rtx);
extern void emit_v9_brxx_insn (enum rtx_code, rtx, rtx);
extern void print_operand (FILE *, rtx, int);
extern int mems_ok_for_ldd_peep (rtx, rtx, rtx);
extern int arith_double_4096_operand (rtx, enum machine_mode);
extern int arith_4096_operand (rtx, enum machine_mode);
extern int zero_operand (rtx, enum machine_mode);
extern int fp_zero_operand (rtx, enum machine_mode);
extern int reg_or_0_operand (rtx, enum machine_mode);
extern int empty_delay_slot (rtx);
extern int eligible_for_epilogue_delay (rtx, int);
extern int eligible_for_sibcall_delay (rtx);
extern int emit_move_sequence (rtx, enum machine_mode);
extern int fp_sethi_p (rtx);
extern int fp_mov_p (rtx);
extern int fp_high_losum_p (rtx);
extern int mem_min_alignment (rtx, int);
extern int pic_address_needs_scratch (rtx);
extern int reg_unused_after (rtx, rtx);
extern int register_ok_for_ldd (rtx);
extern int registers_ok_for_ldd_peep (rtx, rtx);
extern int sparc_flat_eligible_for_epilogue_delay (rtx, int);
extern int v9_regcmp_p (enum rtx_code);
extern char *sparc_v8plus_shift (rtx *, rtx, const char *);
/* Function used for V8+ code generation. Returns 1 if the high
32 bits of REG are 0 before INSN. */
extern int sparc_check_64 PARAMS ((rtx, rtx));
extern rtx gen_df_reg PARAMS ((rtx, int));
extern int sparc_extra_constraint_check PARAMS ((rtx, int, int));
extern int sparc_check_64 (rtx, rtx);
extern rtx gen_df_reg (rtx, int);
extern int sparc_extra_constraint_check (rtx, int, int);
#endif /* RTX_CODE */
#endif /* __SPARC_PROTOS_H__ */

View File

@ -128,60 +128,55 @@ char sparc_leaf_regs[] =
static const char *frame_base_name;
static int frame_base_offset;
static void sparc_init_modes PARAMS ((void));
static int save_regs PARAMS ((FILE *, int, int, const char *,
int, int, int));
static int restore_regs PARAMS ((FILE *, int, int, const char *, int, int));
static void build_big_number PARAMS ((FILE *, int, const char *));
static int function_arg_slotno PARAMS ((const CUMULATIVE_ARGS *,
enum machine_mode, tree, int, int,
int *, int *));
static void sparc_init_modes (void);
static int save_regs (FILE *, int, int, const char *, int, int, int);
static int restore_regs (FILE *, int, int, const char *, int, int);
static void build_big_number (FILE *, int, const char *);
static int function_arg_slotno (const CUMULATIVE_ARGS *, enum machine_mode,
tree, int, int, int *, int *);
static int supersparc_adjust_cost PARAMS ((rtx, rtx, rtx, int));
static int hypersparc_adjust_cost PARAMS ((rtx, rtx, rtx, int));
static int supersparc_adjust_cost (rtx, rtx, rtx, int);
static int hypersparc_adjust_cost (rtx, rtx, rtx, int);
static void sparc_output_addr_vec PARAMS ((rtx));
static void sparc_output_addr_diff_vec PARAMS ((rtx));
static void sparc_output_deferred_case_vectors PARAMS ((void));
static int check_return_regs PARAMS ((rtx));
static int epilogue_renumber PARAMS ((rtx *, int));
static bool sparc_assemble_integer PARAMS ((rtx, unsigned int, int));
static int set_extends PARAMS ((rtx));
static void output_restore_regs PARAMS ((FILE *, int));
static void sparc_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
static void sparc_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
static void sparc_flat_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
static void sparc_flat_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
static void sparc_nonflat_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT,
int));
static void sparc_nonflat_function_prologue PARAMS ((FILE *, HOST_WIDE_INT,
int));
static void sparc_output_addr_vec (rtx);
static void sparc_output_addr_diff_vec (rtx);
static void sparc_output_deferred_case_vectors (void);
static int check_return_regs (rtx);
static int epilogue_renumber (rtx *, int);
static bool sparc_assemble_integer (rtx, unsigned int, int);
static int set_extends (rtx);
static void output_restore_regs (FILE *, int);
static void sparc_output_function_prologue (FILE *, HOST_WIDE_INT);
static void sparc_output_function_epilogue (FILE *, HOST_WIDE_INT);
static void sparc_flat_function_epilogue (FILE *, HOST_WIDE_INT);
static void sparc_flat_function_prologue (FILE *, HOST_WIDE_INT);
static void sparc_nonflat_function_epilogue (FILE *, HOST_WIDE_INT, int);
static void sparc_nonflat_function_prologue (FILE *, HOST_WIDE_INT, int);
#ifdef OBJECT_FORMAT_ELF
static void sparc_elf_asm_named_section PARAMS ((const char *, unsigned int));
static void sparc_elf_asm_named_section (const char *, unsigned int);
#endif
static void sparc_aout_select_section PARAMS ((tree, int,
unsigned HOST_WIDE_INT))
static void sparc_aout_select_section (tree, int, unsigned HOST_WIDE_INT)
ATTRIBUTE_UNUSED;
static void sparc_aout_select_rtx_section PARAMS ((enum machine_mode, rtx,
unsigned HOST_WIDE_INT))
static void sparc_aout_select_rtx_section (enum machine_mode, rtx,
unsigned HOST_WIDE_INT)
ATTRIBUTE_UNUSED;
static int sparc_adjust_cost PARAMS ((rtx, rtx, rtx, int));
static int sparc_issue_rate PARAMS ((void));
static void sparc_sched_init PARAMS ((FILE *, int, int));
static int sparc_use_dfa_pipeline_interface PARAMS ((void));
static int sparc_use_sched_lookahead PARAMS ((void));
static int sparc_adjust_cost (rtx, rtx, rtx, int);
static int sparc_issue_rate (void);
static void sparc_sched_init (FILE *, int, int);
static int sparc_use_dfa_pipeline_interface (void);
static int sparc_use_sched_lookahead (void);
static void emit_soft_tfmode_libcall PARAMS ((const char *, int, rtx *));
static void emit_soft_tfmode_binop PARAMS ((enum rtx_code, rtx *));
static void emit_soft_tfmode_unop PARAMS ((enum rtx_code, rtx *));
static void emit_soft_tfmode_cvt PARAMS ((enum rtx_code, rtx *));
static void emit_hard_tfmode_operation PARAMS ((enum rtx_code, rtx *));
static void emit_soft_tfmode_libcall (const char *, int, rtx *);
static void emit_soft_tfmode_binop (enum rtx_code, rtx *);
static void emit_soft_tfmode_unop (enum rtx_code, rtx *);
static void emit_soft_tfmode_cvt (enum rtx_code, rtx *);
static void emit_hard_tfmode_operation (enum rtx_code, rtx *);
static bool sparc_function_ok_for_sibcall PARAMS ((tree, tree));
static void sparc_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT,
HOST_WIDE_INT, tree));
static bool sparc_rtx_costs PARAMS ((rtx, int, int, int *));
static bool sparc_function_ok_for_sibcall (tree, tree);
static void sparc_output_mi_thunk (FILE *, tree, HOST_WIDE_INT,
HOST_WIDE_INT, tree);
static bool sparc_rtx_costs (rtx, int, int, int *);
/* Option handling. */
@ -1571,10 +1566,10 @@ sparc_emit_set_symbolic_const64 (op0, op1, temp1)
/* These avoid problems when cross compiling. If we do not
go through all this hair then the optimizer will see
invalid REG_EQUAL notes or in some cases none at all. */
static void sparc_emit_set_safe_HIGH64 PARAMS ((rtx, HOST_WIDE_INT));
static rtx gen_safe_SET64 PARAMS ((rtx, HOST_WIDE_INT));
static rtx gen_safe_OR64 PARAMS ((rtx, HOST_WIDE_INT));
static rtx gen_safe_XOR64 PARAMS ((rtx, HOST_WIDE_INT));
static void sparc_emit_set_safe_HIGH64 (rtx, HOST_WIDE_INT);
static rtx gen_safe_SET64 (rtx, HOST_WIDE_INT);
static rtx gen_safe_OR64 (rtx, HOST_WIDE_INT);
static rtx gen_safe_XOR64 (rtx, HOST_WIDE_INT);
#if HOST_BITS_PER_WIDE_INT == 64
#define GEN_HIGHINT64(__x) GEN_INT ((__x) & ~(HOST_WIDE_INT)0x3ff)
@ -1632,8 +1627,8 @@ gen_safe_XOR64 (src, val)
Without doing this, the optimizer cannot see such
opportunities. */
static void sparc_emit_set_const64_quick1
PARAMS ((rtx, rtx, unsigned HOST_WIDE_INT, int));
static void sparc_emit_set_const64_quick1 (rtx, rtx,
unsigned HOST_WIDE_INT, int);
static void
sparc_emit_set_const64_quick1 (op0, temp, low_bits, is_neg)
@ -1675,9 +1670,8 @@ sparc_emit_set_const64_quick1 (op0, temp, low_bits, is_neg)
}
}
static void sparc_emit_set_const64_quick2
PARAMS ((rtx, rtx, unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT, int));
static void sparc_emit_set_const64_quick2 (rtx, rtx, unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT, int);
static void
sparc_emit_set_const64_quick2 (op0, temp, high_bits, low_immediate, shift_count)
@ -1716,8 +1710,8 @@ sparc_emit_set_const64_quick2 (op0, temp, high_bits, low_immediate, shift_count)
gen_safe_OR64 (op0, low_immediate)));
}
static void sparc_emit_set_const64_longway
PARAMS ((rtx, rtx, unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT));
static void sparc_emit_set_const64_longway (rtx, rtx, unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT);
/* Full 64-bit constant decomposition. Even though this is the
'worst' case, we still optimize a few things away. */
@ -1824,10 +1818,9 @@ sparc_emit_set_const64_longway (op0, temp, high_bits, low_bits)
}
/* Analyze a 64-bit constant for certain properties. */
static void analyze_64bit_constant
PARAMS ((unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT,
int *, int *, int *));
static void analyze_64bit_constant (unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT,
int *, int *, int *);
static void
analyze_64bit_constant (high_bits, low_bits, hbsp, lbsp, abbasp)
@ -1893,8 +1886,7 @@ analyze_64bit_constant (high_bits, low_bits, hbsp, lbsp, abbasp)
*abbasp = all_bits_between_are_set;
}
static int const64_is_2insns
PARAMS ((unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT));
static int const64_is_2insns (unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT);
static int
const64_is_2insns (high_bits, low_bits)
@ -1921,9 +1913,9 @@ const64_is_2insns (high_bits, low_bits)
return 0;
}
static unsigned HOST_WIDE_INT create_simple_focus_bits
PARAMS ((unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT,
int, int));
static unsigned HOST_WIDE_INT create_simple_focus_bits (unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT,
int, int);
static unsigned HOST_WIDE_INT
create_simple_focus_bits (high_bits, low_bits, lowest_bit_set, shift)
@ -4549,15 +4541,12 @@ struct function_arg_record_value_parms
};
static void function_arg_record_value_3
PARAMS ((HOST_WIDE_INT, struct function_arg_record_value_parms *));
(HOST_WIDE_INT, struct function_arg_record_value_parms *);
static void function_arg_record_value_2
PARAMS ((tree, HOST_WIDE_INT,
struct function_arg_record_value_parms *));
(tree, HOST_WIDE_INT, struct function_arg_record_value_parms *);
static void function_arg_record_value_1
PARAMS ((tree, HOST_WIDE_INT,
struct function_arg_record_value_parms *));
static rtx function_arg_record_value
PARAMS ((tree, enum machine_mode, int, int, int));
(tree, HOST_WIDE_INT, struct function_arg_record_value_parms *);
static rtx function_arg_record_value (tree, enum machine_mode, int, int, int);
/* A subroutine of function_arg_record_value. Traverse the structure
recursively and determine how many registers will be required. */