2011-04-28 Tobias Burnus <burnus@net-b.de>
[official-gcc.git] / gcc / config / bfin / bfin-protos.h
blob7ee826ee9b263982e5de186582545129087582ca
1 /* Prototypes for Blackfin functions used in the md file & elsewhere.
2 Copyright (C) 2005, 2007, 2008, 2009, 2010, 2011
3 Free Software Foundation, Inc.
5 This file is part of GNU CC.
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
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
26 /* For the anomaly 05-00-0245 */
27 #define WA_SPECULATIVE_LOADS 0x00000001
28 #define ENABLE_WA_SPECULATIVE_LOADS \
29 (bfin_workarounds & WA_SPECULATIVE_LOADS)
31 /* For the anomaly 05-00-0244 */
32 #define WA_SPECULATIVE_SYNCS 0x00000002
33 #define ENABLE_WA_SPECULATIVE_SYNCS \
34 (bfin_workarounds & WA_SPECULATIVE_SYNCS)
36 /* For the anomaly 05-00-0371 */
37 #define WA_RETS 0x00000004
38 #define ENABLE_WA_RETS \
39 (bfin_workarounds & WA_RETS)
41 /* For the anomaly 05-00-0426 */
42 #define WA_INDIRECT_CALLS 0x00000008
43 #define ENABLE_WA_INDIRECT_CALLS \
44 ((bfin_workarounds & WA_INDIRECT_CALLS) && !TARGET_ICPLB)
46 #define WA_05000257 0x00000010
47 #define ENABLE_WA_05000257 \
48 (bfin_workarounds & WA_05000257)
50 #define WA_05000283 0x00000020
51 #define ENABLE_WA_05000283 \
52 (bfin_workarounds & WA_05000283)
54 #define WA_05000315 0x00000040
55 #define ENABLE_WA_05000315 \
56 (bfin_workarounds & WA_05000315)
58 /* For the anomaly 05-00-0312 */
59 #define WA_LOAD_LCREGS 0x00000080
60 #define ENABLE_WA_LOAD_LCREGS \
61 (bfin_workarounds & WA_LOAD_LCREGS)
63 #define WA_05000074 0x00000100
64 #define ENABLE_WA_05000074 \
65 (bfin_workarounds & WA_05000074)
67 extern bool function_arg_regno_p (int);
69 extern const char *output_load_immediate (rtx *);
70 extern const char *output_casesi_internal (rtx *);
71 extern char *bfin_asm_long (void);
72 extern char *bfin_asm_short (void);
73 extern int log2constp (unsigned HOST_WIDE_INT);
75 extern int hard_regno_mode_ok (int, enum machine_mode);
76 extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx);
77 extern HOST_WIDE_INT bfin_initial_elimination_offset (int, int);
79 extern int effective_address_32bit_p (rtx, enum machine_mode);
80 extern int symbolic_reference_mentioned_p (rtx);
81 extern rtx bfin_gen_compare (rtx, enum machine_mode);
82 extern bool expand_move (rtx *, enum machine_mode);
83 extern void bfin_expand_call (rtx, rtx, rtx, rtx, int);
84 extern bool bfin_longcall_p (rtx, int);
85 extern bool bfin_dsp_memref_p (rtx);
86 extern bool bfin_expand_movmem (rtx, rtx, rtx, rtx);
88 extern int bfin_register_move_cost (enum machine_mode, enum reg_class,
89 enum reg_class);
90 extern int bfin_memory_move_cost (enum machine_mode, enum reg_class, int in);
91 extern enum reg_class secondary_input_reload_class (enum reg_class,
92 enum machine_mode,
93 rtx);
94 extern enum reg_class secondary_output_reload_class (enum reg_class,
95 enum machine_mode,
96 rtx);
97 extern char *section_asm_op_1 (SECT_ENUM_T);
98 extern char *section_asm_op (SECT_ENUM_T);
99 extern void print_operand (FILE *, rtx, char);
100 extern void print_address_operand (FILE *, rtx);
101 extern void split_di (rtx [], int, rtx [], rtx []);
102 extern int split_load_immediate (rtx []);
103 extern void emit_pic_move (rtx *, enum machine_mode);
104 extern void asm_conditional_branch (rtx, rtx *, int, int);
105 extern rtx bfin_gen_compare (rtx, enum machine_mode);
107 extern unsigned bfin_local_alignment (tree, unsigned);
108 extern rtx bfin_va_arg (tree, tree);
110 extern void bfin_expand_prologue (void);
111 extern void bfin_expand_epilogue (int, int, bool);
112 extern int push_multiple_operation (rtx, enum machine_mode);
113 extern int pop_multiple_operation (rtx, enum machine_mode);
114 extern void output_push_multiple (rtx, rtx *);
115 extern void output_pop_multiple (rtx, rtx *);
116 extern int bfin_hard_regno_rename_ok (unsigned int, unsigned int);
117 extern rtx bfin_return_addr_rtx (int);
118 extern void bfin_hardware_loop (void);
120 #endif