[NDS32] Refine load_multiple and store_multiple.
[official-gcc.git] / gcc / config / nds32 / nds32-protos.h
blobd51d55949ab7cde979925555b9b471ac0f071d53
1 /* Prototypes for exported functions of Andes NDS32 cpu for GNU compiler
2 Copyright (C) 2012-2018 Free Software Foundation, Inc.
3 Contributed by Andes Technology Corporation.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published
9 by the Free Software Foundation; either version 3, or (at your
10 option) any later version.
12 GCC is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 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/>. */
22 /* ------------------------------------------------------------------------ */
24 /* Defining Data Structures for Per-function Information. */
26 extern void nds32_init_expanders (void);
29 /* Register Classes. */
31 extern enum reg_class nds32_regno_reg_class (int);
34 /* Stack Layout and Calling Conventions. */
36 /* -- Basic Stack Layout. */
38 extern rtx nds32_return_addr_rtx (int, rtx);
40 /* -- Eliminating Frame Pointer and Arg Pointer. */
42 extern HOST_WIDE_INT nds32_initial_elimination_offset (unsigned int,
43 unsigned int);
45 /* -- Passing Arguments in Registers. */
47 extern void nds32_init_cumulative_args (CUMULATIVE_ARGS *,
48 tree, rtx, tree, int);
50 /* -- Function Entry and Exit. */
52 extern void nds32_expand_prologue (void);
53 extern void nds32_expand_epilogue (bool);
54 extern void nds32_expand_prologue_v3push (void);
55 extern void nds32_expand_epilogue_v3pop (bool);
57 /* ------------------------------------------------------------------------ */
59 /* Auxiliary functions for auxiliary macros in nds32.h. */
61 extern bool nds32_ls_333_p (rtx, rtx, rtx, machine_mode);
63 /* Auxiliary functions for lwm/smw. */
65 extern bool nds32_valid_smw_lwm_base_p (rtx);
67 /* Auxiliary functions for expanding rtl used in nds32-multiple.md. */
69 extern rtx nds32_expand_load_multiple (int, int, rtx, rtx, bool, rtx *);
70 extern rtx nds32_expand_store_multiple (int, int, rtx, rtx, bool, rtx *);
71 extern int nds32_expand_movmemqi (rtx, rtx, rtx, rtx);
73 /* Auxiliary functions for expand unalign load instruction. */
75 extern void nds32_expand_unaligned_load (rtx *, enum machine_mode);
77 /* Auxiliary functions for expand unalign store instruction. */
79 extern void nds32_expand_unaligned_store (rtx *, enum machine_mode);
81 /* Auxiliary functions for multiple load/store predicate checking. */
83 extern bool nds32_valid_multiple_load_store_p (rtx, bool, bool);
85 /* Auxiliary functions for stack operation predicate checking. */
87 extern bool nds32_valid_stack_push_pop_p (rtx, bool);
89 /* Auxiliary functions for bit operation detection. */
91 extern int nds32_can_use_bclr_p (int);
92 extern int nds32_can_use_bset_p (int);
93 extern int nds32_can_use_btgl_p (int);
95 extern int nds32_can_use_bitci_p (int);
97 /* Auxiliary function for 'Computing the Length of an Insn'. */
99 extern int nds32_adjust_insn_length (rtx_insn *, int);
101 /* Auxiliary functions for FP_AS_GP detection. */
103 extern int nds32_fp_as_gp_check_available (void);
105 /* Auxiliary functions for jump table generation. */
107 extern const char *nds32_output_casesi_pc_relative (rtx *);
108 extern const char *nds32_output_casesi (rtx *);
110 /* Auxiliary functions to identify 16 bit addresing mode. */
112 extern enum nds32_16bit_address_type nds32_mem_format (rtx);
114 /* Auxiliary functions to output assembly code. */
116 extern const char *nds32_output_16bit_store (rtx *, int);
117 extern const char *nds32_output_16bit_load (rtx *, int);
118 extern const char *nds32_output_32bit_store (rtx *, int);
119 extern const char *nds32_output_32bit_load (rtx *, int);
120 extern const char *nds32_output_32bit_load_s (rtx *, int);
121 extern const char *nds32_output_smw_single_word (rtx *);
122 extern const char *nds32_output_lmw_single_word (rtx *);
124 /* Auxiliary functions to output stack push/pop instruction. */
126 extern const char *nds32_output_stack_push (rtx);
127 extern const char *nds32_output_stack_pop (rtx);
129 /* Auxiliary functions to check using return with null epilogue. */
131 extern int nds32_can_use_return_insn (void);
133 /* Auxiliary functions to decide output alignment or not. */
135 extern int nds32_target_alignment (rtx_insn *);
137 /* Auxiliary functions to expand builtin functions. */
139 extern void nds32_init_builtins_impl (void);
140 extern rtx nds32_expand_builtin_impl (tree, rtx, rtx,
141 machine_mode, int);
142 extern tree nds32_builtin_decl_impl (unsigned, bool);
144 /* Auxiliary functions for ISR implementation. */
146 extern void nds32_check_isr_attrs_conflict (tree, tree);
147 extern void nds32_construct_isr_vectors_information (tree, const char *);
148 extern void nds32_asm_file_start_for_isr (void);
149 extern void nds32_asm_file_end_for_isr (void);
150 extern bool nds32_isr_function_p (tree);
152 /* Auxiliary functions for cost calculation. */
154 extern bool nds32_rtx_costs_impl (rtx, machine_mode, int, int, int *, bool);
155 extern int nds32_address_cost_impl (rtx, machine_mode, addr_space_t, bool);
157 /* ------------------------------------------------------------------------ */