annotate gcc/config/cr16/cr16-protos.h @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Prototypes for exported functions defined in cr16.c
kono
parents:
diff changeset
2 Copyright (C) 2012-2017 Free Software Foundation, Inc.
kono
parents:
diff changeset
3 Contributed by KPIT Cummins Infosystems Limited.
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 This file is part of GCC.
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 GCC is free software; you can redistribute it and/or modify it
kono
parents:
diff changeset
8 under the terms of the GNU General Public License as published
kono
parents:
diff changeset
9 by the Free Software Foundation; either version 3, or (at your
kono
parents:
diff changeset
10 option) any later version.
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 GCC is distributed in the hope that it will be useful, but WITHOUT
kono
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
kono
parents:
diff changeset
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
kono
parents:
diff changeset
15 License for more details.
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
18 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
19 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 #ifndef GCC_CR16_PROTOS_H
kono
parents:
diff changeset
22 #define GCC_CR16_PROTOS_H
kono
parents:
diff changeset
23
kono
parents:
diff changeset
24 /* Register usage. */
kono
parents:
diff changeset
25 extern enum reg_class cr16_regno_reg_class (int);
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 /* Passing function arguments. */
kono
parents:
diff changeset
28 extern int cr16_function_arg_regno_p (int);
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 #ifdef TREE_CODE
kono
parents:
diff changeset
31 #ifdef RTX_CODE
kono
parents:
diff changeset
32
kono
parents:
diff changeset
33 extern void cr16_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx);
kono
parents:
diff changeset
34
kono
parents:
diff changeset
35 #endif /* RTX_CODE. */
kono
parents:
diff changeset
36 #endif /* TREE_CODE. */
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 /* Enumeration giving the various data models we support. */
kono
parents:
diff changeset
39 enum data_model_type
kono
parents:
diff changeset
40 {
kono
parents:
diff changeset
41 DM_DEFAULT, /* Default data model (in CR16C/C+ - up to 16M). */
kono
parents:
diff changeset
42 DM_NEAR, /* Near data model (in CR16C/C+ - up to 1M). */
kono
parents:
diff changeset
43 DM_FAR, /* Far data model (in CR16C+ - up to 4G)
kono
parents:
diff changeset
44 (in CR16C - up to 16M). */
kono
parents:
diff changeset
45 ILLEGAL_DM /* Illegal data model. */
kono
parents:
diff changeset
46 };
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 #ifdef RTX_CODE
kono
parents:
diff changeset
49
kono
parents:
diff changeset
50 /* Addressing Modes. */
kono
parents:
diff changeset
51 struct cr16_address
kono
parents:
diff changeset
52 {
kono
parents:
diff changeset
53 rtx base; /* Base register: Any register or register pair. */
kono
parents:
diff changeset
54 rtx index; /* Index register: If one is present. */
kono
parents:
diff changeset
55 rtx disp; /* Displacement or Absolute address. */
kono
parents:
diff changeset
56 enum data_model_type data; /* data ref type. */
kono
parents:
diff changeset
57 int code; /* Whether the address is code address.
kono
parents:
diff changeset
58 0 - data, 1 - code label, 2 - function label. */
kono
parents:
diff changeset
59 };
kono
parents:
diff changeset
60
kono
parents:
diff changeset
61 enum cr16_addrtype
kono
parents:
diff changeset
62 {
kono
parents:
diff changeset
63 CR16_INVALID,
kono
parents:
diff changeset
64 CR16_REG_REL,
kono
parents:
diff changeset
65 CR16_REGP_REL,
kono
parents:
diff changeset
66 CR16_INDEX_REGP_REL,
kono
parents:
diff changeset
67 CR16_ABSOLUTE
kono
parents:
diff changeset
68 };
kono
parents:
diff changeset
69
kono
parents:
diff changeset
70 extern void notice_update_cc (rtx);
kono
parents:
diff changeset
71 extern int cr16_operand_bit_pos (int val, int bitval);
kono
parents:
diff changeset
72 extern void cr16_decompose_const (rtx x, int *code,
kono
parents:
diff changeset
73 enum data_model_type *data,
kono
parents:
diff changeset
74 bool treat_as_const);
kono
parents:
diff changeset
75 extern enum cr16_addrtype cr16_decompose_address (rtx addr,
kono
parents:
diff changeset
76 struct cr16_address *out,
kono
parents:
diff changeset
77 bool debug_print,
kono
parents:
diff changeset
78 bool treat_as_const);
kono
parents:
diff changeset
79 extern int cr16_const_double_ok (rtx op);
kono
parents:
diff changeset
80 extern int legitimate_pic_operand_p (rtx);
kono
parents:
diff changeset
81 extern rtx legitimize_pic_address (rtx, machine_mode, rtx);
kono
parents:
diff changeset
82
kono
parents:
diff changeset
83
kono
parents:
diff changeset
84 /* Prologue/Epilogue functions. */
kono
parents:
diff changeset
85 extern int cr16_initial_elimination_offset (int, int);
kono
parents:
diff changeset
86 extern char *cr16_prepare_push_pop_string (int);
kono
parents:
diff changeset
87 extern void cr16_expand_prologue (void);
kono
parents:
diff changeset
88 extern void cr16_expand_epilogue (void);
kono
parents:
diff changeset
89 extern const char *cr16_emit_add_sub_di (rtx *, enum rtx_code);
kono
parents:
diff changeset
90 extern const char *cr16_emit_logical_di (rtx *, enum rtx_code);
kono
parents:
diff changeset
91
kono
parents:
diff changeset
92 #endif /* RTX_CODE. */
kono
parents:
diff changeset
93
kono
parents:
diff changeset
94 /* Handling the "interrupt" attribute. */
kono
parents:
diff changeset
95 extern int cr16_interrupt_function_p (void);
kono
parents:
diff changeset
96 extern bool cr16_is_data_model (enum data_model_type);
kono
parents:
diff changeset
97
kono
parents:
diff changeset
98 #endif /* Not GCC_CR16_PROTOS_H. */