OSDN Git Service

2007-02-11 Jie Zhang <jie.zhang@analog.com>
[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 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 2, 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 GNU CC; see the file COPYING.  If not, write to
18    the Free Software Foundation, 51 Franklin Street, Fifth Floor,
19    Boston, MA 02110-1301, USA.  */
20
21 /* Function prototypes that cannot exist in bfin.h due to dependency
22    complications.  */
23 #ifndef GCC_BFIN_PROTOS_H
24 #define GCC_BFIN_PROTOS_H
25
26 /* CPU type.  */
27 typedef enum bfin_cpu
28 {
29   BFIN_CPU_BF531,
30   BFIN_CPU_BF532,
31   BFIN_CPU_BF533,
32   BFIN_CPU_BF537
33 } bfin_cpu_t;
34
35 /* Value of -mcpu= */
36 extern bfin_cpu_t bfin_cpu_type;
37
38 #define Mmode enum machine_mode
39
40 extern rtx function_arg (CUMULATIVE_ARGS *, Mmode, tree, int);
41 extern void function_arg_advance (CUMULATIVE_ARGS *, Mmode, tree, int);
42 extern bool function_arg_regno_p (int);
43
44 extern const char *output_load_immediate (rtx *);
45 extern const char *output_casesi_internal (rtx *);
46 extern char *bfin_asm_long (void);
47 extern char *bfin_asm_short (void);
48 extern int log2constp (unsigned HOST_WIDE_INT);
49
50 extern rtx legitimize_address (rtx, rtx, Mmode);
51 extern bool bfin_legitimate_constant_p (rtx);
52 extern int hard_regno_mode_ok (int, Mmode);
53 extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx);          
54 extern int bfin_frame_pointer_required (void);
55 extern HOST_WIDE_INT bfin_initial_elimination_offset (int, int);
56
57 extern int effective_address_32bit_p (rtx, Mmode);
58 extern int symbolic_reference_mentioned_p (rtx);
59 extern rtx bfin_gen_compare (rtx, Mmode);
60 extern bool expand_move (rtx *, Mmode);
61 extern void bfin_expand_call (rtx, rtx, rtx, rtx, int);
62 extern bool bfin_longcall_p (rtx, int);
63 extern bool bfin_dsp_memref_p (rtx);
64 extern bool bfin_expand_movmem (rtx, rtx, rtx, rtx);
65
66 extern void conditional_register_usage (void);
67 extern int bfin_register_move_cost (enum machine_mode, enum reg_class,
68                                     enum reg_class);
69 extern int bfin_memory_move_cost (enum machine_mode, enum reg_class, int in);
70 extern enum reg_class secondary_input_reload_class (enum reg_class, Mmode,
71                                                     rtx);
72 extern enum reg_class secondary_output_reload_class (enum reg_class, Mmode,
73                                                      rtx);
74 extern char *section_asm_op_1 (SECT_ENUM_T);
75 extern char *section_asm_op (SECT_ENUM_T);
76 extern void override_options (void);
77 extern void print_operand (FILE *,  rtx, char);
78 extern void print_address_operand (FILE *, rtx);
79 extern void split_di (rtx [], int, rtx [], rtx []);
80 extern int split_load_immediate (rtx []);
81 extern void emit_pic_move (rtx *, Mmode);
82 extern void override_options (void);
83 extern void asm_conditional_branch (rtx, rtx *, int, int);
84 extern rtx bfin_gen_compare (rtx, Mmode);
85
86 extern int bfin_return_in_memory (tree);
87 extern void initialize_trampoline (rtx, rtx, rtx);
88 extern bool bfin_legitimate_address_p (Mmode, rtx, int);
89 extern rtx bfin_va_arg (tree, tree);
90
91 extern void bfin_expand_prologue (void);
92 extern void bfin_expand_epilogue (int, int);
93 extern int push_multiple_operation (rtx, Mmode);
94 extern int pop_multiple_operation (rtx, Mmode);
95 extern void output_push_multiple (rtx, rtx *);
96 extern void output_pop_multiple (rtx, rtx *);
97 extern int bfin_hard_regno_rename_ok (unsigned int, unsigned int);
98 extern rtx bfin_return_addr_rtx (int);
99 extern void bfin_hardware_loop (void);
100 #undef  Mmode 
101
102 #endif
103