1 /* Prototypes of target machine for GNU compiler, for Sun SPARC.
2 Copyright (C) 1999, 2000 Free Software Foundation, Inc.
3 Contributed by Michael Tiemann (tiemann@cygnus.com).
4 64 bit SPARC V9 support by Michael Tiemann, Jim Wilson, and Doug Evans,
7 This file is part of GNU CC.
9 GNU CC is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
14 GNU CC is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with GNU CC; see the file COPYING. If not, write to
21 the Free Software Foundation, 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. */
24 #ifndef __SPARC_PROTOS_H__
25 #define __SPARC_PROTOS_H__
27 extern bool sparc_emitting_epilogue
;
30 extern struct rtx_def
*function_value
PARAMS ((tree
, enum machine_mode
, int));
31 extern void function_arg_advance
PARAMS ((CUMULATIVE_ARGS
*,
32 enum machine_mode
, tree
, int));
33 extern struct rtx_def
*function_arg
PARAMS ((const CUMULATIVE_ARGS
*,
36 extern int function_arg_partial_nregs
PARAMS ((const CUMULATIVE_ARGS
*,
39 extern int function_arg_pass_by_reference
PARAMS ((const CUMULATIVE_ARGS
*,
42 extern struct rtx_def
*sparc_builtin_saveregs
PARAMS ((void));
44 extern void init_cumulative_args
PARAMS ((CUMULATIVE_ARGS
*, tree
, rtx
, int));
45 extern void sparc_va_start
PARAMS ((int, tree
, rtx
));
47 extern struct rtx_def
*sparc_va_arg
PARAMS ((tree
, tree
));
48 extern unsigned long sparc_type_code
PARAMS ((tree
));
50 /* expr.h defines ARGS_SIZE_RTX and `enum direction' */
51 extern enum direction function_arg_padding
PARAMS ((enum machine_mode
, tree
));
52 #endif /* ARGS_SIZE_RTX */
53 #endif /* TREE_CODE */
55 extern void load_pic_register
PARAMS ((void));
56 extern void order_regs_for_local_alloc
PARAMS ((void));
57 extern int compute_frame_size
PARAMS ((int, int));
58 extern int check_pic
PARAMS ((int));
59 extern int short_branch
PARAMS ((int, int));
60 extern int sparc_flat_epilogue_delay_slots
PARAMS ((void));
61 extern unsigned long sparc_flat_compute_frame_size
PARAMS ((int));
62 extern void sparc_profile_hook
PARAMS ((int));
63 extern void sparc_override_options
PARAMS ((void));
64 extern int leaf_return_peephole_ok
PARAMS ((void));
65 extern void sparc_output_scratch_registers
PARAMS ((FILE *));
66 extern void sparc_flat_save_restore
PARAMS ((FILE *, const char *,
67 unsigned int, unsigned long,
68 unsigned long, const char *,
69 const char *, unsigned long));
72 extern enum machine_mode select_cc_mode
PARAMS ((enum rtx_code
, rtx
, rtx
));
73 /* Define the function that build the compare insn for scc and bcc. */
74 extern rtx gen_compare_reg
PARAMS ((enum rtx_code code
, rtx
, rtx
));
75 extern void sparc_emit_float_lib_cmp
PARAMS ((rtx
, rtx
, enum rtx_code
));
76 extern void sparc_emit_floatunsdi
PARAMS ((rtx
[2]));
77 extern void emit_tfmode_binop
PARAMS ((enum rtx_code
, rtx
*));
78 extern void emit_tfmode_unop
PARAMS ((enum rtx_code
, rtx
*));
79 extern void emit_tfmode_cvt
PARAMS ((enum rtx_code
, rtx
*));
80 /* This function handles all v9 scc insns */
81 extern int gen_v9_scc
PARAMS ((enum rtx_code
, rtx
*));
82 extern void sparc_initialize_trampoline
PARAMS ((rtx
, rtx
, rtx
));
83 extern void sparc64_initialize_trampoline
PARAMS ((rtx
, rtx
, rtx
));
84 extern rtx legitimize_pic_address
PARAMS ((rtx
, enum machine_mode
, rtx
));
85 extern void sparc_defer_case_vector
PARAMS ((rtx
, rtx
, int));
86 extern void sparc_emit_set_const32
PARAMS ((rtx
, rtx
));
87 extern void sparc_emit_set_const64
PARAMS ((rtx
, rtx
));
88 extern void sparc_emit_set_symbolic_const64
PARAMS ((rtx
, rtx
, rtx
));
89 extern int sparc_splitdi_legitimate
PARAMS ((rtx
, rtx
));
90 extern int sparc_absnegfloat_split_legitimate
PARAMS ((rtx
, rtx
));
91 extern char *output_cbranch
PARAMS ((rtx
, rtx
, int, int, int, int, rtx
));
92 extern const char *output_sibcall
PARAMS ((rtx
, rtx
));
93 extern char *output_v9branch
PARAMS ((rtx
, rtx
, int, int, int, int, int,
95 extern void emit_v9_brxx_insn
PARAMS ((enum rtx_code
, rtx
, rtx
));
96 extern void print_operand
PARAMS ((FILE *, rtx
, int));
97 extern int mems_ok_for_ldd_peep
PARAMS ((rtx
, rtx
, rtx
));
98 extern int arith_double_4096_operand
PARAMS ((rtx
, enum machine_mode
));
99 extern int arith_4096_operand
PARAMS ((rtx
, enum machine_mode
));
100 extern int zero_operand
PARAMS ((rtx
, enum machine_mode
));
101 extern int fp_zero_operand
PARAMS ((rtx
, enum machine_mode
));
102 extern int reg_or_0_operand
PARAMS ((rtx
, enum machine_mode
));
103 extern int empty_delay_slot
PARAMS ((rtx
));
104 extern int eligible_for_epilogue_delay
PARAMS ((rtx
, int));
105 extern int eligible_for_sibcall_delay
PARAMS ((rtx
));
106 extern int emit_move_sequence
PARAMS ((rtx
, enum machine_mode
));
107 extern int fp_sethi_p
PARAMS ((rtx
));
108 extern int fp_mov_p
PARAMS ((rtx
));
109 extern int fp_high_losum_p
PARAMS ((rtx
));
110 extern int mem_min_alignment
PARAMS ((rtx
, int));
111 extern int pic_address_needs_scratch
PARAMS ((rtx
));
112 extern int reg_unused_after
PARAMS ((rtx
, rtx
));
113 extern int register_ok_for_ldd
PARAMS ((rtx
));
114 extern int registers_ok_for_ldd_peep
PARAMS ((rtx
, rtx
));
115 extern int sparc_flat_eligible_for_epilogue_delay
PARAMS ((rtx
, int));
116 extern int v9_regcmp_p
PARAMS ((enum rtx_code
));
117 extern char *sparc_v8plus_shift
PARAMS ((rtx
*, rtx
, const char *));
118 /* Function used for V8+ code generation. Returns 1 if the high
119 32 bits of REG are 0 before INSN. */
120 extern int sparc_check_64
PARAMS ((rtx
, rtx
));
121 extern rtx gen_df_reg
PARAMS ((rtx
, int));
122 extern int sparc_extra_constraint_check
PARAMS ((rtx
, int, int));
123 extern int sparc_rtx_costs
PARAMS ((rtx
, enum rtx_code
, enum rtx_code
));
124 #endif /* RTX_CODE */
126 extern void sparc_output_mi_thunk
PARAMS ((FILE *, tree
, HOST_WIDE_INT
, tree
));
128 #endif /* __SPARC_PROTOS_H__ */