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