(root)/
gcc-13.2.0/
gcc/
config/
pru/
pru-protos.h
       1  /* Subroutine declarations for TI PRU target support.
       2     Copyright (C) 2014-2023 Free Software Foundation, Inc.
       3     Contributed by Dimitar Dimitrov <dimitar@dinux.eu>
       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  #ifndef GCC_PRU_PROTOS_H
      22  #define GCC_PRU_PROTOS_H
      23  
      24  struct pru_ctable_entry {
      25      bool valid;
      26      unsigned HOST_WIDE_INT base;
      27  };
      28  
      29  extern struct pru_ctable_entry pru_ctable[32];
      30  
      31  extern int pru_initial_elimination_offset (int, int);
      32  extern int pru_can_use_return_insn (void);
      33  extern void pru_expand_prologue (void);
      34  extern void pru_expand_epilogue (bool);
      35  extern void pru_function_profiler (FILE *, int);
      36  
      37  void pru_register_pragmas (void);
      38  
      39  #ifdef RTX_CODE
      40  extern rtx pru_get_return_address (int);
      41  extern int pru_hard_regno_rename_ok (unsigned int, unsigned int);
      42  
      43  struct pru_byterange {
      44      int start;		/* Starting byte number.  */
      45      int nbytes;		/* Number of consecutive bytes.  */
      46  };
      47  
      48  extern pru_byterange pru_calc_byterange (HOST_WIDE_INT cval,
      49  					      machine_mode mode);
      50  
      51  extern const char *pru_output_signed_cbranch (rtx *, bool);
      52  extern const char *pru_output_signed_cbranch_ubyteop2 (rtx *, bool);
      53  extern const char *pru_output_signed_cbranch_zeroop2 (rtx *, bool);
      54  
      55  extern enum rtx_code pru_noteq_condition (enum rtx_code code);
      56  extern rtx pru_expand_fp_compare (rtx comparison, machine_mode mode);
      57  
      58  extern void pru_emit_doloop (rtx *, int);
      59  
      60  extern bool pru_regno_ok_for_base_p (int, bool);
      61  
      62  static inline bool
      63  pru_regno_ok_for_index_p (int regno, bool strict_p)
      64  {
      65    /* Selection logic is the same - PRU instructions are quite orthogonal.  */
      66    return pru_regno_ok_for_base_p (regno, strict_p);
      67  }
      68  
      69  extern int pru_get_ctable_exact_base_index (unsigned HOST_WIDE_INT caddr);
      70  extern int pru_get_ctable_base_index (unsigned HOST_WIDE_INT caddr);
      71  extern int pru_get_ctable_base_offset (unsigned HOST_WIDE_INT caddr);
      72  
      73  extern int pru_symref2ioregno (rtx op);
      74  
      75  extern void pru_register_abicheck_pass (void);
      76  
      77  #endif /* RTX_CODE */
      78  
      79  #ifdef TREE_CODE
      80  extern bool pru_return_in_memory (const_tree type, const_tree fntype);
      81  #endif /* TREE_CODE */
      82  
      83  #endif /* GCC_PRU_PROTOS_H */