OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / config / bfin / bfin-protos.h
1 /* Prototypes for Blackfin functions used in the md file & elsewhere.
2    Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
3
4    This file is part of GNU CC.
5
6    GNU CC is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 3, or (at your option)
9    any later version.
10
11    GNU CC is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with GCC; see the file COPYING3.  If not see
18    <http://www.gnu.org/licenses/>.  */
19
20 /* Function prototypes that cannot exist in bfin.h due to dependency
21    complications.  */
22 #ifndef GCC_BFIN_PROTOS_H
23 #define GCC_BFIN_PROTOS_H
24
25 /* CPU type.  */
26 typedef enum bfin_cpu_type
27 {
28   BFIN_CPU_BF522,
29   BFIN_CPU_BF523,
30   BFIN_CPU_BF524,
31   BFIN_CPU_BF525,
32   BFIN_CPU_BF526,
33   BFIN_CPU_BF527,
34   BFIN_CPU_BF531,
35   BFIN_CPU_BF532,
36   BFIN_CPU_BF533,
37   BFIN_CPU_BF534,
38   BFIN_CPU_BF536,
39   BFIN_CPU_BF537,
40   BFIN_CPU_BF538,
41   BFIN_CPU_BF539,
42   BFIN_CPU_BF542,
43   BFIN_CPU_BF544,
44   BFIN_CPU_BF547,
45   BFIN_CPU_BF548,
46   BFIN_CPU_BF549,
47   BFIN_CPU_BF561
48 } bfin_cpu_t;
49
50 /* Value of -mcpu= */
51 extern bfin_cpu_t bfin_cpu_type;
52
53 /* Value of -msi-revision= */
54 extern int bfin_si_revision;
55
56 extern unsigned int bfin_workarounds;
57
58 /* For the anomaly 05-00-0245 */
59 #define WA_SPECULATIVE_LOADS 0x00000001
60 #define ENABLE_WA_SPECULATIVE_LOADS \
61   (bfin_workarounds & WA_SPECULATIVE_LOADS)
62
63 /* For the anomaly 05-00-0244 */
64 #define WA_SPECULATIVE_SYNCS 0x00000002
65 #define ENABLE_WA_SPECULATIVE_SYNCS \
66   (bfin_workarounds & WA_SPECULATIVE_SYNCS)
67
68
69 #define Mmode enum machine_mode
70
71 extern rtx function_arg (CUMULATIVE_ARGS *, Mmode, tree, int);
72 extern void function_arg_advance (CUMULATIVE_ARGS *, Mmode, tree, int);
73 extern bool function_arg_regno_p (int);
74
75 extern const char *output_load_immediate (rtx *);
76 extern const char *output_casesi_internal (rtx *);
77 extern char *bfin_asm_long (void);
78 extern char *bfin_asm_short (void);
79 extern int log2constp (unsigned HOST_WIDE_INT);
80
81 extern rtx legitimize_address (rtx, rtx, Mmode);
82 extern bool bfin_legitimate_constant_p (rtx);
83 extern int hard_regno_mode_ok (int, Mmode);
84 extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx);          
85 extern int bfin_frame_pointer_required (void);
86 extern HOST_WIDE_INT bfin_initial_elimination_offset (int, int);
87
88 extern int effective_address_32bit_p (rtx, Mmode);
89 extern int symbolic_reference_mentioned_p (rtx);
90 extern rtx bfin_gen_compare (rtx, Mmode);
91 extern bool expand_move (rtx *, Mmode);
92 extern void bfin_expand_call (rtx, rtx, rtx, rtx, int);
93 extern bool bfin_longcall_p (rtx, int);
94 extern bool bfin_dsp_memref_p (rtx);
95 extern bool bfin_expand_movmem (rtx, rtx, rtx, rtx);
96
97 extern void conditional_register_usage (void);
98 extern int bfin_register_move_cost (enum machine_mode, enum reg_class,
99                                     enum reg_class);
100 extern int bfin_memory_move_cost (enum machine_mode, enum reg_class, int in);
101 extern enum reg_class secondary_input_reload_class (enum reg_class, Mmode,
102                                                     rtx);
103 extern enum reg_class secondary_output_reload_class (enum reg_class, Mmode,
104                                                      rtx);
105 extern char *section_asm_op_1 (SECT_ENUM_T);
106 extern char *section_asm_op (SECT_ENUM_T);
107 extern void override_options (void);
108 extern void print_operand (FILE *,  rtx, char);
109 extern void print_address_operand (FILE *, rtx);
110 extern void split_di (rtx [], int, rtx [], rtx []);
111 extern int split_load_immediate (rtx []);
112 extern void emit_pic_move (rtx *, Mmode);
113 extern void override_options (void);
114 extern void asm_conditional_branch (rtx, rtx *, int, int);
115 extern rtx bfin_gen_compare (rtx, Mmode);
116
117 extern int bfin_local_alignment (tree, int);
118 extern int bfin_return_in_memory (const_tree);
119 extern void initialize_trampoline (rtx, rtx, rtx);
120 extern bool bfin_legitimate_address_p (Mmode, rtx, int);
121 extern rtx bfin_va_arg (tree, tree);
122
123 extern void bfin_expand_prologue (void);
124 extern void bfin_expand_epilogue (int, int, bool);
125 extern int push_multiple_operation (rtx, Mmode);
126 extern int pop_multiple_operation (rtx, Mmode);
127 extern void output_push_multiple (rtx, rtx *);
128 extern void output_pop_multiple (rtx, rtx *);
129 extern int bfin_hard_regno_rename_ok (unsigned int, unsigned int);
130 extern rtx bfin_return_addr_rtx (int);
131 extern void bfin_hardware_loop (void);
132 #undef  Mmode 
133
134 #endif
135