OSDN Git Service

* config/xtensa/xtensa.c (function_arg): Handle 16-byte aligned args.
[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, 2004 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 (int);
27 extern int xtensa_simm8 (int);
28 extern int xtensa_simm8x256 (int);
29 extern int xtensa_simm12b (int);
30 extern int xtensa_uimm8 (int);
31 extern int xtensa_uimm8x2 (int);
32 extern int xtensa_uimm8x4 (int);
33 extern int xtensa_ai4const (int);
34 extern int xtensa_lsi4x4 (int);
35 extern int xtensa_b4const (int);
36 extern int xtensa_b4constu (int);
37 extern int xtensa_tp7 (int);
38
39 /* Functions within xtensa.c that we reference.  */
40 #ifdef RTX_CODE
41 extern int xt_true_regnum (rtx);
42 extern int add_operand (rtx, enum machine_mode);
43 extern int arith_operand (rtx, enum machine_mode);
44 extern int nonimmed_operand (rtx, enum machine_mode);
45 extern int mem_operand (rtx, enum machine_mode);
46 extern int xtensa_valid_move (enum machine_mode, rtx *);
47 extern int mask_operand (rtx, enum machine_mode);
48 extern int extui_fldsz_operand (rtx, enum machine_mode);
49 extern int sext_operand (rtx, enum machine_mode);
50 extern int sext_fldsz_operand (rtx, enum machine_mode);
51 extern int lsbitnum_operand (rtx, enum machine_mode);
52 extern int branch_operand (rtx, enum machine_mode);
53 extern int ubranch_operand (rtx, enum machine_mode);
54 extern int call_insn_operand (rtx, enum machine_mode);
55 extern int move_operand (rtx, enum machine_mode);
56 extern int smalloffset_mem_p (rtx);
57 extern int constantpool_address_p (rtx);
58 extern int constantpool_mem_p (rtx);
59 extern int const_float_1_operand (rtx, enum machine_mode);
60 extern int fpmem_offset_operand (rtx, enum machine_mode);
61 extern void xtensa_extend_reg (rtx, rtx);
62 extern int branch_operator (rtx, enum machine_mode);
63 extern int ubranch_operator (rtx, enum machine_mode);
64 extern int boolean_operator (rtx, enum machine_mode);
65 extern void xtensa_expand_conditional_branch (rtx *, enum rtx_code);
66 extern int xtensa_expand_conditional_move (rtx *, int);
67 extern int xtensa_expand_scc (rtx *);
68 extern int xtensa_expand_block_move (rtx *);
69 extern void xtensa_split_operand_pair (rtx *, enum machine_mode);
70 extern int xtensa_emit_move_sequence (rtx *, enum machine_mode);
71 extern rtx xtensa_copy_incoming_a7 (rtx);
72 extern void xtensa_emit_block_move (rtx *, rtx *, int);
73 extern void xtensa_expand_nonlocal_goto (rtx *);
74 extern void xtensa_emit_loop_end (rtx, rtx *);
75 extern char *xtensa_emit_call (int, rtx *);
76
77 #ifdef TREE_CODE
78 extern void init_cumulative_args (CUMULATIVE_ARGS *, int);
79 extern void xtensa_va_start (tree, rtx);
80 extern rtx xtensa_va_arg (tree, tree);
81 #endif /* TREE_CODE */
82
83 extern void print_operand (FILE *, rtx, int);
84 extern void print_operand_address (FILE *, rtx);
85 extern void xtensa_output_literal (FILE *, rtx, enum machine_mode, int);
86 extern rtx xtensa_return_addr (int, rtx);
87 extern enum reg_class xtensa_preferred_reload_class (rtx, enum reg_class, int);
88 extern enum reg_class xtensa_secondary_reload_class (enum reg_class,
89                                                      enum machine_mode, rtx,
90                                                      int);
91 #endif /* RTX_CODE */
92
93 #ifdef TREE_CODE
94 extern void function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, tree);
95 extern struct rtx_def *function_arg (CUMULATIVE_ARGS *, enum machine_mode,
96                                      tree, int);
97 #endif /* TREE_CODE */
98
99 extern int xtensa_mask_immediate (int);
100 extern int xtensa_mem_offset (unsigned, enum machine_mode);
101 extern void xtensa_setup_frame_addresses (void);
102 extern int xtensa_dbx_register_number (int);
103 extern void override_options (void);
104 extern long compute_frame_size (int);
105 extern int xtensa_frame_pointer_required (void);
106 extern void xtensa_expand_prologue (void);
107 extern void order_regs_for_local_alloc (void);
108
109 #endif /* !__XTENSA_PROTOS_H__ */