1 /* Prototypes for exported functions defined in cr16.c
2 Copyright (C) 2012-2014 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);
26 extern int cr16_hard_regno_mode_ok (int regno
, enum machine_mode
);
28 /* Passing function arguments. */
29 extern int cr16_function_arg_regno_p (int);
34 extern void cr16_init_cumulative_args (CUMULATIVE_ARGS
*, tree
, rtx
);
36 #endif /* RTX_CODE. */
37 #endif /* TREE_CODE. */
39 /* Enumeration giving the various data models we support. */
42 DM_DEFAULT
, /* Default data model (in CR16C/C+ - up to 16M). */
43 DM_NEAR
, /* Near data model (in CR16C/C+ - up to 1M). */
44 DM_FAR
, /* Far data model (in CR16C+ - up to 4G)
45 (in CR16C - up to 16M). */
46 ILLEGAL_DM
/* Illegal data model. */
51 /* Addressing Modes. */
54 rtx base
; /* Base register: Any register or register pair. */
55 rtx index
; /* Index register: If one is present. */
56 rtx disp
; /* Displacement or Absolute address. */
57 enum data_model_type data
; /* data ref type. */
58 int code
; /* Whether the address is code address.
59 0 - data, 1 - code label, 2 - function label. */
71 extern void notice_update_cc (rtx
);
72 extern int cr16_operand_bit_pos (int val
, int bitval
);
73 extern void cr16_decompose_const (rtx x
, int *code
,
74 enum data_model_type
*data
,
76 extern enum cr16_addrtype
cr16_decompose_address (rtx addr
,
77 struct cr16_address
*out
,
80 extern int cr16_const_double_ok (rtx op
);
81 extern int legitimate_pic_operand_p (rtx
);
82 extern rtx
legitimize_pic_address (rtx
, enum machine_mode
, rtx
);
85 /* Prologue/Epilogue functions. */
86 extern int cr16_initial_elimination_offset (int, int);
87 extern char *cr16_prepare_push_pop_string (int);
88 extern void cr16_expand_prologue (void);
89 extern void cr16_expand_epilogue (void);
90 extern const char *cr16_emit_add_sub_di (rtx
*, enum rtx_code
);
91 extern const char *cr16_emit_logical_di (rtx
*, enum rtx_code
);
93 #endif /* RTX_CODE. */
95 /* Handling the "interrupt" attribute. */
96 extern int cr16_interrupt_function_p (void);
97 extern bool cr16_is_data_model (enum data_model_type
);
99 #endif /* Not GCC_CR16_PROTOS_H. */