1 /* Prototypes for exported functions defined in arm.c and pe.c
2 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
3 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 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_ARM_PROTOS_H
25 #define GCC_ARM_PROTOS_H
27 extern void arm_override_options (void);
28 extern int use_return_insn (int, rtx
);
29 extern int arm_regno_class (int);
30 extern void arm_load_pic_register (void);
31 extern int arm_volatile_func (void);
32 extern const char *arm_output_epilogue (rtx
);
33 extern void arm_expand_prologue (void);
34 extern const char *arm_strip_name_encoding (const char *);
35 extern void arm_asm_output_labelref (FILE *, const char *);
36 extern unsigned long arm_current_func_type (void);
37 extern HOST_WIDE_INT
arm_compute_initial_elimination_offset (unsigned int,
39 extern HOST_WIDE_INT
thumb_compute_initial_elimination_offset (unsigned int,
43 extern int arm_return_in_memory (tree
);
44 extern void arm_encode_call_attribute (tree
, int);
47 extern bool arm_vector_mode_supported_p (enum machine_mode
);
48 extern int arm_hard_regno_mode_ok (unsigned int, enum machine_mode
);
49 extern int const_ok_for_arm (HOST_WIDE_INT
);
50 extern int arm_split_constant (RTX_CODE
, enum machine_mode
, rtx
,
51 HOST_WIDE_INT
, rtx
, rtx
, int);
52 extern RTX_CODE
arm_canonicalize_comparison (RTX_CODE
, rtx
*);
53 extern int legitimate_pic_operand_p (rtx
);
54 extern rtx
legitimize_pic_address (rtx
, enum machine_mode
, rtx
);
55 extern int arm_legitimate_address_p (enum machine_mode
, rtx
, RTX_CODE
, int);
56 extern int thumb_legitimate_address_p (enum machine_mode
, rtx
, int);
57 extern int thumb_legitimate_offset_p (enum machine_mode
, HOST_WIDE_INT
);
58 extern rtx
arm_legitimize_address (rtx
, rtx
, enum machine_mode
);
59 extern rtx
thumb_legitimize_address (rtx
, rtx
, enum machine_mode
);
60 extern int arm_const_double_rtx (rtx
);
61 extern int neg_const_double_rtx_ok_for_fpa (rtx
);
62 extern enum reg_class
vfp_secondary_reload_class (enum machine_mode
, rtx
);
65 extern int s_register_operand (rtx
, enum machine_mode
);
66 extern int arm_hard_register_operand (rtx
, enum machine_mode
);
67 extern int arm_general_register_operand (rtx
, enum machine_mode
);
68 extern int f_register_operand (rtx
, enum machine_mode
);
69 extern int reg_or_int_operand (rtx
, enum machine_mode
);
70 extern int arm_reload_memory_operand (rtx
, enum machine_mode
);
71 extern int arm_rhs_operand (rtx
, enum machine_mode
);
72 extern int arm_rhsm_operand (rtx
, enum machine_mode
);
73 extern int arm_add_operand (rtx
, enum machine_mode
);
74 extern int arm_addimm_operand (rtx
, enum machine_mode
);
75 extern int arm_not_operand (rtx
, enum machine_mode
);
76 extern int arm_extendqisi_mem_op (rtx
, enum machine_mode
);
77 extern int offsettable_memory_operand (rtx
, enum machine_mode
);
78 extern int alignable_memory_operand (rtx
, enum machine_mode
);
79 extern int arm_float_rhs_operand (rtx
, enum machine_mode
);
80 extern int arm_float_add_operand (rtx
, enum machine_mode
);
81 extern int power_of_two_operand (rtx
, enum machine_mode
);
82 extern int nonimmediate_di_operand (rtx
, enum machine_mode
);
83 extern int di_operand (rtx
, enum machine_mode
);
84 extern int nonimmediate_soft_df_operand (rtx
, enum machine_mode
);
85 extern int soft_df_operand (rtx
, enum machine_mode
);
86 extern int index_operand (rtx
, enum machine_mode
);
87 extern int const_shift_operand (rtx
, enum machine_mode
);
88 extern int arm_comparison_operator (rtx
, enum machine_mode
);
89 extern int shiftable_operator (rtx
, enum machine_mode
);
90 extern int shift_operator (rtx
, enum machine_mode
);
91 extern int equality_operator (rtx
, enum machine_mode
);
92 extern int minmax_operator (rtx
, enum machine_mode
);
93 extern int cc_register (rtx
, enum machine_mode
);
94 extern int dominant_cc_register (rtx
, enum machine_mode
);
95 extern int logical_binary_operator (rtx
, enum machine_mode
);
96 extern int multi_register_push (rtx
, enum machine_mode
);
97 extern int load_multiple_operation (rtx
, enum machine_mode
);
98 extern int store_multiple_operation (rtx
, enum machine_mode
);
99 extern int cirrus_fp_register (rtx
, enum machine_mode
);
100 extern int cirrus_general_operand (rtx
, enum machine_mode
);
101 extern int cirrus_register_operand (rtx
, enum machine_mode
);
102 extern int cirrus_shift_const (rtx
, enum machine_mode
);
103 extern int cirrus_memory_offset (rtx
);
104 extern int arm_coproc_mem_operand (rtx
, bool);
105 extern int vfp_compare_operand (rtx
, enum machine_mode
);
106 extern int arm_float_compare_operand (rtx
, enum machine_mode
);
107 extern int arm_no_early_store_addr_dep (rtx
, rtx
);
108 extern int arm_no_early_alu_shift_dep (rtx
, rtx
);
109 extern int arm_no_early_alu_shift_value_dep (rtx
, rtx
);
110 extern int arm_no_early_mul_dep (rtx
, rtx
);
112 extern int symbol_mentioned_p (rtx
);
113 extern int label_mentioned_p (rtx
);
114 extern RTX_CODE
minmax_code (rtx
);
115 extern int adjacent_mem_locations (rtx
, rtx
);
116 extern int load_multiple_sequence (rtx
*, int, int *, int *, HOST_WIDE_INT
*);
117 extern const char *emit_ldm_seq (rtx
*, int);
118 extern int store_multiple_sequence (rtx
*, int, int *, int *, HOST_WIDE_INT
*);
119 extern const char * emit_stm_seq (rtx
*, int);
120 extern rtx
arm_gen_load_multiple (int, int, rtx
, int, int,
121 rtx
, HOST_WIDE_INT
*);
122 extern rtx
arm_gen_store_multiple (int, int, rtx
, int, int,
123 rtx
, HOST_WIDE_INT
*);
124 extern int arm_gen_movmemqi (rtx
*);
125 extern rtx
arm_gen_rotated_half_load (rtx
);
126 extern enum machine_mode
arm_select_cc_mode (RTX_CODE
, rtx
, rtx
);
127 extern enum machine_mode
arm_select_dominance_cc_mode (rtx
, rtx
,
129 extern rtx
arm_gen_compare_reg (RTX_CODE
, rtx
, rtx
);
130 extern rtx
arm_gen_return_addr_mask (void);
131 extern void arm_reload_in_hi (rtx
*);
132 extern void arm_reload_out_hi (rtx
*);
133 extern const char *fp_immediate_constant (rtx
);
134 extern const char *output_call (rtx
*);
135 extern const char *output_call_mem (rtx
*);
136 extern const char *output_mov_long_double_fpa_from_arm (rtx
*);
137 extern const char *output_mov_long_double_arm_from_fpa (rtx
*);
138 extern const char *output_mov_long_double_arm_from_arm (rtx
*);
139 extern const char *output_mov_double_fpa_from_arm (rtx
*);
140 extern const char *output_mov_double_arm_from_fpa (rtx
*);
141 extern const char *output_move_double (rtx
*);
142 extern const char *output_mov_immediate (rtx
*);
143 extern const char *output_add_immediate (rtx
*);
144 extern const char *arithmetic_instr (rtx
, int);
145 extern void output_ascii_pseudo_op (FILE *, const unsigned char *, int);
146 extern const char *output_return_instruction (rtx
, int, int);
147 extern void arm_poke_function_name (FILE *, const char *);
148 extern void arm_print_operand (FILE *, rtx
, int);
149 extern void arm_print_operand_address (FILE *, rtx
);
150 extern void arm_final_prescan_insn (rtx
);
151 extern int arm_go_if_legitimate_address (enum machine_mode
, rtx
);
152 extern int arm_debugger_arg_offset (int, rtx
);
153 extern int arm_is_longcall_p (rtx
, int, int);
154 extern int arm_emit_vector_const (FILE *, rtx
);
155 extern const char * arm_output_load_gr (rtx
*);
156 extern const char *vfp_output_fstmx (rtx
*);
157 extern void arm_set_return_address (rtx
, rtx
);
159 #if defined TREE_CODE
160 extern rtx
arm_function_arg (CUMULATIVE_ARGS
*, enum machine_mode
, tree
, int);
161 extern void arm_init_cumulative_args (CUMULATIVE_ARGS
*, tree
, rtx
, tree
);
162 extern bool arm_needs_doubleword_align (enum machine_mode
, tree
);
163 extern rtx
arm_function_value(tree
, tree
);
166 #if defined AOF_ASSEMBLER
167 extern rtx
aof_pic_entry (rtx
);
168 extern char *aof_text_section (void);
169 extern char *aof_data_section (void);
170 extern void aof_add_import (const char *);
171 extern void aof_delete_import (const char *);
172 extern void zero_init_section (void);
173 extern void common_section (void);
174 #endif /* AOF_ASSEMBLER */
176 #endif /* RTX_CODE */
178 extern int arm_float_words_big_endian (void);
180 /* Thumb functions. */
181 extern void arm_init_expanders (void);
182 extern const char *thumb_unexpanded_epilogue (void);
183 extern void thumb_expand_prologue (void);
184 extern void thumb_expand_epilogue (void);
186 extern int is_called_in_ARM_mode (tree
);
188 extern int thumb_shiftable_const (unsigned HOST_WIDE_INT
);
190 extern void thumb_final_prescan_insn (rtx
);
191 extern const char *thumb_load_double_from_address (rtx
*);
192 extern const char *thumb_output_move_mem_multiple (int, rtx
*);
193 extern void thumb_expand_movmemqi (rtx
*);
194 extern int thumb_cmp_operand (rtx
, enum machine_mode
);
195 extern int thumb_cbrch_target_operand (rtx
, enum machine_mode
);
196 extern rtx
*thumb_legitimize_pic_address (rtx
, enum machine_mode
, rtx
);
197 extern int thumb_go_if_legitimate_address (enum machine_mode
, rtx
);
198 extern rtx
arm_return_addr (int, rtx
);
199 extern void thumb_reload_out_hi (rtx
*);
200 extern void thumb_reload_in_hi (rtx
*);
201 extern void thumb_set_return_address (rtx
, rtx
);
204 /* Defined in pe.c. */
205 extern int arm_dllexport_name_p (const char *);
206 extern int arm_dllimport_name_p (const char *);
209 extern void arm_pe_unique_section (tree
, int);
210 extern void arm_pe_encode_section_info (tree
, rtx
, int);
211 extern int arm_dllexport_p (tree
);
212 extern int arm_dllimport_p (tree
);
213 extern void arm_mark_dllexport (tree
);
214 extern void arm_mark_dllimport (tree
);
217 extern void arm_pr_long_calls (struct cpp_reader
*);
218 extern void arm_pr_no_long_calls (struct cpp_reader
*);
219 extern void arm_pr_long_calls_off (struct cpp_reader
*);
221 #endif /* ! GCC_ARM_PROTOS_H */