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