]>
Commit | Line | Data |
---|---|---|
b25364a0 | 1 | /* Prototypes for exported functions defined in cr16.c |
99dee823 | 2 | Copyright (C) 2012-2021 Free Software Foundation, Inc. |
b25364a0 S |
3 | Contributed by KPIT Cummins Infosystems Limited. |
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_CR16_PROTOS_H | |
22 | #define GCC_CR16_PROTOS_H | |
23 | ||
b25364a0 S |
24 | /* Register usage. */ |
25 | extern enum reg_class cr16_regno_reg_class (int); | |
b25364a0 S |
26 | |
27 | /* Passing function arguments. */ | |
28 | extern int cr16_function_arg_regno_p (int); | |
29 | ||
30 | #ifdef TREE_CODE | |
31 | #ifdef RTX_CODE | |
32 | ||
33 | extern void cr16_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx); | |
34 | ||
35 | #endif /* RTX_CODE. */ | |
36 | #endif /* TREE_CODE. */ | |
37 | ||
38 | /* Enumeration giving the various data models we support. */ | |
39 | enum data_model_type | |
40 | { | |
41 | DM_DEFAULT, /* Default data model (in CR16C/C+ - up to 16M). */ | |
42 | DM_NEAR, /* Near data model (in CR16C/C+ - up to 1M). */ | |
43 | DM_FAR, /* Far data model (in CR16C+ - up to 4G) | |
44 | (in CR16C - up to 16M). */ | |
45 | ILLEGAL_DM /* Illegal data model. */ | |
46 | }; | |
47 | ||
48 | #ifdef RTX_CODE | |
49 | ||
50 | /* Addressing Modes. */ | |
51 | struct cr16_address | |
52 | { | |
53 | rtx base; /* Base register: Any register or register pair. */ | |
54 | rtx index; /* Index register: If one is present. */ | |
55 | rtx disp; /* Displacement or Absolute address. */ | |
56 | enum data_model_type data; /* data ref type. */ | |
57 | int code; /* Whether the address is code address. | |
58 | 0 - data, 1 - code label, 2 - function label. */ | |
59 | }; | |
60 | ||
61 | enum cr16_addrtype | |
62 | { | |
63 | CR16_INVALID, | |
64 | CR16_REG_REL, | |
65 | CR16_REGP_REL, | |
66 | CR16_INDEX_REGP_REL, | |
67 | CR16_ABSOLUTE | |
68 | }; | |
69 | ||
1bb99900 | 70 | extern void notice_update_cc (rtx); |
b25364a0 S |
71 | extern int cr16_operand_bit_pos (int val, int bitval); |
72 | extern void cr16_decompose_const (rtx x, int *code, | |
73 | enum data_model_type *data, | |
74 | bool treat_as_const); | |
75 | extern enum cr16_addrtype cr16_decompose_address (rtx addr, | |
76 | struct cr16_address *out, | |
77 | bool debug_print, | |
78 | bool treat_as_const); | |
79 | extern int cr16_const_double_ok (rtx op); | |
80 | extern int legitimate_pic_operand_p (rtx); | |
ef4bddc2 | 81 | extern rtx legitimize_pic_address (rtx, machine_mode, rtx); |
b25364a0 | 82 | |
b25364a0 S |
83 | |
84 | /* Prologue/Epilogue functions. */ | |
85 | extern int cr16_initial_elimination_offset (int, int); | |
86 | extern char *cr16_prepare_push_pop_string (int); | |
87 | extern void cr16_expand_prologue (void); | |
88 | extern void cr16_expand_epilogue (void); | |
89 | extern const char *cr16_emit_add_sub_di (rtx *, enum rtx_code); | |
90 | extern const char *cr16_emit_logical_di (rtx *, enum rtx_code); | |
91 | ||
fbe4f171 JR |
92 | #endif /* RTX_CODE. */ |
93 | ||
b25364a0 S |
94 | /* Handling the "interrupt" attribute. */ |
95 | extern int cr16_interrupt_function_p (void); | |
96 | extern bool cr16_is_data_model (enum data_model_type); | |
7b4df2bf | 97 | extern poly_int64 cr16_push_rounding (poly_int64); |
b25364a0 S |
98 | |
99 | #endif /* Not GCC_CR16_PROTOS_H. */ |