OSDN Git Service

Add NIOS2 support. Code from SourceyG++.
[pf3gnuchains/gcc-fork.git] / gcc / config / nios2 / nios2-protos.h
1 /* Subroutine declarations for Altera Nios II target support.
2    Copyright (C) 2012 Free Software Foundation, Inc.
3    Contributed by Jonah Graham (jgraham@altera.com).
4    Contributed by Mentor Graphics, Inc.
5
6    This file is part of GCC.
7
8    GCC is free software; you can redistribute it and/or modify it
9    under the terms of the GNU General Public License as published
10    by the Free Software Foundation; either version 3, or (at your
11    option) any later version.
12
13    GCC is distributed in the hope that it will be useful, but WITHOUT
14    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
16    License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with GCC; see the file COPYING3.  If not see
20    <http://www.gnu.org/licenses/>.  */
21
22 #ifndef GCC_NIOS2_PROTOS_H
23 #define GCC_NIOS2_PROTOS_H
24
25 extern int nios2_initial_elimination_offset (int, int);
26 extern int nios2_can_use_return_insn (void);
27 extern void expand_prologue (void);
28 extern void expand_epilogue (bool);
29 extern void nios2_function_profiler (FILE *, int);
30
31 #ifdef RTX_CODE
32 extern int nios2_emit_move_sequence (rtx *, enum machine_mode);
33 extern int nios2_emit_expensive_div (rtx *, enum machine_mode);
34 extern void nios2_adjust_call_address (rtx *);
35
36 extern rtx nios2_get_return_address (int);
37 extern void nios2_set_return_address (rtx, rtx);
38
39 extern bool nios2_supported_compare_p (enum machine_mode);
40 extern bool nios2_validate_compare (enum machine_mode, rtx*, rtx*, rtx*);
41
42 extern bool nios2_fpu_insn_enabled (enum n2fpu_code);
43 extern const char* nios2_fpu_insn_asm (enum n2fpu_code);
44
45 extern bool nios2_legitimate_pic_operand_p (rtx x);
46
47 #ifdef TREE_CODE
48 #ifdef ARGS_SIZE_RTX
49 /* expr.h defines both ARGS_SIZE_RTX and `enum direction' */
50 extern enum direction nios2_function_arg_padding (enum machine_mode, const_tree);
51 extern enum direction nios2_block_reg_padding (enum machine_mode, tree, int);
52 #endif /* ARGS_SIZE_RTX */
53
54 extern void nios2_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree, int);
55
56 #endif /* TREE_CODE */
57 #endif /* RTX_CODE */
58
59 #endif /* GCC_NIOS2_PROTOS_H */