OSDN Git Service

b248da9d544d8e1345125d190f66bc5a9e48f02d
[pf3gnuchains/gcc-fork.git] / gcc / config / xtensa / xtensa-protos.h
1 /* Prototypes of target machine for GNU compiler for Xtensa.
2    Copyright 2001,2002,2003 Free Software Foundation, Inc.
3    Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica.
4
5 This file is part of GCC.
6
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
10 version.
11
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING.  If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA.  */
21
22 #ifndef __XTENSA_PROTOS_H__
23 #define __XTENSA_PROTOS_H__
24
25 /* Functions to test whether an immediate fits in a given field. */
26 extern int xtensa_simm7 PARAMS ((int));
27 extern int xtensa_simm8 PARAMS ((int));
28 extern int xtensa_simm8x256 PARAMS ((int));
29 extern int xtensa_simm12b PARAMS ((int));
30 extern int xtensa_uimm8 PARAMS ((int));
31 extern int xtensa_uimm8x2 PARAMS ((int));
32 extern int xtensa_uimm8x4 PARAMS ((int));
33 extern int xtensa_ai4const PARAMS ((int));
34 extern int xtensa_lsi4x4 PARAMS ((int));
35 extern int xtensa_b4const PARAMS ((int));
36 extern int xtensa_b4constu PARAMS ((int));
37 extern int xtensa_tp7 PARAMS ((int));
38
39 /* Functions within xtensa.c that we reference.  */
40 #ifdef RTX_CODE
41 extern int xt_true_regnum PARAMS ((rtx));
42 extern int add_operand PARAMS ((rtx, enum machine_mode));
43 extern int arith_operand PARAMS ((rtx, enum machine_mode));
44 extern int nonimmed_operand PARAMS ((rtx, enum machine_mode));
45 extern int mem_operand PARAMS ((rtx, enum machine_mode));
46 extern int xtensa_valid_move PARAMS ((enum machine_mode, rtx *operands));
47 extern int mask_operand PARAMS ((rtx, enum machine_mode));
48 extern int extui_fldsz_operand PARAMS ((rtx, enum machine_mode));
49 extern int sext_operand PARAMS ((rtx, enum machine_mode));
50 extern int sext_fldsz_operand PARAMS ((rtx, enum machine_mode));
51 extern int lsbitnum_operand PARAMS ((rtx, enum machine_mode));
52 extern int branch_operand PARAMS ((rtx, enum machine_mode));
53 extern int ubranch_operand PARAMS ((rtx, enum machine_mode));
54 extern int call_insn_operand PARAMS ((rtx, enum machine_mode));
55 extern int move_operand PARAMS ((rtx, enum machine_mode));
56 extern int smalloffset_mem_p PARAMS ((rtx));
57 extern int smalloffset_double_mem_p PARAMS ((rtx));
58 extern int constantpool_address_p PARAMS ((rtx));
59 extern int constantpool_mem_p PARAMS ((rtx));
60 extern int non_const_move_operand PARAMS ((rtx, enum machine_mode));
61 extern int const_float_1_operand PARAMS ((rtx, enum machine_mode));
62 extern int fpmem_offset_operand PARAMS ((rtx, enum machine_mode));
63 extern void xtensa_extend_reg PARAMS ((rtx, rtx));
64 extern void xtensa_load_constant PARAMS ((rtx, rtx));
65 extern int branch_operator PARAMS ((rtx, enum machine_mode));
66 extern int ubranch_operator PARAMS ((rtx, enum machine_mode));
67 extern int boolean_operator PARAMS ((rtx, enum machine_mode));
68 extern void xtensa_expand_conditional_branch PARAMS ((rtx *, enum rtx_code));
69 extern int xtensa_expand_conditional_move PARAMS ((rtx *, int));
70 extern int xtensa_expand_scc PARAMS ((rtx *));
71 extern int xtensa_expand_block_move PARAMS ((rtx *));
72 extern int xtensa_emit_move_sequence PARAMS ((rtx *, enum machine_mode));
73 extern bool xtensa_copy_incoming_a7 PARAMS ((rtx *, enum machine_mode));
74 extern void xtensa_emit_block_move PARAMS ((rtx *, rtx *, int));
75 extern void xtensa_expand_nonlocal_goto PARAMS ((rtx *));
76 extern void xtensa_emit_loop_end PARAMS ((rtx, rtx *));
77 extern char * xtensa_emit_call PARAMS ((int, rtx *));
78
79 #ifdef TREE_CODE
80 extern void init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, rtx));
81 extern void xtensa_va_start PARAMS ((tree, rtx));
82 extern rtx xtensa_va_arg PARAMS ((tree, tree));
83 #endif /* TREE_CODE */
84
85 extern void print_operand PARAMS ((FILE *, rtx, int));
86 extern void print_operand_address PARAMS ((FILE *, rtx));
87 extern void xtensa_output_literal
88   PARAMS ((FILE *, rtx, enum machine_mode, int labelno));
89 extern void xtensa_reorg PARAMS ((rtx));
90 extern rtx xtensa_return_addr PARAMS ((int, rtx));
91 extern rtx xtensa_builtin_saveregs PARAMS ((void));
92 extern enum reg_class xtensa_preferred_reload_class
93   PARAMS ((rtx, enum reg_class, int));
94 extern enum reg_class xtensa_secondary_reload_class
95   PARAMS ((enum reg_class, enum machine_mode, rtx, int));
96 extern int a7_overlap_mentioned_p PARAMS ((rtx x));
97 #endif /* RTX_CODE */
98
99 #ifdef TREE_CODE
100 extern void function_arg_advance
101   PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree));
102 extern struct rtx_def * function_arg
103   PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int));
104 extern tree xtensa_build_va_list PARAMS ((void));
105 #endif /* TREE_CODE */
106
107 extern int xtensa_mask_immediate PARAMS ((int));
108 extern int xtensa_mem_offset PARAMS ((unsigned, enum machine_mode));
109 extern void xtensa_setup_frame_addresses PARAMS ((void));
110 extern int xtensa_dbx_register_number PARAMS ((int));
111 extern void override_options PARAMS ((void));
112 extern long compute_frame_size PARAMS ((int));
113 extern int xtensa_frame_pointer_required PARAMS ((void));
114 extern void xtensa_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
115 extern void xtensa_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
116 extern void order_regs_for_local_alloc PARAMS ((void));
117
118 #endif /* !__XTENSA_PROTOS_H__ */