1 |
709 |
jeremybenn |
/* Prototypes for exported functions defined in avr.c
|
2 |
|
|
|
3 |
|
|
Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010,
|
4 |
|
|
2011
|
5 |
|
|
Free Software Foundation, Inc.
|
6 |
|
|
Contributed by Denis Chertykov (chertykov@gmail.com)
|
7 |
|
|
|
8 |
|
|
This file is part of GCC.
|
9 |
|
|
|
10 |
|
|
GCC is free software; you can redistribute it and/or modify
|
11 |
|
|
it under the terms of the GNU General Public License as published by
|
12 |
|
|
the Free Software Foundation; either version 3, or (at your option)
|
13 |
|
|
any later version.
|
14 |
|
|
|
15 |
|
|
GCC is distributed in the hope that it will be useful,
|
16 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
17 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
18 |
|
|
GNU General Public License for more details.
|
19 |
|
|
|
20 |
|
|
You should have received a copy of the GNU General Public License
|
21 |
|
|
along with GCC; see the file COPYING3. If not see
|
22 |
|
|
<http://www.gnu.org/licenses/>. */
|
23 |
|
|
|
24 |
|
|
|
25 |
|
|
extern int function_arg_regno_p (int r);
|
26 |
|
|
extern void avr_cpu_cpp_builtins (struct cpp_reader * pfile);
|
27 |
|
|
extern enum reg_class avr_regno_reg_class (int r);
|
28 |
|
|
extern void asm_globalize_label (FILE *file, const char *name);
|
29 |
|
|
extern void avr_asm_declare_function_name (FILE *, const char *, tree);
|
30 |
|
|
extern void order_regs_for_local_alloc (void);
|
31 |
|
|
extern int avr_initial_elimination_offset (int from, int to);
|
32 |
|
|
extern int avr_simple_epilogue (void);
|
33 |
|
|
extern int avr_hard_regno_rename_ok (unsigned int, unsigned int);
|
34 |
|
|
extern rtx avr_return_addr_rtx (int count, rtx tem);
|
35 |
|
|
extern void avr_register_target_pragmas (void);
|
36 |
|
|
extern void avr_init_expanders (void);
|
37 |
|
|
|
38 |
|
|
#ifdef TREE_CODE
|
39 |
|
|
extern void avr_asm_output_aligned_decl_common (FILE*, const_tree, const char*, unsigned HOST_WIDE_INT, unsigned int, bool);
|
40 |
|
|
extern void asm_output_external (FILE *file, tree decl, char *name);
|
41 |
|
|
extern int avr_progmem_p (tree decl, tree attributes);
|
42 |
|
|
|
43 |
|
|
#ifdef RTX_CODE /* inside TREE_CODE */
|
44 |
|
|
extern void init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype,
|
45 |
|
|
rtx libname, tree fndecl);
|
46 |
|
|
#endif /* RTX_CODE inside TREE_CODE */
|
47 |
|
|
|
48 |
|
|
#endif /* TREE_CODE */
|
49 |
|
|
|
50 |
|
|
#ifdef RTX_CODE
|
51 |
|
|
extern const char *output_movqi (rtx insn, rtx operands[], int *l);
|
52 |
|
|
extern const char *output_movhi (rtx insn, rtx operands[], int *l);
|
53 |
|
|
extern const char *output_movsisf (rtx insn, rtx operands[], int *l);
|
54 |
|
|
extern const char *avr_out_tstsi (rtx, rtx*, int*);
|
55 |
|
|
extern const char *avr_out_tsthi (rtx, rtx*, int*);
|
56 |
|
|
extern const char *avr_out_tstpsi (rtx, rtx*, int*);
|
57 |
|
|
extern const char *avr_out_compare (rtx, rtx*, int*);
|
58 |
|
|
extern const char *avr_out_compare64 (rtx, rtx*, int*);
|
59 |
|
|
extern const char *ret_cond_branch (rtx x, int len, int reverse);
|
60 |
|
|
extern const char *avr_out_movpsi (rtx, rtx*, int*);
|
61 |
|
|
|
62 |
|
|
extern const char *ashlqi3_out (rtx insn, rtx operands[], int *len);
|
63 |
|
|
extern const char *ashlhi3_out (rtx insn, rtx operands[], int *len);
|
64 |
|
|
extern const char *ashlsi3_out (rtx insn, rtx operands[], int *len);
|
65 |
|
|
|
66 |
|
|
extern const char *ashrqi3_out (rtx insn, rtx operands[], int *len);
|
67 |
|
|
extern const char *ashrhi3_out (rtx insn, rtx operands[], int *len);
|
68 |
|
|
extern const char *ashrsi3_out (rtx insn, rtx operands[], int *len);
|
69 |
|
|
|
70 |
|
|
extern const char *lshrqi3_out (rtx insn, rtx operands[], int *len);
|
71 |
|
|
extern const char *lshrhi3_out (rtx insn, rtx operands[], int *len);
|
72 |
|
|
extern const char *lshrsi3_out (rtx insn, rtx operands[], int *len);
|
73 |
|
|
|
74 |
|
|
extern const char *avr_out_ashlpsi3 (rtx, rtx*, int*);
|
75 |
|
|
extern const char *avr_out_ashrpsi3 (rtx, rtx*, int*);
|
76 |
|
|
extern const char *avr_out_lshrpsi3 (rtx, rtx*, int*);
|
77 |
|
|
|
78 |
|
|
extern bool avr_rotate_bytes (rtx operands[]);
|
79 |
|
|
|
80 |
|
|
extern void expand_prologue (void);
|
81 |
|
|
extern void expand_epilogue (bool);
|
82 |
|
|
extern bool avr_emit_movmemhi (rtx*);
|
83 |
|
|
extern int avr_epilogue_uses (int regno);
|
84 |
|
|
extern int avr_starting_frame_offset (void);
|
85 |
|
|
|
86 |
|
|
extern void avr_output_addr_vec_elt (FILE *stream, int value);
|
87 |
|
|
extern const char *avr_out_sbxx_branch (rtx insn, rtx operands[]);
|
88 |
|
|
extern const char* avr_out_bitop (rtx, rtx*, int*);
|
89 |
|
|
extern const char* avr_out_plus (rtx*, int*, int*);
|
90 |
|
|
extern const char* avr_out_plus_noclobber (rtx*, int*, int*);
|
91 |
|
|
extern const char* avr_out_plus64 (rtx, int*);
|
92 |
|
|
extern const char* avr_out_addto_sp (rtx*, int*);
|
93 |
|
|
extern const char* avr_out_xload (rtx, rtx*, int*);
|
94 |
|
|
extern const char* avr_out_movmem (rtx, rtx*, int*);
|
95 |
|
|
extern const char* avr_out_insert_bits (rtx*, int*);
|
96 |
|
|
extern bool avr_popcount_each_byte (rtx, int, int);
|
97 |
|
|
extern bool avr_has_nibble_0xf (rtx);
|
98 |
|
|
|
99 |
|
|
extern int extra_constraint_Q (rtx x);
|
100 |
|
|
extern int adjust_insn_length (rtx insn, int len);
|
101 |
|
|
extern const char* output_reload_inhi (rtx*, rtx, int*);
|
102 |
|
|
extern const char* output_reload_insisf (rtx*, rtx, int*);
|
103 |
|
|
extern const char* avr_out_reload_inpsi (rtx*, rtx, int*);
|
104 |
|
|
extern void notice_update_cc (rtx body, rtx insn);
|
105 |
|
|
extern int reg_unused_after (rtx insn, rtx reg);
|
106 |
|
|
extern int _reg_unused_after (rtx insn, rtx reg);
|
107 |
|
|
extern int avr_jump_mode (rtx x, rtx insn);
|
108 |
|
|
extern int test_hard_reg_class (enum reg_class rclass, rtx x);
|
109 |
|
|
extern int jump_over_one_insn_p (rtx insn, rtx dest);
|
110 |
|
|
|
111 |
|
|
extern int avr_hard_regno_mode_ok (int regno, enum machine_mode mode);
|
112 |
|
|
extern void final_prescan_insn (rtx insn, rtx *operand, int num_operands);
|
113 |
|
|
extern int avr_simplify_comparison_p (enum machine_mode mode,
|
114 |
|
|
RTX_CODE op, rtx x);
|
115 |
|
|
extern RTX_CODE avr_normalize_condition (RTX_CODE condition);
|
116 |
|
|
extern void out_shift_with_cnt (const char *templ, rtx insn,
|
117 |
|
|
rtx operands[], int *len, int t_len);
|
118 |
|
|
extern reg_class_t avr_mode_code_base_reg_class (enum machine_mode, addr_space_t, RTX_CODE, RTX_CODE);
|
119 |
|
|
extern bool avr_regno_mode_code_ok_for_base_p (int, enum machine_mode, addr_space_t, RTX_CODE, RTX_CODE);
|
120 |
|
|
extern rtx avr_incoming_return_addr_rtx (void);
|
121 |
|
|
extern rtx avr_legitimize_reload_address (rtx*, enum machine_mode, int, int, int, int, rtx (*)(rtx,int));
|
122 |
|
|
extern bool avr_mem_flash_p (rtx);
|
123 |
|
|
extern bool avr_mem_memx_p (rtx);
|
124 |
|
|
extern bool avr_load_libgcc_p (rtx);
|
125 |
|
|
extern bool avr_xload_libgcc_p (enum machine_mode);
|
126 |
|
|
|
127 |
|
|
extern rtx lpm_reg_rtx;
|
128 |
|
|
extern rtx lpm_addr_reg_rtx;
|
129 |
|
|
extern rtx tmp_reg_rtx;
|
130 |
|
|
extern rtx zero_reg_rtx;
|
131 |
|
|
extern rtx all_regs_rtx[32];
|
132 |
|
|
extern rtx rampz_rtx;
|
133 |
|
|
|
134 |
|
|
#endif /* RTX_CODE */
|
135 |
|
|
|
136 |
|
|
#ifdef REAL_VALUE_TYPE
|
137 |
|
|
extern void asm_output_float (FILE *file, REAL_VALUE_TYPE n);
|
138 |
|
|
#endif
|
139 |
|
|
|
140 |
|
|
extern bool avr_have_dimode;
|
141 |
|
|
|
142 |
|
|
/* From avr-log.c */
|
143 |
|
|
|
144 |
|
|
#define avr_edump (avr_log_set_caller_e (__FUNCTION__))
|
145 |
|
|
#define avr_fdump (avr_log_set_caller_f (__FUNCTION__))
|
146 |
|
|
|
147 |
|
|
extern int (*avr_log_set_caller_e (const char*))(const char*, ...);
|
148 |
|
|
extern int (*avr_log_set_caller_f (const char*))(FILE*, const char*, ...);
|
149 |
|
|
|
150 |
|
|
extern void avr_log_set_avr_log (void);
|
151 |
|
|
|
152 |
|
|
typedef struct
|
153 |
|
|
{
|
154 |
|
|
unsigned address_cost :1;
|
155 |
|
|
unsigned builtin :1;
|
156 |
|
|
unsigned constraints :1;
|
157 |
|
|
unsigned legitimate_address_p :1;
|
158 |
|
|
unsigned legitimize_address :1;
|
159 |
|
|
unsigned legitimize_reload_address :1;
|
160 |
|
|
unsigned progmem :1;
|
161 |
|
|
unsigned rtx_costs :1;
|
162 |
|
|
} avr_log_t;
|
163 |
|
|
|
164 |
|
|
extern avr_log_t avr_log;
|