1 /* Prototypes for exported functions of Andes NDS32 cpu for GNU compiler 2 Copyright (C) 2012-2014 Free Software Foundation, Inc. 3 Contributed by Andes Technology Corporation. 4 5 This file is part of GCC. 6 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. 11 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. 16 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/>. */ 20 21 22 /* ------------------------------------------------------------------------ */ 23 24 /* Defining Data Structures for Per-function Information. */ 25 26 extern void nds32_init_expanders (void); 27 28 29 /* Register Usage. */ 30 31 /* -- How Values Fit in Registers. */ 32 33 extern int nds32_hard_regno_nregs (int, enum machine_mode); 34 extern int nds32_hard_regno_mode_ok (int, enum machine_mode); 35 36 37 /* Register Classes. */ 38 39 extern enum reg_class nds32_regno_reg_class (int); 40 41 42 /* Stack Layout and Calling Conventions. */ 43 44 /* -- Basic Stack Layout. */ 45 46 extern rtx nds32_return_addr_rtx (int, rtx); 47 48 /* -- Eliminating Frame Pointer and Arg Pointer. */ 49 50 extern HOST_WIDE_INT nds32_initial_elimination_offset (unsigned int, 51 unsigned int); 52 53 /* -- Passing Arguments in Registers. */ 54 55 extern void nds32_init_cumulative_args (CUMULATIVE_ARGS *, 56 tree, rtx, tree, int); 57 58 /* -- Function Entry and Exit. */ 59 60 extern void nds32_expand_prologue (void); 61 extern void nds32_expand_epilogue (void); 62 extern void nds32_expand_prologue_v3push (void); 63 extern void nds32_expand_epilogue_v3pop (void); 64 65 /* ------------------------------------------------------------------------ */ 66 67 /* Auxiliary functions for auxiliary macros in nds32.h. */ 68 69 extern bool nds32_ls_333_p (rtx, rtx, rtx, enum machine_mode); 70 71 /* Auxiliary functions for expanding rtl used in nds32-multiple.md. */ 72 73 extern rtx nds32_expand_load_multiple (int, int, rtx, rtx); 74 extern rtx nds32_expand_store_multiple (int, int, rtx, rtx); 75 extern int nds32_expand_movmemqi (rtx, rtx, rtx, rtx); 76 77 /* Auxiliary functions for multiple load/store predicate checking. */ 78 79 extern bool nds32_valid_multiple_load_store (rtx, bool); 80 81 /* Auxiliary functions for stack operation predicate checking. */ 82 83 extern bool nds32_valid_stack_push_pop (rtx, bool); 84 85 /* Auxiliary functions for bit operation detection. */ 86 87 extern int nds32_can_use_bclr_p (int); 88 extern int nds32_can_use_bset_p (int); 89 extern int nds32_can_use_btgl_p (int); 90 91 extern int nds32_can_use_bitci_p (int); 92 93 /* Auxiliary function for 'Computing the Length of an Insn'. */ 94 95 extern int nds32_adjust_insn_length (rtx, int); 96 97 /* Auxiliary functions for FP_AS_GP detection. */ 98 99 extern bool nds32_symbol_load_store_p (rtx); 100 extern int nds32_fp_as_gp_check_available (void); 101 102 /* Auxiliary functions for jump table generation. */ 103 104 extern const char *nds32_output_casesi_pc_relative (rtx *); 105 extern const char *nds32_output_casesi (rtx *); 106 107 /* Auxiliary functions to identify 16 bit addresing mode. */ 108 109 extern enum nds32_16bit_address_type nds32_mem_format (rtx); 110 111 /* Auxiliary functions to output assembly code. */ 112 113 extern const char *nds32_output_16bit_store (rtx *, int); 114 extern const char *nds32_output_16bit_load (rtx *, int); 115 extern const char *nds32_output_32bit_store (rtx *, int); 116 extern const char *nds32_output_32bit_load (rtx *, int); 117 extern const char *nds32_output_32bit_load_s (rtx *, int); 118 119 /* Auxiliary functions to output stack push/pop instruction. */ 120 121 extern const char *nds32_output_stack_push (void); 122 extern const char *nds32_output_stack_pop (void); 123 124 /* Auxiliary functions to decide output alignment or not. */ 125 126 extern int nds32_target_alignment (rtx); 127 128 /* ------------------------------------------------------------------------ */ 129