1 /* Definitions of target machine for GNU compiler for Renesas / SuperH SH.
2 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2003
3 Free Software Foundation, Inc.
4 Contributed by Steve Chamberlain (sac@cygnus.com).
5 Improved by Jim Wilson (wilson@cygnus.com).
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 GCC_SH_PROTOS_H
25 #define GCC_SH_PROTOS_H
28 extern struct rtx_def
*prepare_scc_operands
PARAMS ((enum rtx_code
));
30 /* Declare functions defined in sh.c and used in templates. */
32 extern const char *output_branch
PARAMS ((int, rtx
, rtx
*));
33 extern const char *output_ieee_ccmpeq
PARAMS ((rtx
, rtx
*));
34 extern const char *output_branchy_insn
PARAMS ((enum rtx_code
, const char *, rtx
, rtx
*));
35 extern const char *output_movedouble
PARAMS ((rtx
, rtx
[], enum machine_mode
));
36 extern const char *output_movepcrel
PARAMS ((rtx
, rtx
[], enum machine_mode
));
37 extern const char *output_far_jump
PARAMS ((rtx
, rtx
));
39 extern struct rtx_def
*sfunc_uses_reg
PARAMS ((rtx
));
40 extern int barrier_align
PARAMS ((rtx
));
41 extern int sh_loop_align
PARAMS ((rtx
));
42 extern int fp_zero_operand
PARAMS ((rtx
));
43 extern int fp_one_operand
PARAMS ((rtx
));
44 extern int fp_int_operand
PARAMS ((rtx
));
45 extern rtx get_fpscr_rtx
PARAMS ((void));
46 extern rtx legitimize_pic_address
PARAMS ((rtx
, enum machine_mode
, rtx
));
47 extern int nonpic_symbol_mentioned_p
PARAMS ((rtx
));
48 extern void emit_sf_insn
PARAMS ((rtx
));
49 extern void emit_df_insn
PARAMS ((rtx
));
50 extern void print_operand_address
PARAMS ((FILE *, rtx
));
51 extern void print_operand
PARAMS ((FILE *, rtx
, int));
52 extern void output_pic_addr_const
PARAMS ((FILE *, rtx
));
53 extern int expand_block_move
PARAMS ((rtx
*));
54 extern int prepare_move_operands
PARAMS ((rtx
[], enum machine_mode mode
));
55 extern void from_compare
PARAMS ((rtx
*, int));
56 extern int shift_insns_rtx
PARAMS ((rtx
));
57 extern void gen_ashift
PARAMS ((int, int, rtx
));
58 extern void gen_ashift_hi
PARAMS ((int, int, rtx
));
59 extern void gen_shifty_op
PARAMS ((int, rtx
*));
60 extern void gen_shifty_hi_op
PARAMS ((int, rtx
*));
61 extern int expand_ashiftrt
PARAMS ((rtx
*));
62 extern int sh_dynamicalize_shift_p
PARAMS ((rtx
));
63 extern int shl_and_kind
PARAMS ((rtx
, rtx
, int *));
64 extern int shl_and_length
PARAMS ((rtx
));
65 extern int shl_and_scr_length
PARAMS ((rtx
));
66 extern int gen_shl_and
PARAMS ((rtx
, rtx
, rtx
, rtx
));
67 extern int shl_sext_kind
PARAMS ((rtx
, rtx
, int *));
68 extern int shl_sext_length
PARAMS ((rtx
));
69 extern int gen_shl_sext
PARAMS ((rtx
, rtx
, rtx
, rtx
));
70 extern rtx gen_datalabel_ref
PARAMS ((rtx
));
71 extern int regs_used
PARAMS ((rtx
, int));
72 extern void fixup_addr_diff_vecs
PARAMS ((rtx
));
73 extern int get_dest_uid
PARAMS ((rtx
, int));
74 extern void final_prescan_insn
PARAMS ((rtx
, rtx
*, int));
75 extern int symbol_ref_operand
PARAMS ((rtx
, enum machine_mode
));
76 extern int tls_symbolic_operand
PARAMS ((rtx
, enum machine_mode
));
77 extern int system_reg_operand
PARAMS ((rtx
, enum machine_mode
));
78 extern int general_movsrc_operand
PARAMS ((rtx
, enum machine_mode
));
79 extern int general_movdst_operand
PARAMS ((rtx
, enum machine_mode
));
80 extern int arith_reg_operand
PARAMS ((rtx
, enum machine_mode
));
81 extern int fp_arith_reg_operand
PARAMS ((rtx
, enum machine_mode
));
82 extern int arith_operand
PARAMS ((rtx
, enum machine_mode
));
83 extern int arith_reg_or_0_operand
PARAMS ((rtx
, enum machine_mode
));
84 extern int logical_operand
PARAMS ((rtx
, enum machine_mode
));
85 extern int tertiary_reload_operand
PARAMS ((rtx
, enum machine_mode
));
86 extern int fpscr_operand
PARAMS ((rtx
, enum machine_mode
));
87 extern int fpul_operand
PARAMS ((rtx
, enum machine_mode
));
88 extern int commutative_float_operator
PARAMS ((rtx
, enum machine_mode
));
89 extern int noncommutative_float_operator
PARAMS ((rtx
, enum machine_mode
));
90 extern int reg_unused_after
PARAMS ((rtx
, rtx
));
91 extern void expand_sf_unop
PARAMS ((rtx (*)(rtx
, rtx
, rtx
), rtx
*));
92 extern void expand_sf_binop
PARAMS ((rtx (*)(rtx
, rtx
, rtx
, rtx
), rtx
*));
93 extern void expand_df_unop
PARAMS ((rtx (*)(rtx
, rtx
, rtx
), rtx
*));
94 extern void expand_df_binop
PARAMS ((rtx (*)(rtx
, rtx
, rtx
, rtx
), rtx
*));
95 extern void expand_fp_branch
PARAMS ((rtx (*)(void), rtx (*)(void)));
96 extern int sh_insn_length_adjustment
PARAMS ((rtx
));
97 extern int sh_can_redirect_branch
PARAMS ((rtx
, rtx
));
98 extern void sh_expand_unop_v2sf
PARAMS ((enum rtx_code
, rtx
, rtx
));
99 extern void sh_expand_binop_v2sf
PARAMS ((enum rtx_code
, rtx
, rtx
, rtx
));
101 extern void sh_va_start
PARAMS ((tree
, rtx
));
102 extern rtx sh_va_arg
PARAMS ((tree
, tree
));
103 #endif /* TREE_CODE */
104 #endif /* RTX_CODE */
107 extern tree sh_build_va_list
PARAMS ((void));
108 #endif /* TREE_CODE */
110 extern const char *output_jump_label_table
PARAMS ((void));
111 extern int sh_handle_pragma
PARAMS ((int (*)(void), void (*)(int), const char *));
112 extern struct rtx_def
*get_fpscr_rtx
PARAMS ((void));
113 extern int sh_media_register_for_return
PARAMS ((void));
114 extern void sh_expand_prologue
PARAMS ((void));
115 extern void sh_expand_epilogue
PARAMS ((void));
116 extern int sh_need_epilogue
PARAMS ((void));
117 extern void sh_set_return_address
PARAMS ((rtx
, rtx
));
118 extern int initial_elimination_offset
PARAMS ((int, int));
119 extern int fldi_ok
PARAMS ((void));
120 extern int sh_pr_n_sets
PARAMS ((void));
121 extern int sh_hard_regno_rename_ok
PARAMS ((unsigned int, unsigned int));
122 extern int sh_cfun_interrupt_handler_p
PARAMS ((void));
123 extern int sh_attr_renesas_p
PARAMS ((tree
));
124 extern int sh_cfun_attr_renesas_p
PARAMS ((void));
125 extern void sh_initialize_trampoline
PARAMS ((rtx
, rtx
, rtx
));
126 extern bool sh_cannot_change_mode_class
127 PARAMS ((enum machine_mode
, enum machine_mode
, enum reg_class
));
128 extern void sh_mark_label
PARAMS ((rtx
, int));
129 extern int sh_register_move_cost
130 PARAMS ((enum machine_mode mode
, enum reg_class
, enum reg_class
));
133 extern void fpscr_set_from_mem
PARAMS ((int, HARD_REG_SET
));
136 extern void sh_pr_interrupt
PARAMS ((struct cpp_reader
*));
137 extern void sh_pr_trapa
PARAMS ((struct cpp_reader
*));
138 extern void sh_pr_nosave_low_regs
PARAMS ((struct cpp_reader
*));
139 extern rtx
function_symbol (const char *);
140 extern rtx
sh_get_pr_initial_val (void);
142 extern rtx
sh_function_arg (CUMULATIVE_ARGS
*, enum machine_mode
, tree
, int);
143 extern void sh_function_arg_advance (CUMULATIVE_ARGS
*, enum machine_mode
, tree
, int);
144 extern int sh_pass_in_reg_p (CUMULATIVE_ARGS
*, enum machine_mode
, tree
);
146 #endif /* ! GCC_SH_PROTOS_H */