annotate gcc/config/sh/sh-protos.h @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents f6334be47118
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 /* Definitions of target machine for GNU compiler for Renesas / SuperH SH.
111
kono
parents: 67
diff changeset
2 Copyright (C) 1993-2017 Free Software Foundation, Inc.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 Contributed by Steve Chamberlain (sac@cygnus.com).
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 Improved by Jim Wilson (wilson@cygnus.com).
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 This file is part of GCC.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 GCC is free software; you can redistribute it and/or modify
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 it under the terms of the GNU General Public License as published by
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 the Free Software Foundation; either version 3, or (at your option)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 any later version.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 GCC is distributed in the hope that it will be useful,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 GNU General Public License for more details.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 along with GCC; see the file COPYING3. If not see
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 <http://www.gnu.org/licenses/>. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 #ifndef GCC_SH_PROTOS_H
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 #define GCC_SH_PROTOS_H
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 enum sh_function_kind {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 /* A function with normal C ABI */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 FUNCTION_ORDINARY,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 /* A special function that guarantees that some otherwise call-clobbered
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 registers are not clobbered. These can't go through the SH5 resolver,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 because it only saves argument passing registers. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 SFUNC_GOT,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 /* A special function that should be linked statically. These are typically
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 smaller or not much larger than a PLT entry.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 Some also have a non-standard ABI which precludes dynamic linking. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 SFUNC_STATIC
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 #ifdef RTX_CODE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 extern rtx sh_fsca_sf2int (void);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 extern rtx sh_fsca_int2sf (void);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 /* Declare functions defined in sh.c and used in templates. */
111
kono
parents: 67
diff changeset
43 extern bool sh_lra_p (void);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
44
111
kono
parents: 67
diff changeset
45 extern const char *output_branch (int, rtx_insn *, rtx *);
kono
parents: 67
diff changeset
46 extern const char *output_ieee_ccmpeq (rtx_insn *, rtx *);
kono
parents: 67
diff changeset
47 extern const char *output_branchy_insn (enum rtx_code, const char *,
kono
parents: 67
diff changeset
48 rtx_insn *, rtx *);
kono
parents: 67
diff changeset
49 extern const char *output_movedouble (rtx, rtx[], machine_mode);
kono
parents: 67
diff changeset
50 extern const char *output_movepcrel (rtx, rtx[], machine_mode);
kono
parents: 67
diff changeset
51 extern const char *output_far_jump (rtx_insn *, rtx);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52
111
kono
parents: 67
diff changeset
53 extern rtx sfunc_uses_reg (rtx_insn *);
kono
parents: 67
diff changeset
54 extern int barrier_align (rtx_insn *);
kono
parents: 67
diff changeset
55 extern int sh_loop_align (rtx_insn *);
kono
parents: 67
diff changeset
56 extern bool fp_zero_operand (rtx);
kono
parents: 67
diff changeset
57 extern bool fp_one_operand (rtx);
kono
parents: 67
diff changeset
58 extern bool sh_legitimate_index_p (machine_mode, rtx, bool, bool);
kono
parents: 67
diff changeset
59 extern bool sh_legitimize_reload_address (rtx *, machine_mode, int, int);
kono
parents: 67
diff changeset
60 extern rtx legitimize_pic_address (rtx, machine_mode, rtx);
kono
parents: 67
diff changeset
61 extern bool nonpic_symbol_mentioned_p (rtx);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 extern void output_pic_addr_const (FILE *, rtx);
111
kono
parents: 67
diff changeset
63 extern bool expand_block_move (rtx *);
kono
parents: 67
diff changeset
64 extern void prepare_move_operands (rtx[], machine_mode mode);
kono
parents: 67
diff changeset
65 extern bool sh_expand_cmpstr (rtx *);
kono
parents: 67
diff changeset
66 extern bool sh_expand_cmpnstr (rtx *);
kono
parents: 67
diff changeset
67 extern bool sh_expand_strlen (rtx *);
kono
parents: 67
diff changeset
68 extern void sh_expand_setmem (rtx *);
kono
parents: 67
diff changeset
69 extern enum rtx_code prepare_cbranch_operands (rtx *, machine_mode mode,
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 enum rtx_code comparison);
111
kono
parents: 67
diff changeset
71 extern void expand_cbranchsi4 (rtx *operands, enum rtx_code comparison);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 extern bool expand_cbranchdi4 (rtx *operands, enum rtx_code comparison);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
73 extern void sh_emit_scc_to_t (enum rtx_code, rtx, rtx);
111
kono
parents: 67
diff changeset
74 extern void sh_emit_compare_and_branch (rtx *, machine_mode);
kono
parents: 67
diff changeset
75 extern void sh_emit_compare_and_set (rtx *, machine_mode);
kono
parents: 67
diff changeset
76 extern bool sh_ashlsi_clobbers_t_reg_p (rtx);
kono
parents: 67
diff changeset
77 extern bool sh_lshrsi_clobbers_t_reg_p (rtx);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
78 extern void gen_shifty_op (int, rtx *);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 extern void gen_shifty_hi_op (int, rtx *);
111
kono
parents: 67
diff changeset
80 extern bool expand_ashiftrt (rtx *);
kono
parents: 67
diff changeset
81 extern bool sh_dynamicalize_shift_p (rtx);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 extern int shl_and_kind (rtx, rtx, int *);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 extern int shl_and_length (rtx);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 extern int shl_and_scr_length (rtx);
111
kono
parents: 67
diff changeset
85 extern bool gen_shl_and (rtx, rtx, rtx, rtx);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 extern int shl_sext_kind (rtx, rtx, int *);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 extern int shl_sext_length (rtx);
111
kono
parents: 67
diff changeset
88 extern bool gen_shl_sext (rtx, rtx, rtx, rtx);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 extern int regs_used (rtx, int);
111
kono
parents: 67
diff changeset
90 extern void fixup_addr_diff_vecs (rtx_insn *);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 extern int get_dest_uid (rtx, int);
111
kono
parents: 67
diff changeset
92 extern void final_prescan_insn (rtx_insn *, rtx *, int);
kono
parents: 67
diff changeset
93 extern enum tls_model tls_symbolic_operand (rtx, machine_mode);
kono
parents: 67
diff changeset
94 extern bool system_reg_operand (rtx, machine_mode);
kono
parents: 67
diff changeset
95 extern bool reg_unused_after (rtx, rtx_insn *);
kono
parents: 67
diff changeset
96 extern int sh_insn_length_adjustment (rtx_insn *);
kono
parents: 67
diff changeset
97 extern bool sh_expand_t_scc (rtx *);
kono
parents: 67
diff changeset
98 extern rtx sh_gen_truncate (machine_mode, rtx, int);
kono
parents: 67
diff changeset
99 extern bool sh_vector_mode_supported_p (machine_mode);
kono
parents: 67
diff changeset
100 extern bool sh_cfun_trap_exit_p (void);
kono
parents: 67
diff changeset
101 extern rtx sh_find_equiv_gbr_addr (rtx_insn* cur_insn, rtx mem);
kono
parents: 67
diff changeset
102 extern int sh_eval_treg_value (rtx op);
kono
parents: 67
diff changeset
103 extern HOST_WIDE_INT sh_disp_addr_displacement (rtx mem_op);
kono
parents: 67
diff changeset
104 extern int sh_max_mov_insn_displacement (machine_mode mode, bool consider_sh2a);
kono
parents: 67
diff changeset
105 extern bool sh_movsf_ie_ra_split_p (rtx, rtx, rtx);
kono
parents: 67
diff changeset
106 extern void sh_expand_sym_label2reg (rtx, rtx, rtx, bool);
kono
parents: 67
diff changeset
107
kono
parents: 67
diff changeset
108 /* Result value of sh_find_set_of_reg. */
kono
parents: 67
diff changeset
109 struct set_of_reg
kono
parents: 67
diff changeset
110 {
kono
parents: 67
diff changeset
111 /* The insn where sh_find_set_of_reg stopped looking.
kono
parents: 67
diff changeset
112 Can be NULL_RTX if the end of the insn list was reached. */
kono
parents: 67
diff changeset
113 rtx_insn* insn;
kono
parents: 67
diff changeset
114
kono
parents: 67
diff changeset
115 /* The set rtx of the specified reg if found, NULL_RTX otherwise. */
kono
parents: 67
diff changeset
116 const_rtx set_rtx;
kono
parents: 67
diff changeset
117
kono
parents: 67
diff changeset
118 /* The set source rtx of the specified reg if found, NULL_RTX otherwise.
kono
parents: 67
diff changeset
119 Usually, this is the most interesting return value. */
kono
parents: 67
diff changeset
120 rtx set_src;
kono
parents: 67
diff changeset
121 };
kono
parents: 67
diff changeset
122
kono
parents: 67
diff changeset
123 /* Given a reg rtx and a start insn, try to find the insn that sets the
kono
parents: 67
diff changeset
124 specified reg by using the specified insn stepping function, such as
kono
parents: 67
diff changeset
125 'prev_nonnote_insn_bb'. When the insn is found, try to extract the rtx
kono
parents: 67
diff changeset
126 of the reg set. */
kono
parents: 67
diff changeset
127 template <typename F> inline set_of_reg
kono
parents: 67
diff changeset
128 sh_find_set_of_reg (rtx reg, rtx_insn* insn, F stepfunc,
kono
parents: 67
diff changeset
129 bool ignore_reg_reg_copies = false)
kono
parents: 67
diff changeset
130 {
kono
parents: 67
diff changeset
131 set_of_reg result;
kono
parents: 67
diff changeset
132 result.insn = insn;
kono
parents: 67
diff changeset
133 result.set_rtx = NULL_RTX;
kono
parents: 67
diff changeset
134 result.set_src = NULL_RTX;
kono
parents: 67
diff changeset
135
kono
parents: 67
diff changeset
136 if (!REG_P (reg) || insn == NULL_RTX)
kono
parents: 67
diff changeset
137 return result;
kono
parents: 67
diff changeset
138
kono
parents: 67
diff changeset
139 for (rtx_insn* i = stepfunc (insn); i != NULL_RTX; i = stepfunc (i))
kono
parents: 67
diff changeset
140 {
kono
parents: 67
diff changeset
141 if (BARRIER_P (i))
kono
parents: 67
diff changeset
142 break;
kono
parents: 67
diff changeset
143 if (!INSN_P (i) || DEBUG_INSN_P (i))
kono
parents: 67
diff changeset
144 continue;
kono
parents: 67
diff changeset
145 if (reg_set_p (reg, i))
kono
parents: 67
diff changeset
146 {
kono
parents: 67
diff changeset
147 if (CALL_P (i))
kono
parents: 67
diff changeset
148 break;
kono
parents: 67
diff changeset
149
kono
parents: 67
diff changeset
150 result.insn = i;
kono
parents: 67
diff changeset
151 result.set_rtx = set_of (reg, i);
kono
parents: 67
diff changeset
152
kono
parents: 67
diff changeset
153 if (result.set_rtx == NULL_RTX || GET_CODE (result.set_rtx) != SET)
kono
parents: 67
diff changeset
154 break;
kono
parents: 67
diff changeset
155
kono
parents: 67
diff changeset
156 result.set_src = XEXP (result.set_rtx, 1);
kono
parents: 67
diff changeset
157
kono
parents: 67
diff changeset
158 if (ignore_reg_reg_copies && REG_P (result.set_src))
kono
parents: 67
diff changeset
159 {
kono
parents: 67
diff changeset
160 reg = result.set_src;
kono
parents: 67
diff changeset
161 continue;
kono
parents: 67
diff changeset
162 }
kono
parents: 67
diff changeset
163 if (ignore_reg_reg_copies && SUBREG_P (result.set_src)
kono
parents: 67
diff changeset
164 && REG_P (SUBREG_REG (result.set_src)))
kono
parents: 67
diff changeset
165 {
kono
parents: 67
diff changeset
166 reg = SUBREG_REG (result.set_src);
kono
parents: 67
diff changeset
167 continue;
kono
parents: 67
diff changeset
168 }
kono
parents: 67
diff changeset
169
kono
parents: 67
diff changeset
170 break;
kono
parents: 67
diff changeset
171 }
kono
parents: 67
diff changeset
172 }
kono
parents: 67
diff changeset
173
kono
parents: 67
diff changeset
174 /* If the searched reg is found inside a (mem (post_inc:SI (reg))), set_of
kono
parents: 67
diff changeset
175 will return NULL and set_rtx will be NULL.
kono
parents: 67
diff changeset
176 In this case report a 'not found'. result.insn will always be non-null
kono
parents: 67
diff changeset
177 at this point, so no need to check it. */
kono
parents: 67
diff changeset
178 if (result.set_src != NULL && result.set_rtx == NULL)
kono
parents: 67
diff changeset
179 result.set_src = NULL;
kono
parents: 67
diff changeset
180
kono
parents: 67
diff changeset
181 return result;
kono
parents: 67
diff changeset
182 }
kono
parents: 67
diff changeset
183
kono
parents: 67
diff changeset
184 /* Result value of sh_find_extending_set_of_reg. */
kono
parents: 67
diff changeset
185 struct sh_extending_set_of_reg : public set_of_reg
kono
parents: 67
diff changeset
186 {
kono
parents: 67
diff changeset
187 /* The mode the set is extending from (QImode or HImode), or VOIDmode if
kono
parents: 67
diff changeset
188 this is not a zero/sign extending set. */
kono
parents: 67
diff changeset
189 machine_mode from_mode;
kono
parents: 67
diff changeset
190
kono
parents: 67
diff changeset
191 /* ZERO_EXTEND, SIGN_EXTEND or UNKNOWN. */
kono
parents: 67
diff changeset
192 rtx_code ext_code;
kono
parents: 67
diff changeset
193
kono
parents: 67
diff changeset
194 sh_extending_set_of_reg (rtx_insn* i)
kono
parents: 67
diff changeset
195 {
kono
parents: 67
diff changeset
196 insn = i;
kono
parents: 67
diff changeset
197 set_rtx = NULL;
kono
parents: 67
diff changeset
198 set_src = NULL;
kono
parents: 67
diff changeset
199 from_mode = VOIDmode;
kono
parents: 67
diff changeset
200 ext_code = UNKNOWN;
kono
parents: 67
diff changeset
201 }
kono
parents: 67
diff changeset
202
kono
parents: 67
diff changeset
203 sh_extending_set_of_reg (const set_of_reg& rhs)
kono
parents: 67
diff changeset
204 {
kono
parents: 67
diff changeset
205 *((set_of_reg*)this) = rhs;
kono
parents: 67
diff changeset
206 from_mode = VOIDmode;
kono
parents: 67
diff changeset
207 ext_code = UNKNOWN;
kono
parents: 67
diff changeset
208 }
kono
parents: 67
diff changeset
209
kono
parents: 67
diff changeset
210 /* Returns true if it's possible to use the source reg of the sign
kono
parents: 67
diff changeset
211 or zero extending set directly, bypassing the extension. */
kono
parents: 67
diff changeset
212 bool can_use_as_unextended_reg (void) const;
kono
parents: 67
diff changeset
213
kono
parents: 67
diff changeset
214 /* Returns the reg rtx of the sign or zero extending set source, that can
kono
parents: 67
diff changeset
215 be safely used at the specified insn in SImode. */
kono
parents: 67
diff changeset
216 rtx use_as_unextended_reg (rtx_insn* use_at_insn) const;
kono
parents: 67
diff changeset
217
kono
parents: 67
diff changeset
218 /* Returns the reg rtx of the sign or zero extending result, that can be
kono
parents: 67
diff changeset
219 safely used at the specified insn in SImode. If the set source is an
kono
parents: 67
diff changeset
220 implicitly sign extending mem load, the mem load is converted into an
kono
parents: 67
diff changeset
221 explicitly sign extending mem load. */
kono
parents: 67
diff changeset
222 rtx use_as_extended_reg (rtx_insn* use_at_insn) const;
kono
parents: 67
diff changeset
223 };
kono
parents: 67
diff changeset
224
kono
parents: 67
diff changeset
225 extern sh_extending_set_of_reg sh_find_extending_set_of_reg (rtx reg,
kono
parents: 67
diff changeset
226 rtx_insn* insn);
kono
parents: 67
diff changeset
227
kono
parents: 67
diff changeset
228 extern bool sh_is_logical_t_store_expr (rtx op, rtx_insn* insn);
kono
parents: 67
diff changeset
229 extern rtx sh_try_omit_signzero_extend (rtx extended_op, rtx_insn* insn);
kono
parents: 67
diff changeset
230 extern bool sh_split_movrt_negc_to_movt_xor (rtx_insn* curr_insn,
kono
parents: 67
diff changeset
231 rtx operands[]);
kono
parents: 67
diff changeset
232 extern void sh_split_tst_subregs (rtx_insn* curr_insn,
kono
parents: 67
diff changeset
233 machine_mode subreg_mode, int subreg_offset,
kono
parents: 67
diff changeset
234 rtx operands[]);
kono
parents: 67
diff changeset
235
kono
parents: 67
diff changeset
236 extern bool sh_is_nott_insn (const rtx_insn* i);
kono
parents: 67
diff changeset
237 extern rtx sh_movt_set_dest (const rtx_insn* i);
kono
parents: 67
diff changeset
238 extern rtx sh_movt_set_dest (const_rtx i);
kono
parents: 67
diff changeset
239 extern rtx sh_movrt_set_dest (const rtx_insn* i);
kono
parents: 67
diff changeset
240 extern rtx sh_movrt_set_dest (const_rtx i);
kono
parents: 67
diff changeset
241
kono
parents: 67
diff changeset
242 inline bool sh_is_movt_insn (const rtx_insn* i)
kono
parents: 67
diff changeset
243 {
kono
parents: 67
diff changeset
244 return sh_movt_set_dest (i) != NULL;
kono
parents: 67
diff changeset
245 }
kono
parents: 67
diff changeset
246
kono
parents: 67
diff changeset
247 inline bool sh_is_movrt_insn (const rtx_insn* i)
kono
parents: 67
diff changeset
248 {
kono
parents: 67
diff changeset
249 return sh_movrt_set_dest (i) != NULL;
kono
parents: 67
diff changeset
250 }
kono
parents: 67
diff changeset
251
kono
parents: 67
diff changeset
252 extern bool sh_insn_operands_modified_between_p (rtx_insn* operands_insn,
kono
parents: 67
diff changeset
253 const rtx_insn* from,
kono
parents: 67
diff changeset
254 const rtx_insn* to);
kono
parents: 67
diff changeset
255
kono
parents: 67
diff changeset
256 extern bool sh_reg_dead_or_unused_after_insn (const rtx_insn* i, int regno);
kono
parents: 67
diff changeset
257 extern void sh_remove_reg_dead_or_unused_notes (rtx_insn* i, int regno);
kono
parents: 67
diff changeset
258 extern rtx_insn* sh_check_add_incdec_notes (rtx_insn* i);
kono
parents: 67
diff changeset
259 extern rtx sh_remove_overlapping_post_inc (rtx dst, rtx src);
kono
parents: 67
diff changeset
260 extern rtx_insn* sh_peephole_emit_move_insn (rtx dst, rtx src);
kono
parents: 67
diff changeset
261
kono
parents: 67
diff changeset
262 extern bool sh_in_recog_treg_set_expr (void);
kono
parents: 67
diff changeset
263 extern bool sh_recog_treg_set_expr (rtx op, machine_mode mode);
kono
parents: 67
diff changeset
264
kono
parents: 67
diff changeset
265 /* Result value of sh_split_treg_set_expr. Contains the first insn emitted
kono
parents: 67
diff changeset
266 and the optional trailing nott insn. */
kono
parents: 67
diff changeset
267 class sh_treg_insns
kono
parents: 67
diff changeset
268 {
kono
parents: 67
diff changeset
269 public:
kono
parents: 67
diff changeset
270 sh_treg_insns (void) : m_first_insn (NULL), m_trailing_nott_insn (NULL) { }
kono
parents: 67
diff changeset
271 sh_treg_insns (rtx_insn* first_insn, rtx_insn* nott_insn)
kono
parents: 67
diff changeset
272 : m_first_insn (first_insn),
kono
parents: 67
diff changeset
273 m_trailing_nott_insn (nott_insn)
kono
parents: 67
diff changeset
274 { }
kono
parents: 67
diff changeset
275
kono
parents: 67
diff changeset
276 bool was_treg_operand (void) const { return m_first_insn == NULL; }
kono
parents: 67
diff changeset
277 bool has_trailing_nott (void) const { return m_trailing_nott_insn != NULL; }
kono
parents: 67
diff changeset
278 rtx_insn* trailing_nott (void) const { return m_trailing_nott_insn; }
kono
parents: 67
diff changeset
279 rtx_insn* first_insn (void) const { return m_first_insn; }
kono
parents: 67
diff changeset
280
kono
parents: 67
diff changeset
281 /* If there is a trailing nott, remove it from the emitted insns and
kono
parents: 67
diff changeset
282 return true. Return false otherwise. */
kono
parents: 67
diff changeset
283 bool
kono
parents: 67
diff changeset
284 remove_trailing_nott (void)
kono
parents: 67
diff changeset
285 {
kono
parents: 67
diff changeset
286 if (!has_trailing_nott ())
kono
parents: 67
diff changeset
287 return false;
kono
parents: 67
diff changeset
288
kono
parents: 67
diff changeset
289 remove_insn (trailing_nott ());
kono
parents: 67
diff changeset
290 return true;
kono
parents: 67
diff changeset
291 }
kono
parents: 67
diff changeset
292
kono
parents: 67
diff changeset
293 private:
kono
parents: 67
diff changeset
294 rtx_insn* m_first_insn;
kono
parents: 67
diff changeset
295 rtx_insn* m_trailing_nott_insn;
kono
parents: 67
diff changeset
296 };
kono
parents: 67
diff changeset
297
kono
parents: 67
diff changeset
298 extern sh_treg_insns sh_split_treg_set_expr (rtx x, rtx_insn* curr_insn);
kono
parents: 67
diff changeset
299
kono
parents: 67
diff changeset
300 enum
kono
parents: 67
diff changeset
301 {
kono
parents: 67
diff changeset
302 /* An effective conditional branch distance of zero bytes is impossible.
kono
parents: 67
diff changeset
303 Hence we can use it to designate an unknown value. */
kono
parents: 67
diff changeset
304 unknown_cbranch_distance = 0u,
kono
parents: 67
diff changeset
305 infinite_cbranch_distance = ~0u
kono
parents: 67
diff changeset
306 };
kono
parents: 67
diff changeset
307
kono
parents: 67
diff changeset
308 unsigned int
kono
parents: 67
diff changeset
309 sh_cbranch_distance (rtx_insn* cbranch_insn,
kono
parents: 67
diff changeset
310 unsigned int max_dist = infinite_cbranch_distance);
kono
parents: 67
diff changeset
311
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
312 #endif /* RTX_CODE */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
313
111
kono
parents: 67
diff changeset
314 extern void sh_cpu_cpp_builtins (cpp_reader* pfile);
kono
parents: 67
diff changeset
315
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
316 extern const char *output_jump_label_table (void);
111
kono
parents: 67
diff changeset
317 extern rtx get_t_reg_rtx (void);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
318 extern void sh_expand_prologue (void);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
319 extern void sh_expand_epilogue (bool);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
320 extern void sh_set_return_address (rtx, rtx);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
321 extern int initial_elimination_offset (int, int);
111
kono
parents: 67
diff changeset
322 extern bool sh_hard_regno_rename_ok (unsigned int, unsigned int);
kono
parents: 67
diff changeset
323 extern bool sh_cfun_interrupt_handler_p (void);
kono
parents: 67
diff changeset
324 extern bool sh_cfun_resbank_handler_p (void);
kono
parents: 67
diff changeset
325 extern bool sh_attr_renesas_p (const_tree);
kono
parents: 67
diff changeset
326 extern bool sh_cfun_attr_renesas_p (void);
kono
parents: 67
diff changeset
327 extern bool sh_small_register_classes_for_mode_p (machine_mode);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
328 extern void sh_mark_label (rtx, int);
111
kono
parents: 67
diff changeset
329 extern bool check_use_sfunc_addr (rtx_insn *, rtx);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
330
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
331 #ifdef HARD_CONST
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
332 extern void fpscr_set_from_mem (int, HARD_REG_SET);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
333 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
334
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
335 extern void sh_pr_interrupt (struct cpp_reader *);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
336 extern void sh_pr_trapa (struct cpp_reader *);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
337 extern void sh_pr_nosave_low_regs (struct cpp_reader *);
111
kono
parents: 67
diff changeset
338
kono
parents: 67
diff changeset
339 struct function_symbol_result
kono
parents: 67
diff changeset
340 {
kono
parents: 67
diff changeset
341 function_symbol_result (void) : sym (NULL), lab (NULL) { }
kono
parents: 67
diff changeset
342 function_symbol_result (rtx s, rtx l) : sym (s), lab (l) { }
kono
parents: 67
diff changeset
343
kono
parents: 67
diff changeset
344 rtx sym;
kono
parents: 67
diff changeset
345 rtx lab;
kono
parents: 67
diff changeset
346 };
kono
parents: 67
diff changeset
347
kono
parents: 67
diff changeset
348 extern function_symbol_result function_symbol (rtx, const char *,
kono
parents: 67
diff changeset
349 sh_function_kind);
kono
parents: 67
diff changeset
350 extern rtx sh_get_fdpic_reg_initial_val (void);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
351 extern rtx sh_get_pr_initial_val (void);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
352
111
kono
parents: 67
diff changeset
353 extern void sh_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree,
kono
parents: 67
diff changeset
354 signed int, machine_mode);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
355 extern rtx sh_dwarf_register_span (rtx);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
356
111
kono
parents: 67
diff changeset
357 extern bool sh_contains_memref_p (rtx);
kono
parents: 67
diff changeset
358 extern bool sh_loads_bankedreg_p (rtx);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
359 extern int sh2a_get_function_vector_number (rtx);
111
kono
parents: 67
diff changeset
360 extern bool sh2a_is_function_vector_call (rtx);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
361 extern void sh_fix_range (const char *);
111
kono
parents: 67
diff changeset
362 extern machine_mode sh_hard_regno_caller_save_mode (unsigned int, unsigned int,
kono
parents: 67
diff changeset
363 machine_mode);
kono
parents: 67
diff changeset
364 extern bool sh_can_use_simple_return_p (void);
kono
parents: 67
diff changeset
365 extern rtx sh_load_function_descriptor (rtx);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
366 #endif /* ! GCC_SH_PROTOS_H */