h8300-protos.h revision 1.1 1 1.1 mrg /* Definitions of target machine for GNU compiler.
2 1.1 mrg Renesas H8/300 version
3 1.1 mrg Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
4 1.1 mrg Contributed by Steve Chamberlain (sac (at) cygnus.com),
5 1.1 mrg Jim Wilson (wilson (at) cygnus.com), and Doug Evans (dje (at) cygnus.com).
6 1.1 mrg
7 1.1 mrg This file is part of GCC.
8 1.1 mrg
9 1.1 mrg GCC is free software; you can redistribute it and/or modify
10 1.1 mrg it under the terms of the GNU General Public License as published by
11 1.1 mrg the Free Software Foundation; either version 3, or (at your option)
12 1.1 mrg any later version.
13 1.1 mrg
14 1.1 mrg GCC is distributed in the hope that it will be useful,
15 1.1 mrg but WITHOUT ANY WARRANTY; without even the implied warranty of
16 1.1 mrg MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 1.1 mrg GNU General Public License for more details.
18 1.1 mrg
19 1.1 mrg You should have received a copy of the GNU General Public License
20 1.1 mrg along with GCC; see the file COPYING3. If not see
21 1.1 mrg <http://www.gnu.org/licenses/>. */
22 1.1 mrg
23 1.1 mrg #ifndef GCC_H8300_PROTOS_H
24 1.1 mrg #define GCC_H8300_PROTOS_H
25 1.1 mrg
26 1.1 mrg /* Declarations for functions used in insn-output.c. */
27 1.1 mrg #ifdef RTX_CODE
28 1.1 mrg extern unsigned int compute_mov_length (rtx *);
29 1.1 mrg extern const char *output_plussi (rtx *);
30 1.1 mrg extern unsigned int compute_plussi_length (rtx *);
31 1.1 mrg extern int compute_plussi_cc (rtx *);
32 1.1 mrg extern const char *output_a_shift (rtx *);
33 1.1 mrg extern unsigned int compute_a_shift_length (rtx, rtx *);
34 1.1 mrg extern int compute_a_shift_cc (rtx, rtx *);
35 1.1 mrg extern const char *output_a_rotate (enum rtx_code, rtx *);
36 1.1 mrg extern unsigned int compute_a_rotate_length (rtx *);
37 1.1 mrg extern const char *output_simode_bld (int, rtx[]);
38 1.1 mrg extern void print_operand_address (FILE *, rtx);
39 1.1 mrg extern void print_operand (FILE *, rtx, int);
40 1.1 mrg extern void final_prescan_insn (rtx, rtx *, int);
41 1.1 mrg extern int h8300_expand_movsi (rtx[]);
42 1.1 mrg extern void notice_update_cc (rtx, rtx);
43 1.1 mrg extern const char *output_logical_op (enum machine_mode, rtx *);
44 1.1 mrg extern unsigned int compute_logical_op_length (enum machine_mode,
45 1.1 mrg rtx *);
46 1.1 mrg extern int compute_logical_op_cc (enum machine_mode, rtx *);
47 1.1 mrg extern void h8300_expand_branch (rtx[]);
48 1.1 mrg extern void h8300_expand_store (rtx[]);
49 1.1 mrg extern bool expand_a_shift (enum machine_mode, int, rtx[]);
50 1.1 mrg extern int h8300_shift_needs_scratch_p (int, enum machine_mode);
51 1.1 mrg extern int expand_a_rotate (rtx[]);
52 1.1 mrg extern int fix_bit_operand (rtx *, enum rtx_code);
53 1.1 mrg extern int h8300_adjust_insn_length (rtx, int);
54 1.1 mrg extern void split_adds_subs (enum machine_mode, rtx[]);
55 1.1 mrg
56 1.1 mrg extern int h8300_eightbit_constant_address_p (rtx);
57 1.1 mrg extern int h8300_tiny_constant_address_p (rtx);
58 1.1 mrg extern int byte_accesses_mergeable_p (rtx, rtx);
59 1.1 mrg extern int same_cmp_preceding_p (rtx);
60 1.1 mrg extern int same_cmp_following_p (rtx);
61 1.1 mrg
62 1.1 mrg extern int h8300_legitimate_constant_p (rtx);
63 1.1 mrg
64 1.1 mrg /* Used in builtins.c */
65 1.1 mrg extern rtx h8300_return_addr_rtx (int, rtx);
66 1.1 mrg
67 1.1 mrg /* Classifies an h8sx shift operation.
68 1.1 mrg
69 1.1 mrg H8SX_SHIFT_NONE
70 1.1 mrg The shift cannot be done in a single instruction.
71 1.1 mrg
72 1.1 mrg H8SX_SHIFT_UNARY
73 1.1 mrg The shift is effectively a unary operation. The instruction will
74 1.1 mrg allow any sort of destination operand and have a format similar
75 1.1 mrg to neg and not. This is true of certain power-of-2 shifts.
76 1.1 mrg
77 1.1 mrg H8SX_SHIFT_BINARY
78 1.1 mrg The shift is a binary operation. The destination must be a
79 1.1 mrg register and the source can be a register or a constant. */
80 1.1 mrg enum h8sx_shift_type {
81 1.1 mrg H8SX_SHIFT_NONE,
82 1.1 mrg H8SX_SHIFT_UNARY,
83 1.1 mrg H8SX_SHIFT_BINARY
84 1.1 mrg };
85 1.1 mrg
86 1.1 mrg extern enum h8sx_shift_type h8sx_classify_shift (enum machine_mode, enum rtx_code, rtx);
87 1.1 mrg extern int h8300_ldm_stm_parallel (rtvec, int, int);
88 1.1 mrg #endif /* RTX_CODE */
89 1.1 mrg
90 1.1 mrg #ifdef TREE_CODE
91 1.1 mrg extern struct rtx_def *function_arg (CUMULATIVE_ARGS *,
92 1.1 mrg enum machine_mode, tree, int);
93 1.1 mrg extern int h8300_funcvec_function_p (tree);
94 1.1 mrg extern int h8300_eightbit_data_p (tree);
95 1.1 mrg extern int h8300_tiny_data_p (tree);
96 1.1 mrg #endif /* TREE_CODE */
97 1.1 mrg
98 1.1 mrg extern void h8300_init_once (void);
99 1.1 mrg extern int h8300_can_use_return_insn_p (void);
100 1.1 mrg extern void h8300_expand_prologue (void);
101 1.1 mrg extern void h8300_expand_epilogue (void);
102 1.1 mrg extern int h8300_current_function_interrupt_function_p (void);
103 1.1 mrg extern int h8300_initial_elimination_offset (int, int);
104 1.1 mrg extern int h8300_regs_ok_for_stm (int, rtx[]);
105 1.1 mrg extern int h8300_hard_regno_rename_ok (unsigned int, unsigned int);
106 1.1 mrg extern int h8300_hard_regno_nregs (int, enum machine_mode);
107 1.1 mrg extern int h8300_hard_regno_mode_ok (int, enum machine_mode);
108 1.1 mrg
109 1.1 mrg struct cpp_reader;
110 1.1 mrg extern void h8300_pr_interrupt (struct cpp_reader *);
111 1.1 mrg extern void h8300_pr_saveall (struct cpp_reader *);
112 1.1 mrg extern enum reg_class h8300_reg_class_from_letter (int);
113 1.1 mrg extern rtx h8300_get_index (rtx, enum machine_mode mode, int *);
114 1.1 mrg extern unsigned int h8300_insn_length_from_table (rtx, rtx *);
115 1.1 mrg extern const char * output_h8sx_shift (rtx *, int, int);
116 1.1 mrg extern bool h8300_operands_match_p (rtx *);
117 1.1 mrg extern bool h8sx_mergeable_memrefs_p (rtx, rtx);
118 1.1 mrg extern bool h8sx_emit_movmd (rtx, rtx, rtx, HOST_WIDE_INT);
119 1.1 mrg extern void h8300_swap_into_er6 (rtx);
120 1.1 mrg extern void h8300_swap_out_of_er6 (rtx);
121 1.1 mrg
122 1.1 mrg #endif /* ! GCC_H8300_PROTOS_H */
123