1 /* Prototypes for exported functions defined in arm.c and pe.c
2 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
3 2009, 2010 Free Software Foundation, Inc.
4 Contributed by Richard Earnshaw (rearnsha@arm.com)
5 Minor hacks by Nick Clifton (nickc@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 3, 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 COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
23 #ifndef GCC_ARM_PROTOS_H
24 #define GCC_ARM_PROTOS_H
26 extern int use_return_insn (int, rtx
);
27 extern enum reg_class
arm_regno_class (int);
28 extern void arm_load_pic_register (unsigned long);
29 extern int arm_volatile_func (void);
30 extern const char *arm_output_epilogue (rtx
);
31 extern void arm_expand_prologue (void);
32 extern const char *arm_strip_name_encoding (const char *);
33 extern void arm_asm_output_labelref (FILE *, const char *);
34 extern void thumb2_asm_output_opcode (FILE *);
35 extern unsigned long arm_current_func_type (void);
36 extern HOST_WIDE_INT
arm_compute_initial_elimination_offset (unsigned int,
38 extern HOST_WIDE_INT
thumb_compute_initial_elimination_offset (unsigned int,
40 extern unsigned int arm_dbx_register_number (unsigned int);
41 extern void arm_output_fn_unwind (FILE *, bool);
45 extern bool arm_vector_mode_supported_p (enum machine_mode
);
46 extern bool arm_small_register_classes_for_mode_p (enum machine_mode
);
47 extern int arm_hard_regno_mode_ok (unsigned int, enum machine_mode
);
48 extern int const_ok_for_arm (HOST_WIDE_INT
);
49 extern int arm_split_constant (RTX_CODE
, enum machine_mode
, rtx
,
50 HOST_WIDE_INT
, rtx
, rtx
, int);
51 extern RTX_CODE
arm_canonicalize_comparison (RTX_CODE
, rtx
*, rtx
*);
52 extern int legitimate_pic_operand_p (rtx
);
53 extern rtx
legitimize_pic_address (rtx
, enum machine_mode
, rtx
);
54 extern rtx
legitimize_tls_address (rtx
, rtx
);
55 extern int arm_legitimate_address_outer_p (enum machine_mode
, rtx
, RTX_CODE
, int);
56 extern int thumb_legitimate_offset_p (enum machine_mode
, HOST_WIDE_INT
);
57 extern bool arm_legitimize_reload_address (rtx
*, enum machine_mode
, int, int,
59 extern rtx
thumb_legitimize_reload_address (rtx
*, enum machine_mode
, int, int,
61 extern int thumb1_legitimate_address_p (enum machine_mode
, rtx
, int);
62 extern int arm_const_double_rtx (rtx
);
63 extern int neg_const_double_rtx_ok_for_fpa (rtx
);
64 extern int vfp3_const_double_rtx (rtx
);
65 extern int neon_immediate_valid_for_move (rtx
, enum machine_mode
, rtx
*, int *);
66 extern int neon_immediate_valid_for_logic (rtx
, enum machine_mode
, int, rtx
*,
68 extern char *neon_output_logic_immediate (const char *, rtx
*,
69 enum machine_mode
, int, int);
70 extern void neon_pairwise_reduce (rtx
, rtx
, enum machine_mode
,
71 rtx (*) (rtx
, rtx
, rtx
));
72 extern rtx
neon_make_constant (rtx
);
73 extern void neon_expand_vector_init (rtx
, rtx
);
74 extern void neon_lane_bounds (rtx
, HOST_WIDE_INT
, HOST_WIDE_INT
);
75 extern void neon_const_bounds (rtx
, HOST_WIDE_INT
, HOST_WIDE_INT
);
76 extern HOST_WIDE_INT
neon_element_bits (enum machine_mode
);
77 extern void neon_reinterpret (rtx
, rtx
);
78 extern void neon_emit_pair_result_insn (enum machine_mode
,
79 rtx (*) (rtx
, rtx
, rtx
, rtx
),
81 extern void neon_disambiguate_copy (rtx
*, rtx
*, rtx
*, unsigned int);
82 extern enum reg_class
coproc_secondary_reload_class (enum machine_mode
, rtx
,
84 extern bool arm_tls_referenced_p (rtx
);
86 extern int cirrus_memory_offset (rtx
);
87 extern int arm_coproc_mem_operand (rtx
, bool);
88 extern int neon_vector_mem_operand (rtx
, int);
89 extern int neon_struct_mem_operand (rtx
);
90 extern int arm_no_early_store_addr_dep (rtx
, rtx
);
91 extern int arm_early_store_addr_dep (rtx
, rtx
);
92 extern int arm_early_load_addr_dep (rtx
, rtx
);
93 extern int arm_no_early_alu_shift_dep (rtx
, rtx
);
94 extern int arm_no_early_alu_shift_value_dep (rtx
, rtx
);
95 extern int arm_no_early_mul_dep (rtx
, rtx
);
96 extern int arm_mac_accumulator_is_mul_result (rtx
, rtx
);
98 extern int tls_mentioned_p (rtx
);
99 extern int symbol_mentioned_p (rtx
);
100 extern int label_mentioned_p (rtx
);
101 extern RTX_CODE
minmax_code (rtx
);
102 extern int adjacent_mem_locations (rtx
, rtx
);
103 extern bool gen_ldm_seq (rtx
*, int, bool);
104 extern bool gen_stm_seq (rtx
*, int);
105 extern bool gen_const_stm_seq (rtx
*, int);
106 extern rtx
arm_gen_load_multiple (int *, int, rtx
, int, rtx
, HOST_WIDE_INT
*);
107 extern rtx
arm_gen_store_multiple (int *, int, rtx
, int, rtx
, HOST_WIDE_INT
*);
108 extern int arm_gen_movmemqi (rtx
*);
109 extern enum machine_mode
arm_select_cc_mode (RTX_CODE
, rtx
, rtx
);
110 extern enum machine_mode
arm_select_dominance_cc_mode (rtx
, rtx
,
112 extern rtx
arm_gen_compare_reg (RTX_CODE
, rtx
, rtx
);
113 extern rtx
arm_gen_return_addr_mask (void);
114 extern void arm_reload_in_hi (rtx
*);
115 extern void arm_reload_out_hi (rtx
*);
116 extern int arm_const_double_inline_cost (rtx
);
117 extern bool arm_const_double_by_parts (rtx
);
118 extern bool arm_const_double_by_immediates (rtx
);
119 extern const char *fp_immediate_constant (rtx
);
120 extern void arm_emit_call_insn (rtx
, rtx
);
121 extern const char *output_call (rtx
*);
122 extern const char *output_call_mem (rtx
*);
123 void arm_emit_movpair (rtx
, rtx
);
124 extern const char *output_mov_long_double_fpa_from_arm (rtx
*);
125 extern const char *output_mov_long_double_arm_from_fpa (rtx
*);
126 extern const char *output_mov_long_double_arm_from_arm (rtx
*);
127 extern const char *output_mov_double_fpa_from_arm (rtx
*);
128 extern const char *output_mov_double_arm_from_fpa (rtx
*);
129 extern const char *output_move_double (rtx
*);
130 extern const char *output_move_quad (rtx
*);
131 extern const char *output_move_vfp (rtx
*operands
);
132 extern const char *output_move_neon (rtx
*operands
);
133 extern int arm_attr_length_move_neon (rtx
);
134 extern int arm_address_offset_is_imm (rtx
);
135 extern const char *output_add_immediate (rtx
*);
136 extern const char *arithmetic_instr (rtx
, int);
137 extern void output_ascii_pseudo_op (FILE *, const unsigned char *, int);
138 extern const char *output_return_instruction (rtx
, int, int);
139 extern void arm_poke_function_name (FILE *, const char *);
140 extern void arm_final_prescan_insn (rtx
);
141 extern int arm_debugger_arg_offset (int, rtx
);
142 extern bool arm_is_long_call_p (tree
);
143 extern int arm_emit_vector_const (FILE *, rtx
);
144 extern void arm_emit_fp16_const (rtx c
);
145 extern const char * arm_output_load_gr (rtx
*);
146 extern const char *vfp_output_fstmd (rtx
*);
147 extern void arm_set_return_address (rtx
, rtx
);
148 extern int arm_eliminable_register (rtx
);
149 extern const char *arm_output_shift(rtx
*, int);
150 extern void arm_expand_sync (enum machine_mode
, struct arm_sync_generator
*,
152 extern const char *arm_output_memory_barrier (rtx
*);
153 extern const char *arm_output_sync_insn (rtx
, rtx
*);
154 extern unsigned int arm_sync_loop_insns (rtx
, rtx
*);
155 extern int arm_attr_length_push_multi(rtx
, rtx
);
157 #if defined TREE_CODE
158 extern void arm_init_cumulative_args (CUMULATIVE_ARGS
*, tree
, rtx
, tree
);
159 extern bool arm_pad_arg_upward (enum machine_mode
, const_tree
);
160 extern bool arm_pad_reg_upward (enum machine_mode
, tree
, int);
162 extern int arm_apply_result_size (void);
163 extern rtx
aapcs_libcall_value (enum machine_mode
);
165 #endif /* RTX_CODE */
167 extern int arm_float_words_big_endian (void);
169 /* Thumb functions. */
170 extern void arm_init_expanders (void);
171 extern const char *thumb_unexpanded_epilogue (void);
172 extern void thumb1_expand_prologue (void);
173 extern void thumb1_expand_epilogue (void);
175 extern int is_called_in_ARM_mode (tree
);
177 extern int thumb_shiftable_const (unsigned HOST_WIDE_INT
);
179 extern void thumb1_final_prescan_insn (rtx
);
180 extern void thumb2_final_prescan_insn (rtx
);
181 extern const char *thumb_load_double_from_address (rtx
*);
182 extern const char *thumb_output_move_mem_multiple (int, rtx
*);
183 extern const char *thumb_call_via_reg (rtx
);
184 extern void thumb_expand_movmemqi (rtx
*);
185 extern rtx
arm_return_addr (int, rtx
);
186 extern void thumb_reload_out_hi (rtx
*);
187 extern void thumb_reload_in_hi (rtx
*);
188 extern void thumb_set_return_address (rtx
, rtx
);
189 extern const char *thumb1_output_casesi (rtx
*);
190 extern const char *thumb2_output_casesi (rtx
*);
193 /* Defined in pe.c. */
194 extern int arm_dllexport_name_p (const char *);
195 extern int arm_dllimport_name_p (const char *);
198 extern void arm_pe_unique_section (tree
, int);
199 extern void arm_pe_encode_section_info (tree
, rtx
, int);
200 extern int arm_dllexport_p (tree
);
201 extern int arm_dllimport_p (tree
);
202 extern void arm_mark_dllexport (tree
);
203 extern void arm_mark_dllimport (tree
);
206 extern void arm_pr_long_calls (struct cpp_reader
*);
207 extern void arm_pr_no_long_calls (struct cpp_reader
*);
208 extern void arm_pr_long_calls_off (struct cpp_reader
*);
210 extern void arm_lang_object_attributes_init(void);
212 extern const char *arm_mangle_type (const_tree
);
214 extern void arm_order_regs_for_local_alloc (void);
217 /* This needs to be here because we need RTX_CODE and similar. */
221 bool (*rtx_costs
) (rtx
, RTX_CODE
, RTX_CODE
, int *, bool);
222 bool (*sched_adjust_cost
) (rtx
, rtx
, rtx
, int *);
224 int num_prefetch_slots
;
226 int l1_cache_line_size
;
227 bool prefer_constant_pool
;
228 int (*branch_cost
) (bool, bool);
231 extern const struct tune_params
*current_tune
;
232 #endif /* RTX_CODE */
234 #endif /* ! GCC_ARM_PROTOS_H */