]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/avr/avr-protos.h
Implement light-weight DImode support.
[thirdparty/gcc.git] / gcc / config / avr / avr-protos.h
CommitLineData
90e7678c
DC
1/* Prototypes for exported functions defined in avr.c
2
68fd7765
AS
3 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010,
4 2011
2d67effa 5 Free Software Foundation, Inc.
92bffc14 6 Contributed by Denis Chertykov (chertykov@gmail.com)
90e7678c 7
7ec022b2 8 This file is part of GCC.
90e7678c 9
7ec022b2 10 GCC is free software; you can redistribute it and/or modify
90e7678c 11 it under the terms of the GNU General Public License as published by
2f83c7d6 12 the Free Software Foundation; either version 3, or (at your option)
90e7678c
DC
13 any later version.
14
7ec022b2 15 GCC is distributed in the hope that it will be useful,
90e7678c
DC
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
2f83c7d6
NC
21 along with GCC; see the file COPYING3. If not see
22 <http://www.gnu.org/licenses/>. */
90e7678c
DC
23
24
269e3795 25extern int function_arg_regno_p (int r);
97c281da 26extern void avr_cpu_cpp_builtins (struct cpp_reader * pfile);
269e3795 27extern enum reg_class avr_regno_reg_class (int r);
269e3795 28extern void asm_globalize_label (FILE *file, const char *name);
2cb4817b 29extern void avr_asm_declare_function_name (FILE *, const char *, tree);
269e3795 30extern void order_regs_for_local_alloc (void);
c21ca196 31extern int avr_initial_elimination_offset (int from, int to);
269e3795 32extern int avr_simple_epilogue (void);
91635d08 33extern int avr_hard_regno_rename_ok (unsigned int, unsigned int);
3f02a5f3 34extern rtx avr_return_addr_rtx (int count, rtx tem);
7c209481 35extern void avr_register_target_pragmas (void);
d702f362 36extern bool avr_accumulate_outgoing_args (void);
7bc6df2c 37extern void avr_init_expanders (void);
6bec29c9 38
269e3795 39#ifdef TREE_CODE
516edfdd 40extern void avr_asm_output_aligned_decl_common (FILE*, const_tree, const char*, unsigned HOST_WIDE_INT, unsigned int, bool);
269e3795 41extern void asm_output_external (FILE *file, tree decl, char *name);
427ee360 42extern int avr_progmem_p (tree decl, tree attributes);
6bec29c9 43
90e7678c 44#ifdef RTX_CODE /* inside TREE_CODE */
269e3795
SB
45extern void init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype,
46 rtx libname, tree fndecl);
90e7678c
DC
47#endif /* RTX_CODE inside TREE_CODE */
48
90e7678c
DC
49#endif /* TREE_CODE */
50
51#ifdef RTX_CODE
269e3795
SB
52extern const char *output_movqi (rtx insn, rtx operands[], int *l);
53extern const char *output_movhi (rtx insn, rtx operands[], int *l);
8dab2ba5 54extern const char *output_movsisf (rtx insn, rtx operands[], int *l);
a7c0acd0
GJL
55extern const char *avr_out_tstsi (rtx, rtx*, int*);
56extern const char *avr_out_tsthi (rtx, rtx*, int*);
e4fe948a 57extern const char *avr_out_tstpsi (rtx, rtx*, int*);
a7c0acd0 58extern const char *avr_out_compare (rtx, rtx*, int*);
8c57e547 59extern const char *avr_out_compare64 (rtx, rtx*, int*);
269e3795 60extern const char *ret_cond_branch (rtx x, int len, int reverse);
e4fe948a 61extern const char *avr_out_movpsi (rtx, rtx*, int*);
269e3795
SB
62
63extern const char *ashlqi3_out (rtx insn, rtx operands[], int *len);
64extern const char *ashlhi3_out (rtx insn, rtx operands[], int *len);
65extern const char *ashlsi3_out (rtx insn, rtx operands[], int *len);
66
67extern const char *ashrqi3_out (rtx insn, rtx operands[], int *len);
68extern const char *ashrhi3_out (rtx insn, rtx operands[], int *len);
69extern const char *ashrsi3_out (rtx insn, rtx operands[], int *len);
70
71extern const char *lshrqi3_out (rtx insn, rtx operands[], int *len);
72extern const char *lshrhi3_out (rtx insn, rtx operands[], int *len);
73extern const char *lshrsi3_out (rtx insn, rtx operands[], int *len);
e4fe948a
GJL
74
75extern const char *avr_out_ashlpsi3 (rtx, rtx*, int*);
76extern const char *avr_out_ashrpsi3 (rtx, rtx*, int*);
77extern const char *avr_out_lshrpsi3 (rtx, rtx*, int*);
78
58f0ea2f 79extern bool avr_rotate_bytes (rtx operands[]);
269e3795 80
4fc2b4ff 81extern void expand_prologue (void);
980a0ff4 82extern void expand_epilogue (bool);
7bc6df2c 83extern bool avr_emit_movmemhi (rtx*);
4fc2b4ff 84extern int avr_epilogue_uses (int regno);
d702f362 85extern int avr_starting_frame_offset (void);
4fc2b4ff 86
269e3795
SB
87extern void avr_output_bld (rtx operands[], int bit_nr);
88extern void avr_output_addr_vec_elt (FILE *stream, int value);
89extern const char *avr_out_sbxx_branch (rtx insn, rtx operands[]);
6ebe2d6c 90extern const char* avr_out_bitop (rtx, rtx*, int*);
05058b6e 91extern const char* avr_out_plus (rtx*, int*, int*);
2f47b8d3 92extern const char* avr_out_plus_noclobber (rtx*, int*, int*);
8c57e547 93extern const char* avr_out_plus64 (rtx, int*);
180ee6d1 94extern const char* avr_out_addto_sp (rtx*, int*);
7bc6df2c
GJL
95extern const char* avr_out_xload (rtx, rtx*, int*);
96extern const char* avr_out_movmem (rtx, rtx*, int*);
49b2772e 97extern const char* avr_out_map_bits (rtx, rtx*, int*);
6ebe2d6c 98extern bool avr_popcount_each_byte (rtx, int, int);
269e3795 99
2d67effa 100extern int extra_constraint_Q (rtx x);
269e3795 101extern int adjust_insn_length (rtx insn, int len);
20633efc 102extern const char* output_reload_inhi (rtx*, rtx, int*);
8a6a05ce 103extern const char* output_reload_insisf (rtx*, rtx, int*);
e4fe948a 104extern const char* avr_out_reload_inpsi (rtx*, rtx, int*);
269e3795 105extern void notice_update_cc (rtx body, rtx insn);
269e3795
SB
106extern int reg_unused_after (rtx insn, rtx reg);
107extern int _reg_unused_after (rtx insn, rtx reg);
108extern int avr_jump_mode (rtx x, rtx insn);
0a2aaacc 109extern int test_hard_reg_class (enum reg_class rclass, rtx x);
269e3795
SB
110extern int jump_over_one_insn_p (rtx insn, rtx dest);
111
112extern int avr_hard_regno_mode_ok (int regno, enum machine_mode mode);
269e3795
SB
113extern void final_prescan_insn (rtx insn, rtx *operand, int num_operands);
114extern int avr_simplify_comparison_p (enum machine_mode mode,
0a2aaacc 115 RTX_CODE op, rtx x);
269e3795 116extern RTX_CODE avr_normalize_condition (RTX_CODE condition);
0a2aaacc 117extern void out_shift_with_cnt (const char *templ, rtx insn,
269e3795 118 rtx operands[], int *len, int t_len);
86fc3d06
UW
119extern reg_class_t avr_mode_code_base_reg_class (enum machine_mode, addr_space_t, RTX_CODE, RTX_CODE);
120extern bool avr_regno_mode_code_ok_for_base_p (int, enum machine_mode, addr_space_t, RTX_CODE, RTX_CODE);
bdfe906f 121extern rtx avr_incoming_return_addr_rtx (void);
c1a330ef 122extern rtx avr_legitimize_reload_address (rtx*, enum machine_mode, int, int, int, int, rtx (*)(rtx,int));
7c209481 123extern bool avr_mem_pgm_p (rtx);
7bc6df2c 124extern bool avr_mem_pgmx_p (rtx);
7c209481 125extern bool avr_load_libgcc_p (rtx);
7bc6df2c 126extern bool avr_xload_libgcc_p (enum machine_mode);
90e7678c
DC
127#endif /* RTX_CODE */
128
90e7678c 129#ifdef REAL_VALUE_TYPE
269e3795 130extern void asm_output_float (FILE *file, REAL_VALUE_TYPE n);
6bec29c9 131#endif
6c7dfafe 132
8c57e547
GJL
133extern bool avr_have_dimode;
134
6c7dfafe
GJL
135/* From avr-log.c */
136
137#define avr_edump (avr_log_set_caller_e (__FUNCTION__))
138#define avr_fdump (avr_log_set_caller_f (__FUNCTION__))
139
140extern int (*avr_log_set_caller_e (const char*))(const char*, ...);
141extern int (*avr_log_set_caller_f (const char*))(FILE*, const char*, ...);
142
143extern void avr_log_set_avr_log (void);
144
145typedef struct
146{
7c209481 147 unsigned address_cost :1;
b5e35770 148 unsigned builtin :1;
7c209481 149 unsigned constraints :1;
6c7dfafe
GJL
150 unsigned legitimate_address_p :1;
151 unsigned legitimize_address :1;
152 unsigned legitimize_reload_address :1;
7c209481
GJL
153 unsigned progmem :1;
154 unsigned rtx_costs :1;
6c7dfafe
GJL
155} avr_log_t;
156
157extern avr_log_t avr_log;