]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/config/cr16/cr16-protos.h
1 /* Prototypes for exported functions defined in cr16.c
2 Copyright (C) 2012-2017 Free Software Foundation, Inc.
3 Contributed by KPIT Cummins Infosystems Limited.
5 This file is part of GCC.
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.
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.
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/>. */
21 #ifndef GCC_CR16_PROTOS_H
22 #define GCC_CR16_PROTOS_H
25 extern enum reg_class
cr16_regno_reg_class (int);
27 /* Passing function arguments. */
28 extern int cr16_function_arg_regno_p (int);
33 extern void cr16_init_cumulative_args (CUMULATIVE_ARGS
*, tree
, rtx
);
35 #endif /* RTX_CODE. */
36 #endif /* TREE_CODE. */
38 /* Enumeration giving the various data models we support. */
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. */
50 /* Addressing Modes. */
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. */
70 extern void notice_update_cc (rtx
);
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
,
75 extern enum cr16_addrtype
cr16_decompose_address (rtx addr
,
76 struct cr16_address
*out
,
79 extern int cr16_const_double_ok (rtx op
);
80 extern int legitimate_pic_operand_p (rtx
);
81 extern rtx
legitimize_pic_address (rtx
, machine_mode
, rtx
);
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
);
92 #endif /* RTX_CODE. */
94 /* Handling the "interrupt" attribute. */
95 extern int cr16_interrupt_function_p (void);
96 extern bool cr16_is_data_model (enum data_model_type
);
98 #endif /* Not GCC_CR16_PROTOS_H. */