]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/config/pru/pru-protos.h
Initial TI PRU GCC port
[thirdparty/gcc.git] / gcc / config / pru / pru-protos.h
1 /* Subroutine declarations for TI PRU target support.
2 Copyright (C) 2014-2019 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 extern const char *pru_output_sign_extend (rtx *);
44 extern const char *pru_output_signed_cbranch (rtx *, bool);
45 extern const char *pru_output_signed_cbranch_ubyteop2 (rtx *, bool);
46 extern const char *pru_output_signed_cbranch_zeroop2 (rtx *, bool);
47
48 extern rtx pru_expand_fp_compare (rtx comparison, machine_mode mode);
49
50 extern void pru_emit_doloop (rtx *, int);
51
52 extern bool pru_regno_ok_for_base_p (int, bool);
53
54 static inline bool
55 pru_regno_ok_for_index_p (int regno, bool strict_p)
56 {
57 /* Selection logic is the same - PRU instructions are quite orthogonal. */
58 return pru_regno_ok_for_base_p (regno, strict_p);
59 }
60
61 extern int pru_get_ctable_exact_base_index (unsigned HOST_WIDE_INT caddr);
62 extern int pru_get_ctable_base_index (unsigned HOST_WIDE_INT caddr);
63 extern int pru_get_ctable_base_offset (unsigned HOST_WIDE_INT caddr);
64
65 extern void pru_register_abicheck_pass (void);
66 #endif /* RTX_CODE */
67
68 #ifdef TREE_CODE
69 extern bool pru_return_in_memory (const_tree type, const_tree fntype);
70 #endif /* TREE_CODE */
71
72 #endif /* GCC_PRU_PROTOS_H */