2007-03-01 Paul Brook <paul@codesourcery.com>
[official-gcc.git] / gcc / config / arm / arm-protos.h
Commit [+]AuthorDateLineData
5d3f468b nickc1999-11-09 16:45:49 +00001/* Prototypes for exported functions defined in arm.c and pe.c
25f905c2 pbrook2007-01-03 23:48:10 +00002 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
a2cd141b pbrook2004-02-03 14:45:44 +00003 Free Software Foundation, Inc.
5d3f468b nickc1999-11-09 16:45:49 +00004 Contributed by Richard Earnshaw (rearnsha@arm.com)
5 Minor hacks by Nick Clifton (nickc@cygnus.com)
acf6ed70 nickc2003-02-10 16:33:09 +00007 This file is part of GCC.
5d3f468b nickc1999-11-09 16:45:49 +00008
acf6ed70 nickc2003-02-10 16:33:09 +00009 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 nickc1999-11-09 16:45:49 +000013
acf6ed70 nickc2003-02-10 16:33:09 +000014 GCC is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 GNU General Public License for more details.
5d3f468b nickc1999-11-09 16:45:49 +000018
acf6ed70 nickc2003-02-10 16:33:09 +000019 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 kcook2005-06-25 01:22:41 +000021 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
22 Boston, MA 02110-1301, USA. */
5d3f468b nickc1999-11-09 16:45:49 +000023
1fcd08b1 zack2000-09-07 22:24:34 +000024#ifndef GCC_ARM_PROTOS_H
25#define GCC_ARM_PROTOS_H
ebd88a36 rearnsha2003-06-10 18:55:17 +000027extern void arm_override_options (void);
ffc9d00c rearnsha2003-11-20 11:44:19 +000028extern int use_return_insn (int, rtx);
ebd88a36 rearnsha2003-06-10 18:55:17 +000029extern int arm_regno_class (int);
aa6af490 rearnsha2005-08-19 13:17:04 +000030extern void arm_load_pic_register (unsigned long);
ebd88a36 rearnsha2003-06-10 18:55:17 +000031extern int arm_volatile_func (void);
ffc9d00c rearnsha2003-11-20 11:44:19 +000032extern const char *arm_output_epilogue (rtx);
ebd88a36 rearnsha2003-06-10 18:55:17 +000033extern void arm_expand_prologue (void);
ebd88a36 rearnsha2003-06-10 18:55:17 +000034extern const char *arm_strip_name_encoding (const char *);
35extern void arm_asm_output_labelref (FILE *, const char *);
25f905c2 pbrook2007-01-03 23:48:10 +000036extern void thumb2_asm_output_opcode (FILE *);
ebd88a36 rearnsha2003-06-10 18:55:17 +000037extern unsigned long arm_current_func_type (void);
30e9913f mmitchel2004-08-11 02:50:14 +000038extern HOST_WIDE_INT arm_compute_initial_elimination_offset (unsigned int,
39 unsigned int);
f9273c43 pbrook2004-03-24 17:20:16 +000040extern HOST_WIDE_INT thumb_compute_initial_elimination_offset (unsigned int,
41 unsigned int);
5f9d1097 pbrook2005-03-29 03:00:27 +000042extern unsigned int arm_dbx_register_number (unsigned int);
1774763d pbrook2005-06-28 19:52:27 +000043extern void arm_output_fn_unwind (FILE *, bool);
5d3f468b nickc1999-11-09 16:45:49 +000045
46#ifdef TREE_CODE
ebd88a36 rearnsha2003-06-10 18:55:17 +000047extern int arm_return_in_memory (tree);
48extern void arm_encode_call_attribute (tree, int);
5d3f468b nickc1999-11-09 16:45:49 +000049#endif
5d3f468b nickc1999-11-09 16:45:49 +000050#ifdef RTX_CODE
9e7454d0 echristo2004-08-24 00:30:52 +000051extern bool arm_vector_mode_supported_p (enum machine_mode);
ebd88a36 rearnsha2003-06-10 18:55:17 +000052extern int arm_hard_regno_mode_ok (unsigned int, enum machine_mode);
53extern int const_ok_for_arm (HOST_WIDE_INT);
96f57e36 mmitchel2004-04-01 23:30:25 +000054extern int arm_split_constant (RTX_CODE, enum machine_mode, rtx,
55 HOST_WIDE_INT, rtx, rtx, int);
aa3c2d40 pbrook2005-07-30 00:11:27 +000056extern RTX_CODE arm_canonicalize_comparison (RTX_CODE, enum machine_mode,
57 rtx *);
ebd88a36 rearnsha2003-06-10 18:55:17 +000058extern int legitimate_pic_operand_p (rtx);
59extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
f655717d drow2005-11-04 15:02:51 +000060extern rtx legitimize_tls_address (rtx, rtx);
b4e8a300 rearnsha2004-03-13 11:19:23 +000061extern int arm_legitimate_address_p (enum machine_mode, rtx, RTX_CODE, int);
25f905c2 pbrook2007-01-03 23:48:10 +000062extern int thumb1_legitimate_address_p (enum machine_mode, rtx, int);
63extern int thumb2_legitimate_address_p (enum machine_mode, rtx, int);
ebd88a36 rearnsha2003-06-10 18:55:17 +000064extern int thumb_legitimate_offset_p (enum machine_mode, HOST_WIDE_INT);
65extern rtx arm_legitimize_address (rtx, rtx, enum machine_mode);
bca653c5 rearnsha2004-02-25 17:03:27 +000066extern rtx thumb_legitimize_address (rtx, rtx, enum machine_mode);
5ede62f6 rearnsha2005-08-19 09:20:31 +000067extern rtx thumb_legitimize_reload_address (rtx *, enum machine_mode, int, int,
68 int);
a2cd141b pbrook2004-02-03 14:45:44 +000069extern int arm_const_double_rtx (rtx);
ebd88a36 rearnsha2003-06-10 18:55:17 +000070extern int neg_const_double_rtx_ok_for_fpa (rtx);
f1225f6f pbrook2007-03-01 22:58:40 +000071extern enum reg_class coproc_secondary_reload_class (enum machine_mode, rtx,
72 bool);
f655717d drow2005-11-04 15:02:51 +000073extern bool arm_tls_referenced_p (rtx);
cffb2a26 rearnsha2000-04-08 14:29:53 +000074
ebd88a36 rearnsha2003-06-10 18:55:17 +000075extern int cirrus_memory_offset (rtx);
a8a3b539 pbrook2004-05-05 23:11:55 +000076extern int arm_coproc_mem_operand (rtx, bool);
a2cd141b pbrook2004-02-03 14:45:44 +000077extern int arm_no_early_store_addr_dep (rtx, rtx);
78extern int arm_no_early_alu_shift_dep (rtx, rtx);
79extern int arm_no_early_alu_shift_value_dep (rtx, rtx);
80extern int arm_no_early_mul_dep (rtx, rtx);
ebd88a36 rearnsha2003-06-10 18:55:17 +000081
f655717d drow2005-11-04 15:02:51 +000082extern int tls_mentioned_p (rtx);
ebd88a36 rearnsha2003-06-10 18:55:17 +000083extern int symbol_mentioned_p (rtx);
84extern int label_mentioned_p (rtx);
85extern RTX_CODE minmax_code (rtx);
86extern int adjacent_mem_locations (rtx, rtx);
87extern int load_multiple_sequence (rtx *, int, int *, int *, HOST_WIDE_INT *);
88extern const char *emit_ldm_seq (rtx *, int);
89extern int store_multiple_sequence (rtx *, int, int *, int *, HOST_WIDE_INT *);
90extern const char * emit_stm_seq (rtx *, int);
9580c25f rth2004-08-19 17:02:03 +000091extern rtx arm_gen_load_multiple (int, int, rtx, int, int,
92 rtx, HOST_WIDE_INT *);
93extern rtx arm_gen_store_multiple (int, int, rtx, int, int,
94 rtx, HOST_WIDE_INT *);
008c057d aoliva2004-07-07 19:25:01 +000095extern int arm_gen_movmemqi (rtx *);
ebd88a36 rearnsha2003-06-10 18:55:17 +000096extern enum machine_mode arm_select_cc_mode (RTX_CODE, rtx, rtx);
97extern enum machine_mode arm_select_dominance_cc_mode (rtx, rtx,
99extern rtx arm_gen_compare_reg (RTX_CODE, rtx, rtx);
100extern rtx arm_gen_return_addr_mask (void);
101extern void arm_reload_in_hi (rtx *);
102extern void arm_reload_out_hi (rtx *);
359a6e9f rearnsha2004-11-20 11:21:55 +0000103extern int arm_const_double_inline_cost (rtx);
e5ba9289 rearnsha2005-04-08 13:34:27 +0000104extern bool arm_const_double_by_parts (rtx);
ebd88a36 rearnsha2003-06-10 18:55:17 +0000105extern const char *fp_immediate_constant (rtx);
106extern const char *output_call (rtx *);
107extern const char *output_call_mem (rtx *);
108extern const char *output_mov_long_double_fpa_from_arm (rtx *);
109extern const char *output_mov_long_double_arm_from_fpa (rtx *);
110extern const char *output_mov_long_double_arm_from_arm (rtx *);
111extern const char *output_mov_double_fpa_from_arm (rtx *);
112extern const char *output_mov_double_arm_from_fpa (rtx *);
113extern const char *output_move_double (rtx *);
25f905c2 pbrook2007-01-03 23:48:10 +0000114extern const char *output_move_vfp (rtx *operands);
ebd88a36 rearnsha2003-06-10 18:55:17 +0000115extern const char *output_add_immediate (rtx *);
116extern const char *arithmetic_instr (rtx, int);
117extern void output_ascii_pseudo_op (FILE *, const unsigned char *, int);
118extern const char *output_return_instruction (rtx, int, int);
119extern void arm_poke_function_name (FILE *, const char *);
120extern void arm_print_operand (FILE *, rtx, int);
121extern void arm_print_operand_address (FILE *, rtx);
122extern void arm_final_prescan_insn (rtx);
ebd88a36 rearnsha2003-06-10 18:55:17 +0000123extern int arm_debugger_arg_offset (int, rtx);
124extern int arm_is_longcall_p (rtx, int, int);
755eb2b4 nickc2003-06-18 16:36:13 +0000125extern int arm_emit_vector_const (FILE *, rtx);
126extern const char * arm_output_load_gr (rtx *);
382a2a57 shinwell2006-12-13 17:32:47 +0000127extern const char *vfp_output_fstmd (rtx *);
4c44712e pbrook2004-08-10 16:22:47 +0000128extern void arm_set_return_address (rtx, rtx);
841b213d rearnsha2005-02-01 14:07:02 +0000129extern int arm_eliminable_register (rtx);
25f905c2 pbrook2007-01-03 23:48:10 +0000130extern const char *arm_output_shift(rtx *, int);
cffb2a26 rearnsha2000-04-08 14:29:53 +0000131
f655717d drow2005-11-04 15:02:51 +0000132extern bool arm_output_addr_const_extra (FILE *, rtx);
cffb2a26 rearnsha2000-04-08 14:29:53 +0000134#if defined TREE_CODE
ebd88a36 rearnsha2003-06-10 18:55:17 +0000135extern rtx arm_function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
136extern void arm_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree);
46b5d878 jules2005-04-26 16:30:37 +0000137extern bool arm_pad_arg_upward (enum machine_mode, tree);
138extern bool arm_pad_reg_upward (enum machine_mode, tree, int);
f9273c43 pbrook2004-03-24 17:20:16 +0000139extern bool arm_needs_doubleword_align (enum machine_mode, tree);
19347327 pbrook2004-04-08 18:26:09 +0000140extern rtx arm_function_value(tree, tree);
cffb2a26 rearnsha2000-04-08 14:29:53 +0000141#endif
ccd90aaa rearnsha2005-02-16 21:57:10 +0000142extern int arm_apply_result_size (void);
cffb2a26 rearnsha2000-04-08 14:29:53 +0000143
9e7454d0 echristo2004-08-24 00:30:52 +0000144#if defined AOF_ASSEMBLER
ebd88a36 rearnsha2003-06-10 18:55:17 +0000145extern rtx aof_pic_entry (rtx);
ebd88a36 rearnsha2003-06-10 18:55:17 +0000146extern void aof_add_import (const char *);
147extern void aof_delete_import (const char *);
148extern void zero_init_section (void);
5d3f468b nickc1999-11-09 16:45:49 +0000149#endif /* AOF_ASSEMBLER */
5d3f468b nickc1999-11-09 16:45:49 +0000151#endif /* RTX_CODE */
ebd88a36 rearnsha2003-06-10 18:55:17 +0000153extern int arm_float_words_big_endian (void);
3d94d3fa thorpej2002-09-05 16:45:24 +0000154
cffb2a26 rearnsha2000-04-08 14:29:53 +0000155/* Thumb functions. */
ebd88a36 rearnsha2003-06-10 18:55:17 +0000156extern void arm_init_expanders (void);
ebd88a36 rearnsha2003-06-10 18:55:17 +0000157extern const char *thumb_unexpanded_epilogue (void);
25f905c2 pbrook2007-01-03 23:48:10 +0000158extern void thumb1_expand_prologue (void);
159extern void thumb1_expand_epilogue (void);
cffb2a26 rearnsha2000-04-08 14:29:53 +0000160#ifdef TREE_CODE
ebd88a36 rearnsha2003-06-10 18:55:17 +0000161extern int is_called_in_ARM_mode (tree);
cffb2a26 rearnsha2000-04-08 14:29:53 +0000162#endif
ebd88a36 rearnsha2003-06-10 18:55:17 +0000163extern int thumb_shiftable_const (unsigned HOST_WIDE_INT);
0bd59681 nickc2000-05-23 20:52:58 +0000164#ifdef RTX_CODE
25f905c2 pbrook2007-01-03 23:48:10 +0000165extern void thumb1_final_prescan_insn (rtx);
166extern void thumb2_final_prescan_insn (rtx);
ebd88a36 rearnsha2003-06-10 18:55:17 +0000167extern const char *thumb_load_double_from_address (rtx *);
168extern const char *thumb_output_move_mem_multiple (int, rtx *);
afe27f3b rearnsha2005-01-14 13:58:40 +0000169extern const char *thumb_call_via_reg (rtx);
008c057d aoliva2004-07-07 19:25:01 +0000170extern void thumb_expand_movmemqi (rtx *);
ebd88a36 rearnsha2003-06-10 18:55:17 +0000171extern rtx arm_return_addr (int, rtx);
172extern void thumb_reload_out_hi (rtx *);
173extern void thumb_reload_in_hi (rtx *);
4c44712e pbrook2004-08-10 16:22:47 +0000174extern void thumb_set_return_address (rtx, rtx);
25f905c2 pbrook2007-01-03 23:48:10 +0000175extern const char *thumb2_output_casesi(rtx *);
cffb2a26 rearnsha2000-04-08 14:29:53 +0000176#endif
178/* Defined in pe.c. */
ebd88a36 rearnsha2003-06-10 18:55:17 +0000179extern int arm_dllexport_name_p (const char *);
180extern int arm_dllimport_name_p (const char *);
cffb2a26 rearnsha2000-04-08 14:29:53 +0000181
182#ifdef TREE_CODE
ebd88a36 rearnsha2003-06-10 18:55:17 +0000183extern void arm_pe_unique_section (tree, int);
184extern void arm_pe_encode_section_info (tree, rtx, int);
185extern int arm_dllexport_p (tree);
186extern int arm_dllimport_p (tree);
187extern void arm_mark_dllexport (tree);
188extern void arm_mark_dllimport (tree);
cffb2a26 rearnsha2000-04-08 14:29:53 +0000189#endif
1fcd08b1 zack2000-09-07 22:24:34 +0000190
ebd88a36 rearnsha2003-06-10 18:55:17 +0000191extern void arm_pr_long_calls (struct cpp_reader *);
192extern void arm_pr_no_long_calls (struct cpp_reader *);
193extern void arm_pr_long_calls_off (struct cpp_reader *);
1fcd08b1 zack2000-09-07 22:24:34 +0000194
2a281353 rth2001-05-26 01:31:47 +0000195#endif /* ! GCC_ARM_PROTOS_H */