]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/arm/arm-protos.h
gcc/
[thirdparty/gcc.git] / gcc / config / arm / arm-protos.h
CommitLineData
5d3f468b 1/* Prototypes for exported functions defined in arm.c and pe.c
25f905c2 2 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
a2cd141b 3 Free Software Foundation, Inc.
5d3f468b 4 Contributed by Richard Earnshaw (rearnsha@arm.com)
5 Minor hacks by Nick Clifton (nickc@cygnus.com)
6
acf6ed70 7 This file is part of GCC.
5d3f468b 8
acf6ed70 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)
12 any later version.
5d3f468b 13
acf6ed70 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.
5d3f468b 18
acf6ed70 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
dbddc6c4 21 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
22 Boston, MA 02110-1301, USA. */
5d3f468b 23
1fcd08b1 24#ifndef GCC_ARM_PROTOS_H
25#define GCC_ARM_PROTOS_H
26
ebd88a36 27extern void arm_override_options (void);
ffc9d00c 28extern int use_return_insn (int, rtx);
ebd88a36 29extern int arm_regno_class (int);
aa6af490 30extern void arm_load_pic_register (unsigned long);
ebd88a36 31extern int arm_volatile_func (void);
ffc9d00c 32extern const char *arm_output_epilogue (rtx);
ebd88a36 33extern void arm_expand_prologue (void);
ebd88a36 34extern const char *arm_strip_name_encoding (const char *);
35extern void arm_asm_output_labelref (FILE *, const char *);
25f905c2 36extern void thumb2_asm_output_opcode (FILE *);
ebd88a36 37extern unsigned long arm_current_func_type (void);
30e9913f 38extern HOST_WIDE_INT arm_compute_initial_elimination_offset (unsigned int,
39 unsigned int);
f9273c43 40extern HOST_WIDE_INT thumb_compute_initial_elimination_offset (unsigned int,
41 unsigned int);
5f9d1097 42extern unsigned int arm_dbx_register_number (unsigned int);
1774763d 43extern void arm_output_fn_unwind (FILE *, bool);
44
5d3f468b 45
46#ifdef TREE_CODE
ebd88a36 47extern int arm_return_in_memory (tree);
5d3f468b 48#endif
5d3f468b 49#ifdef RTX_CODE
9e7454d0 50extern bool arm_vector_mode_supported_p (enum machine_mode);
ebd88a36 51extern int arm_hard_regno_mode_ok (unsigned int, enum machine_mode);
52extern int const_ok_for_arm (HOST_WIDE_INT);
96f57e36 53extern int arm_split_constant (RTX_CODE, enum machine_mode, rtx,
54 HOST_WIDE_INT, rtx, rtx, int);
aa3c2d40 55extern RTX_CODE arm_canonicalize_comparison (RTX_CODE, enum machine_mode,
56 rtx *);
ebd88a36 57extern int legitimate_pic_operand_p (rtx);
58extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
f655717d 59extern rtx legitimize_tls_address (rtx, rtx);
b4e8a300 60extern int arm_legitimate_address_p (enum machine_mode, rtx, RTX_CODE, int);
25f905c2 61extern int thumb1_legitimate_address_p (enum machine_mode, rtx, int);
62extern int thumb2_legitimate_address_p (enum machine_mode, rtx, int);
ebd88a36 63extern int thumb_legitimate_offset_p (enum machine_mode, HOST_WIDE_INT);
64extern rtx arm_legitimize_address (rtx, rtx, enum machine_mode);
bca653c5 65extern rtx thumb_legitimize_address (rtx, rtx, enum machine_mode);
5ede62f6 66extern rtx thumb_legitimize_reload_address (rtx *, enum machine_mode, int, int,
67 int);
a2cd141b 68extern int arm_const_double_rtx (rtx);
ebd88a36 69extern int neg_const_double_rtx_ok_for_fpa (rtx);
b5a0636d 70extern int vfp3_const_double_rtx (rtx);
d98a3884 71extern int neon_immediate_valid_for_move (rtx, enum machine_mode, rtx *, int *);
72extern int neon_immediate_valid_for_logic (rtx, enum machine_mode, int, rtx *,
73 int *);
74extern char *neon_output_logic_immediate (const char *, rtx *,
75 enum machine_mode, int, int);
76extern void neon_pairwise_reduce (rtx, rtx, enum machine_mode,
77 rtx (*) (rtx, rtx, rtx));
78extern void neon_expand_vector_init (rtx, rtx);
79extern void neon_reinterpret (rtx, rtx);
80extern void neon_emit_pair_result_insn (enum machine_mode,
81 rtx (*) (rtx, rtx, rtx, rtx),
82 rtx, rtx, rtx);
83extern void neon_disambiguate_copy (rtx *, rtx *, rtx *, unsigned int);
f1225f6f 84extern enum reg_class coproc_secondary_reload_class (enum machine_mode, rtx,
85 bool);
f655717d 86extern bool arm_tls_referenced_p (rtx);
e348ff3e 87extern bool arm_cannot_force_const_mem (rtx);
cffb2a26 88
ebd88a36 89extern int cirrus_memory_offset (rtx);
a8a3b539 90extern int arm_coproc_mem_operand (rtx, bool);
d98a3884 91extern int neon_vector_mem_operand (rtx, bool);
92extern int neon_struct_mem_operand (rtx);
a2cd141b 93extern int arm_no_early_store_addr_dep (rtx, rtx);
94extern int arm_no_early_alu_shift_dep (rtx, rtx);
95extern int arm_no_early_alu_shift_value_dep (rtx, rtx);
96extern int arm_no_early_mul_dep (rtx, rtx);
bcaec148 97extern int arm_mac_accumulator_is_mul_result (rtx, rtx);
ebd88a36 98
f655717d 99extern int tls_mentioned_p (rtx);
ebd88a36 100extern int symbol_mentioned_p (rtx);
101extern int label_mentioned_p (rtx);
102extern RTX_CODE minmax_code (rtx);
103extern int adjacent_mem_locations (rtx, rtx);
104extern int load_multiple_sequence (rtx *, int, int *, int *, HOST_WIDE_INT *);
105extern const char *emit_ldm_seq (rtx *, int);
106extern int store_multiple_sequence (rtx *, int, int *, int *, HOST_WIDE_INT *);
107extern const char * emit_stm_seq (rtx *, int);
9580c25f 108extern rtx arm_gen_load_multiple (int, int, rtx, int, int,
109 rtx, HOST_WIDE_INT *);
110extern rtx arm_gen_store_multiple (int, int, rtx, int, int,
111 rtx, HOST_WIDE_INT *);
008c057d 112extern int arm_gen_movmemqi (rtx *);
ebd88a36 113extern enum machine_mode arm_select_cc_mode (RTX_CODE, rtx, rtx);
114extern enum machine_mode arm_select_dominance_cc_mode (rtx, rtx,
115 HOST_WIDE_INT);
116extern rtx arm_gen_compare_reg (RTX_CODE, rtx, rtx);
117extern rtx arm_gen_return_addr_mask (void);
118extern void arm_reload_in_hi (rtx *);
119extern void arm_reload_out_hi (rtx *);
359a6e9f 120extern int arm_const_double_inline_cost (rtx);
e5ba9289 121extern bool arm_const_double_by_parts (rtx);
ebd88a36 122extern const char *fp_immediate_constant (rtx);
bac7fc85 123extern void arm_emit_call_insn (rtx, rtx);
ebd88a36 124extern const char *output_call (rtx *);
125extern const char *output_call_mem (rtx *);
126extern const char *output_mov_long_double_fpa_from_arm (rtx *);
127extern const char *output_mov_long_double_arm_from_fpa (rtx *);
128extern const char *output_mov_long_double_arm_from_arm (rtx *);
129extern const char *output_mov_double_fpa_from_arm (rtx *);
130extern const char *output_mov_double_arm_from_fpa (rtx *);
131extern const char *output_move_double (rtx *);
d98a3884 132extern const char *output_move_quad (rtx *);
25f905c2 133extern const char *output_move_vfp (rtx *operands);
d98a3884 134extern const char *output_move_neon (rtx *operands);
ebd88a36 135extern const char *output_add_immediate (rtx *);
136extern const char *arithmetic_instr (rtx, int);
137extern void output_ascii_pseudo_op (FILE *, const unsigned char *, int);
138extern const char *output_return_instruction (rtx, int, int);
139extern void arm_poke_function_name (FILE *, const char *);
140extern void arm_print_operand (FILE *, rtx, int);
141extern void arm_print_operand_address (FILE *, rtx);
142extern void arm_final_prescan_insn (rtx);
ebd88a36 143extern int arm_debugger_arg_offset (int, rtx);
de55252a 144extern bool arm_is_long_call_p (tree);
755eb2b4 145extern int arm_emit_vector_const (FILE *, rtx);
146extern const char * arm_output_load_gr (rtx *);
382a2a57 147extern const char *vfp_output_fstmd (rtx *);
4c44712e 148extern void arm_set_return_address (rtx, rtx);
841b213d 149extern int arm_eliminable_register (rtx);
25f905c2 150extern const char *arm_output_shift(rtx *, int);
cffb2a26 151
f655717d 152extern bool arm_output_addr_const_extra (FILE *, rtx);
153
cffb2a26 154#if defined TREE_CODE
ebd88a36 155extern rtx arm_function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
156extern void arm_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree);
46b5d878 157extern bool arm_pad_arg_upward (enum machine_mode, tree);
158extern bool arm_pad_reg_upward (enum machine_mode, tree, int);
f9273c43 159extern bool arm_needs_doubleword_align (enum machine_mode, tree);
19347327 160extern rtx arm_function_value(tree, tree);
cffb2a26 161#endif
ccd90aaa 162extern int arm_apply_result_size (void);
cffb2a26 163
9e7454d0 164#if defined AOF_ASSEMBLER
ebd88a36 165extern rtx aof_pic_entry (rtx);
ebd88a36 166extern void aof_add_import (const char *);
167extern void aof_delete_import (const char *);
168extern void zero_init_section (void);
5d3f468b 169#endif /* AOF_ASSEMBLER */
170
5d3f468b 171#endif /* RTX_CODE */
172
ebd88a36 173extern int arm_float_words_big_endian (void);
3d94d3fa 174
cffb2a26 175/* Thumb functions. */
ebd88a36 176extern void arm_init_expanders (void);
ebd88a36 177extern const char *thumb_unexpanded_epilogue (void);
25f905c2 178extern void thumb1_expand_prologue (void);
179extern void thumb1_expand_epilogue (void);
cffb2a26 180#ifdef TREE_CODE
ebd88a36 181extern int is_called_in_ARM_mode (tree);
cffb2a26 182#endif
ebd88a36 183extern int thumb_shiftable_const (unsigned HOST_WIDE_INT);
0bd59681 184#ifdef RTX_CODE
25f905c2 185extern void thumb1_final_prescan_insn (rtx);
186extern void thumb2_final_prescan_insn (rtx);
ebd88a36 187extern const char *thumb_load_double_from_address (rtx *);
188extern const char *thumb_output_move_mem_multiple (int, rtx *);
afe27f3b 189extern const char *thumb_call_via_reg (rtx);
008c057d 190extern void thumb_expand_movmemqi (rtx *);
ebd88a36 191extern rtx arm_return_addr (int, rtx);
192extern void thumb_reload_out_hi (rtx *);
193extern void thumb_reload_in_hi (rtx *);
4c44712e 194extern void thumb_set_return_address (rtx, rtx);
25f905c2 195extern const char *thumb2_output_casesi(rtx *);
cffb2a26 196#endif
197
198/* Defined in pe.c. */
ebd88a36 199extern int arm_dllexport_name_p (const char *);
200extern int arm_dllimport_name_p (const char *);
cffb2a26 201
202#ifdef TREE_CODE
ebd88a36 203extern void arm_pe_unique_section (tree, int);
204extern void arm_pe_encode_section_info (tree, rtx, int);
205extern int arm_dllexport_p (tree);
206extern int arm_dllimport_p (tree);
207extern void arm_mark_dllexport (tree);
208extern void arm_mark_dllimport (tree);
cffb2a26 209#endif
1fcd08b1 210
ebd88a36 211extern void arm_pr_long_calls (struct cpp_reader *);
212extern void arm_pr_no_long_calls (struct cpp_reader *);
213extern void arm_pr_long_calls_off (struct cpp_reader *);
1fcd08b1 214
eddcdde1 215extern const char *arm_mangle_type (tree);
216
2a281353 217#endif /* ! GCC_ARM_PROTOS_H */