1 |
13 |
serginhofr |
/* Definition of RISC-V target for GNU compiler.
|
2 |
|
|
Copyright (C) 2011-2014 Free Software Foundation, Inc.
|
3 |
|
|
Contributed by Andrew Waterman (waterman@cs.berkeley.edu) at UC Berkeley.
|
4 |
|
|
Based on MIPS target for GNU compiler.
|
5 |
|
|
|
6 |
|
|
This file is part of GCC.
|
7 |
|
|
|
8 |
|
|
GCC is free software; you can redistribute it and/or modify
|
9 |
|
|
it under the terms of the GNU General Public License as published by
|
10 |
|
|
the Free Software Foundation; either version 3, or (at your option)
|
11 |
|
|
any later version.
|
12 |
|
|
|
13 |
|
|
GCC is distributed in the hope that it will be useful,
|
14 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16 |
|
|
GNU General Public 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_RISCV_PROTOS_H
|
23 |
|
|
#define GCC_RISCV_PROTOS_H
|
24 |
|
|
|
25 |
|
|
enum riscv_symbol_type {
|
26 |
|
|
SYMBOL_ABSOLUTE,
|
27 |
|
|
SYMBOL_GOT_DISP,
|
28 |
|
|
SYMBOL_TLS,
|
29 |
|
|
SYMBOL_TLS_LE,
|
30 |
|
|
SYMBOL_TLS_IE,
|
31 |
|
|
SYMBOL_TLS_GD
|
32 |
|
|
};
|
33 |
|
|
#define NUM_SYMBOL_TYPES (SYMBOL_TLS_GD + 1)
|
34 |
|
|
|
35 |
|
|
enum riscv_code_model {
|
36 |
|
|
CM_MEDLOW,
|
37 |
|
|
CM_MEDANY,
|
38 |
|
|
CM_PIC
|
39 |
|
|
};
|
40 |
|
|
extern enum riscv_code_model riscv_cmodel;
|
41 |
|
|
|
42 |
|
|
extern bool riscv_symbolic_constant_p (rtx, enum riscv_symbol_type *);
|
43 |
|
|
extern int riscv_regno_mode_ok_for_base_p (int, enum machine_mode, bool);
|
44 |
|
|
extern int riscv_address_insns (rtx, enum machine_mode, bool);
|
45 |
|
|
extern int riscv_const_insns (rtx);
|
46 |
|
|
extern int riscv_split_const_insns (rtx);
|
47 |
|
|
extern int riscv_load_store_insns (rtx, rtx_insn *);
|
48 |
|
|
extern rtx riscv_emit_move (rtx, rtx);
|
49 |
|
|
extern bool riscv_split_symbol (rtx, rtx, enum machine_mode, rtx *);
|
50 |
|
|
extern rtx riscv_unspec_address (rtx, enum riscv_symbol_type);
|
51 |
|
|
extern void riscv_move_integer (rtx, rtx, HOST_WIDE_INT);
|
52 |
|
|
extern bool riscv_legitimize_move (enum machine_mode, rtx, rtx);
|
53 |
|
|
extern bool riscv_legitimize_vector_move (enum machine_mode, rtx, rtx);
|
54 |
|
|
|
55 |
|
|
extern rtx riscv_subword (rtx, bool);
|
56 |
|
|
extern bool riscv_split_64bit_move_p (rtx, rtx);
|
57 |
|
|
extern void riscv_split_doubleword_move (rtx, rtx);
|
58 |
|
|
extern const char *riscv_output_move (rtx, rtx);
|
59 |
|
|
extern const char *riscv_output_gpr_save (unsigned);
|
60 |
|
|
#ifdef RTX_CODE
|
61 |
|
|
extern void riscv_expand_scc (rtx *);
|
62 |
|
|
extern void riscv_expand_conditional_branch (rtx *);
|
63 |
|
|
#endif
|
64 |
|
|
extern rtx riscv_expand_call (bool, rtx, rtx, rtx);
|
65 |
|
|
extern void riscv_expand_fcc_reload (rtx, rtx, rtx);
|
66 |
|
|
extern void riscv_set_return_address (rtx, rtx);
|
67 |
|
|
extern bool riscv_expand_block_move (rtx, rtx, rtx);
|
68 |
|
|
extern void riscv_expand_synci_loop (rtx, rtx);
|
69 |
|
|
|
70 |
|
|
extern bool riscv_expand_ext_as_unaligned_load (rtx, rtx, HOST_WIDE_INT,
|
71 |
|
|
HOST_WIDE_INT);
|
72 |
|
|
extern bool riscv_expand_ins_as_unaligned_store (rtx, rtx, HOST_WIDE_INT,
|
73 |
|
|
HOST_WIDE_INT);
|
74 |
|
|
extern void riscv_order_regs_for_local_alloc (void);
|
75 |
|
|
|
76 |
|
|
extern rtx riscv_return_addr (int, rtx);
|
77 |
|
|
extern HOST_WIDE_INT riscv_initial_elimination_offset (int, int);
|
78 |
|
|
extern void riscv_expand_prologue (void);
|
79 |
|
|
extern void riscv_expand_epilogue (bool);
|
80 |
|
|
extern bool riscv_can_use_return_insn (void);
|
81 |
|
|
extern rtx riscv_function_value (const_tree, const_tree, enum machine_mode);
|
82 |
|
|
|
83 |
|
|
extern enum reg_class riscv_secondary_reload_class (enum reg_class,
|
84 |
|
|
enum machine_mode,
|
85 |
|
|
rtx, bool);
|
86 |
|
|
extern int riscv_class_max_nregs (enum reg_class, enum machine_mode);
|
87 |
|
|
|
88 |
|
|
extern unsigned int riscv_hard_regno_nregs (int, enum machine_mode);
|
89 |
|
|
|
90 |
|
|
extern void irix_asm_output_align (FILE *, unsigned);
|
91 |
|
|
extern const char *current_section_name (void);
|
92 |
|
|
extern unsigned int current_section_flags (void);
|
93 |
|
|
|
94 |
|
|
extern void riscv_expand_vector_init (rtx, rtx);
|
95 |
|
|
|
96 |
|
|
#endif /* ! GCC_RISCV_PROTOS_H */
|