annotate gcc/recog.h @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents f6334be47118
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 /* Declarations for interface to insn recognizer and insn-output.c.
111
kono
parents: 67
diff changeset
2 Copyright (C) 1987-2017 Free Software Foundation, Inc.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 This file is part of GCC.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 GCC is free software; you can redistribute it and/or modify it under
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 the terms of the GNU General Public License as published by the Free
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 Software Foundation; either version 3, or (at your option) any later
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 version.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 for more details.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 along with GCC; see the file COPYING3. If not see
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 <http://www.gnu.org/licenses/>. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
20 #ifndef GCC_RECOG_H
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
21 #define GCC_RECOG_H
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
22
111
kono
parents: 67
diff changeset
23 /* Random number that should be large enough for all purposes. Also define
kono
parents: 67
diff changeset
24 a type that has at least MAX_RECOG_ALTERNATIVES + 1 bits, with the extra
kono
parents: 67
diff changeset
25 bit giving an invalid value that can be used to mean "uninitialized". */
kono
parents: 67
diff changeset
26 #define MAX_RECOG_ALTERNATIVES 35
kono
parents: 67
diff changeset
27 typedef uint64_t alternative_mask;
kono
parents: 67
diff changeset
28
kono
parents: 67
diff changeset
29 /* A mask of all alternatives. */
kono
parents: 67
diff changeset
30 #define ALL_ALTERNATIVES ((alternative_mask) -1)
kono
parents: 67
diff changeset
31
kono
parents: 67
diff changeset
32 /* A mask containing just alternative X. */
kono
parents: 67
diff changeset
33 #define ALTERNATIVE_BIT(X) ((alternative_mask) 1 << (X))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 /* Types of operands. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 enum op_type {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 OP_IN,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 OP_OUT,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 OP_INOUT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 struct operand_alternative
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 /* Pointer to the beginning of the constraint string for this alternative,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 for easier access by alternative number. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 const char *constraint;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
47
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 /* The register class valid for this alternative (possibly NO_REGS). */
111
kono
parents: 67
diff changeset
49 ENUM_BITFIELD (reg_class) cl : 16;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
50
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 /* "Badness" of this alternative, computed from number of '?' and '!'
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 characters in the constraint string. */
111
kono
parents: 67
diff changeset
53 unsigned int reject : 16;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 /* -1 if no matching constraint was found, or an operand number. */
111
kono
parents: 67
diff changeset
56 int matches : 8;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 /* The same information, but reversed: -1 if this operand is not
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 matched by any other, or the operand number of the operand that
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 matches this one. */
111
kono
parents: 67
diff changeset
60 int matched : 8;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
61
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 /* Nonzero if '&' was found in the constraint string. */
111
kono
parents: 67
diff changeset
63 unsigned int earlyclobber : 1;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 /* Nonzero if TARGET_MEM_CONSTRAINT was found in the constraint
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 string. */
111
kono
parents: 67
diff changeset
66 unsigned int memory_ok : 1;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 /* Nonzero if 'p' was found in the constraint string. */
111
kono
parents: 67
diff changeset
68 unsigned int is_address : 1;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 /* Nonzero if 'X' was found in the constraint string, or if the constraint
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 string for this alternative was empty. */
111
kono
parents: 67
diff changeset
71 unsigned int anything_ok : 1;
kono
parents: 67
diff changeset
72
kono
parents: 67
diff changeset
73 unsigned int unused : 12;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
75
111
kono
parents: 67
diff changeset
76 /* Return the class for operand I of alternative ALT, taking matching
kono
parents: 67
diff changeset
77 constraints into account. */
kono
parents: 67
diff changeset
78
kono
parents: 67
diff changeset
79 static inline enum reg_class
kono
parents: 67
diff changeset
80 alternative_class (const operand_alternative *alt, int i)
kono
parents: 67
diff changeset
81 {
kono
parents: 67
diff changeset
82 return alt[i].matches >= 0 ? alt[alt[i].matches].cl : alt[i].cl;
kono
parents: 67
diff changeset
83 }
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
84
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 extern void init_recog (void);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 extern void init_recog_no_volatile (void);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 extern int check_asm_operands (rtx);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
88 extern int asm_operand_ok (rtx, const char *, const char **);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 extern bool validate_change (rtx, rtx *, rtx, bool);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
90 extern bool validate_unshare_change (rtx, rtx *, rtx, bool);
111
kono
parents: 67
diff changeset
91 extern bool canonicalize_change_group (rtx_insn *insn, rtx x);
kono
parents: 67
diff changeset
92 extern int insn_invalid_p (rtx_insn *, bool);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 extern int verify_changes (int);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
94 extern void confirm_change_group (void);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
95 extern int apply_change_group (void);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
96 extern int num_validated_changes (void);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 extern void cancel_changes (int);
111
kono
parents: 67
diff changeset
98 extern int constrain_operands (int, alternative_mask);
kono
parents: 67
diff changeset
99 extern int constrain_operands_cached (rtx_insn *, int);
kono
parents: 67
diff changeset
100 extern int memory_address_addr_space_p (machine_mode, rtx, addr_space_t);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
101 #define memory_address_p(mode,addr) \
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
102 memory_address_addr_space_p ((mode), (addr), ADDR_SPACE_GENERIC)
111
kono
parents: 67
diff changeset
103 extern int strict_memory_address_addr_space_p (machine_mode, rtx,
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
104 addr_space_t);
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
105 #define strict_memory_address_p(mode,addr) \
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
106 strict_memory_address_addr_space_p ((mode), (addr), ADDR_SPACE_GENERIC)
111
kono
parents: 67
diff changeset
107 extern int validate_replace_rtx_subexp (rtx, rtx, rtx_insn *, rtx *);
kono
parents: 67
diff changeset
108 extern int validate_replace_rtx (rtx, rtx, rtx_insn *);
kono
parents: 67
diff changeset
109 extern int validate_replace_rtx_part (rtx, rtx, rtx *, rtx_insn *);
kono
parents: 67
diff changeset
110 extern int validate_replace_rtx_part_nosimplify (rtx, rtx, rtx *, rtx_insn *);
kono
parents: 67
diff changeset
111 extern void validate_replace_rtx_group (rtx, rtx, rtx_insn *);
kono
parents: 67
diff changeset
112 extern void validate_replace_src_group (rtx, rtx, rtx_insn *);
kono
parents: 67
diff changeset
113 extern bool validate_simplify_insn (rtx_insn *insn);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
114 extern int num_changes_pending (void);
111
kono
parents: 67
diff changeset
115 extern int next_insn_tests_no_inequality (rtx_insn *);
kono
parents: 67
diff changeset
116 extern bool reg_fits_class_p (const_rtx, reg_class_t, int, machine_mode);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
117
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
118 extern int offsettable_memref_p (rtx);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
119 extern int offsettable_nonstrict_memref_p (rtx);
111
kono
parents: 67
diff changeset
120 extern int offsettable_address_addr_space_p (int, machine_mode, rtx,
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
121 addr_space_t);
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
122 #define offsettable_address_p(strict,mode,addr) \
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
123 offsettable_address_addr_space_p ((strict), (mode), (addr), \
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
124 ADDR_SPACE_GENERIC)
111
kono
parents: 67
diff changeset
125 extern bool mode_dependent_address_p (rtx, addr_space_t);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
126
111
kono
parents: 67
diff changeset
127 extern int recog (rtx, rtx_insn *, int *);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 #ifndef GENERATOR_FILE
111
kono
parents: 67
diff changeset
129 static inline int recog_memoized (rtx_insn *insn);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
131 extern void add_clobbers (rtx, int);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
132 extern int added_clobbers_hard_reg_p (int);
111
kono
parents: 67
diff changeset
133 extern void insn_extract (rtx_insn *);
kono
parents: 67
diff changeset
134 extern void extract_insn (rtx_insn *);
kono
parents: 67
diff changeset
135 extern void extract_constrain_insn (rtx_insn *insn);
kono
parents: 67
diff changeset
136 extern void extract_constrain_insn_cached (rtx_insn *);
kono
parents: 67
diff changeset
137 extern void extract_insn_cached (rtx_insn *);
kono
parents: 67
diff changeset
138 extern void preprocess_constraints (int, int, const char **,
kono
parents: 67
diff changeset
139 operand_alternative *);
kono
parents: 67
diff changeset
140 extern const operand_alternative *preprocess_insn_constraints (unsigned int);
kono
parents: 67
diff changeset
141 extern void preprocess_constraints (rtx_insn *);
kono
parents: 67
diff changeset
142 extern rtx_insn *peep2_next_insn (int);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
143 extern int peep2_regno_dead_p (int, int);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
144 extern int peep2_reg_dead_p (int, rtx);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
145 #ifdef CLEAR_HARD_REG_SET
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
146 extern rtx peep2_find_free_register (int, int, const char *,
111
kono
parents: 67
diff changeset
147 machine_mode, HARD_REG_SET *);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 #endif
111
kono
parents: 67
diff changeset
149 extern rtx_insn *peephole2_insns (rtx, rtx_insn *, int *);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
150
111
kono
parents: 67
diff changeset
151 extern int store_data_bypass_p (rtx_insn *, rtx_insn *);
kono
parents: 67
diff changeset
152 extern int if_test_bypass_p (rtx_insn *, rtx_insn *);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
153
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
154 #ifndef GENERATOR_FILE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
155 /* Try recognizing the instruction INSN,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
156 and return the code number that results.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
157 Remember the code so that repeated calls do not
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
158 need to spend the time for actual rerecognition.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
159
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
160 This function is the normal interface to instruction recognition.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
161 The automatically-generated function `recog' is normally called
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
162 through this one. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
163
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
164 static inline int
111
kono
parents: 67
diff changeset
165 recog_memoized (rtx_insn *insn)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
166 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
167 if (INSN_CODE (insn) < 0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
168 INSN_CODE (insn) = recog (PATTERN (insn), insn, 0);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
169 return INSN_CODE (insn);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
170 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
171 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
172
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
173 /* Skip chars until the next ',' or the end of the string. This is
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
174 useful to skip alternatives in a constraint string. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
175 static inline const char *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
176 skip_alternative (const char *p)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
177 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
178 const char *r = p;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
179 while (*r != '\0' && *r != ',')
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
180 r++;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
181 if (*r == ',')
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
182 r++;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
183 return r;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
184 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
185
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
186 /* Nonzero means volatile operands are recognized. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
187 extern int volatile_ok;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
188
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
189 /* Set by constrain_operands to the number of the alternative that
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
190 matched. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
191 extern int which_alternative;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
192
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
193 /* The following vectors hold the results from insn_extract. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
194
111
kono
parents: 67
diff changeset
195 struct recog_data_d
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
196 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
197 /* It is very tempting to make the 5 operand related arrays into a
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
198 structure and index on that. However, to be source compatible
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
199 with all of the existing md file insn constraints and output
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
200 templates, we need `operand' as a flat array. Without that
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
201 member, making an array for the rest seems pointless. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
202
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
203 /* Gives value of operand N. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
204 rtx operand[MAX_RECOG_OPERANDS];
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
205
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
206 /* Gives location where operand N was found. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
207 rtx *operand_loc[MAX_RECOG_OPERANDS];
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
208
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
209 /* Gives the constraint string for operand N. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
210 const char *constraints[MAX_RECOG_OPERANDS];
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
211
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
212 /* Nonzero if operand N is a match_operator or a match_parallel. */
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
213 char is_operator[MAX_RECOG_OPERANDS];
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
214
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
215 /* Gives the mode of operand N. */
111
kono
parents: 67
diff changeset
216 machine_mode operand_mode[MAX_RECOG_OPERANDS];
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
217
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
218 /* Gives the type (in, out, inout) for operand N. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
219 enum op_type operand_type[MAX_RECOG_OPERANDS];
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
220
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
221 /* Gives location where the Nth duplicate-appearance of an operand
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
222 was found. This is something that matched MATCH_DUP. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
223 rtx *dup_loc[MAX_DUP_OPERANDS];
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
224
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
225 /* Gives the operand number that was duplicated in the Nth
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
226 duplicate-appearance of an operand. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
227 char dup_num[MAX_DUP_OPERANDS];
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
228
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
229 /* ??? Note that these are `char' instead of `unsigned char' to (try to)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
230 avoid certain lossage from K&R C, wherein `unsigned char' default
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
231 promotes to `unsigned int' instead of `int' as in ISO C. As of 1999,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
232 the most common places to bootstrap from K&R C are SunOS and HPUX,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
233 both of which have signed characters by default. The only other
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
234 supported natives that have both K&R C and unsigned characters are
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
235 ROMP and Irix 3, and neither have been seen for a while, but do
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
236 continue to consider unsignedness when performing arithmetic inside
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
237 a comparison. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
238
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
239 /* The number of operands of the insn. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
240 char n_operands;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
241
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
242 /* The number of MATCH_DUPs in the insn. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
243 char n_dups;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
244
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
245 /* The number of alternatives in the constraints for the insn. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
246 char n_alternatives;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
247
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
248 /* True if insn is ASM_OPERANDS. */
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
249 bool is_asm;
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
250
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
251 /* In case we are caching, hold insn data was generated for. */
111
kono
parents: 67
diff changeset
252 rtx_insn *insn;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
253 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
254
111
kono
parents: 67
diff changeset
255 extern struct recog_data_d recog_data;
kono
parents: 67
diff changeset
256
kono
parents: 67
diff changeset
257 extern const operand_alternative *recog_op_alt;
kono
parents: 67
diff changeset
258
kono
parents: 67
diff changeset
259 /* Return a pointer to an array in which index OP describes the constraints
kono
parents: 67
diff changeset
260 on operand OP of the current instruction alternative (which_alternative).
kono
parents: 67
diff changeset
261 Only valid after calling preprocess_constraints and constrain_operands. */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
262
111
kono
parents: 67
diff changeset
263 inline static const operand_alternative *
kono
parents: 67
diff changeset
264 which_op_alt ()
kono
parents: 67
diff changeset
265 {
kono
parents: 67
diff changeset
266 gcc_checking_assert (IN_RANGE (which_alternative, 0,
kono
parents: 67
diff changeset
267 recog_data.n_alternatives - 1));
kono
parents: 67
diff changeset
268 return &recog_op_alt[which_alternative * recog_data.n_operands];
kono
parents: 67
diff changeset
269 }
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
270
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
271 /* A table defined in insn-output.c that give information about
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
272 each insn-code value. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
273
111
kono
parents: 67
diff changeset
274 typedef int (*insn_operand_predicate_fn) (rtx, machine_mode);
kono
parents: 67
diff changeset
275 typedef const char * (*insn_output_fn) (rtx *, rtx_insn *);
kono
parents: 67
diff changeset
276
kono
parents: 67
diff changeset
277 struct insn_gen_fn
kono
parents: 67
diff changeset
278 {
kono
parents: 67
diff changeset
279 typedef rtx_insn * (*f0) (void);
kono
parents: 67
diff changeset
280 typedef rtx_insn * (*f1) (rtx);
kono
parents: 67
diff changeset
281 typedef rtx_insn * (*f2) (rtx, rtx);
kono
parents: 67
diff changeset
282 typedef rtx_insn * (*f3) (rtx, rtx, rtx);
kono
parents: 67
diff changeset
283 typedef rtx_insn * (*f4) (rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
284 typedef rtx_insn * (*f5) (rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
285 typedef rtx_insn * (*f6) (rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
286 typedef rtx_insn * (*f7) (rtx, rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
287 typedef rtx_insn * (*f8) (rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
288 typedef rtx_insn * (*f9) (rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
289 typedef rtx_insn * (*f10) (rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
290 typedef rtx_insn * (*f11) (rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
291 typedef rtx_insn * (*f12) (rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
292 typedef rtx_insn * (*f13) (rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
293 typedef rtx_insn * (*f14) (rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
294 typedef rtx_insn * (*f15) (rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
295 typedef rtx_insn * (*f16) (rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
296
kono
parents: 67
diff changeset
297 typedef f0 stored_funcptr;
kono
parents: 67
diff changeset
298
kono
parents: 67
diff changeset
299 rtx_insn * operator () (void) const { return ((f0)func) (); }
kono
parents: 67
diff changeset
300 rtx_insn * operator () (rtx a0) const { return ((f1)func) (a0); }
kono
parents: 67
diff changeset
301 rtx_insn * operator () (rtx a0, rtx a1) const { return ((f2)func) (a0, a1); }
kono
parents: 67
diff changeset
302 rtx_insn * operator () (rtx a0, rtx a1, rtx a2) const { return ((f3)func) (a0, a1, a2); }
kono
parents: 67
diff changeset
303 rtx_insn * operator () (rtx a0, rtx a1, rtx a2, rtx a3) const { return ((f4)func) (a0, a1, a2, a3); }
kono
parents: 67
diff changeset
304 rtx_insn * operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4) const { return ((f5)func) (a0, a1, a2, a3, a4); }
kono
parents: 67
diff changeset
305 rtx_insn * operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5) const { return ((f6)func) (a0, a1, a2, a3, a4, a5); }
kono
parents: 67
diff changeset
306 rtx_insn * operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6) const { return ((f7)func) (a0, a1, a2, a3, a4, a5, a6); }
kono
parents: 67
diff changeset
307 rtx_insn * operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7) const { return ((f8)func) (a0, a1, a2, a3, a4, a5, a6, a7); }
kono
parents: 67
diff changeset
308 rtx_insn * operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8) const { return ((f9)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8); }
kono
parents: 67
diff changeset
309 rtx_insn * operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9) const { return ((f10)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
kono
parents: 67
diff changeset
310 rtx_insn * operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10) const { return ((f11)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
kono
parents: 67
diff changeset
311 rtx_insn * operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11) const { return ((f12)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
kono
parents: 67
diff changeset
312 rtx_insn * operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12) const { return ((f13)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
kono
parents: 67
diff changeset
313 rtx_insn * operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12, rtx a13) const { return ((f14)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
kono
parents: 67
diff changeset
314 rtx_insn * operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12, rtx a13, rtx a14) const { return ((f15)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
kono
parents: 67
diff changeset
315 rtx_insn * operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12, rtx a13, rtx a14, rtx a15) const { return ((f16)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
kono
parents: 67
diff changeset
316
kono
parents: 67
diff changeset
317 // This is for compatibility of code that invokes functions like
kono
parents: 67
diff changeset
318 // (*funcptr) (arg)
kono
parents: 67
diff changeset
319 insn_gen_fn operator * (void) const { return *this; }
kono
parents: 67
diff changeset
320
kono
parents: 67
diff changeset
321 // The wrapped function pointer must be public and there must not be any
kono
parents: 67
diff changeset
322 // constructors. Otherwise the insn_data_d struct initializers generated
kono
parents: 67
diff changeset
323 // by genoutput.c will result in static initializer functions, which defeats
kono
parents: 67
diff changeset
324 // the purpose of the generated insn_data_d array.
kono
parents: 67
diff changeset
325 stored_funcptr func;
kono
parents: 67
diff changeset
326 };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
327
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
328 struct insn_operand_data
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
329 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
330 const insn_operand_predicate_fn predicate;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
331
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
332 const char *const constraint;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
333
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
334 ENUM_BITFIELD(machine_mode) const mode : 16;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
335
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
336 const char strict_low;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
337
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
338 const char is_operator;
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
339
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
340 const char eliminable;
111
kono
parents: 67
diff changeset
341
kono
parents: 67
diff changeset
342 const char allows_mem;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
343 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
344
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
345 /* Legal values for insn_data.output_format. Indicate what type of data
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
346 is stored in insn_data.output. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
347 #define INSN_OUTPUT_FORMAT_NONE 0 /* abort */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
348 #define INSN_OUTPUT_FORMAT_SINGLE 1 /* const char * */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
349 #define INSN_OUTPUT_FORMAT_MULTI 2 /* const char * const * */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
350 #define INSN_OUTPUT_FORMAT_FUNCTION 3 /* const char * (*)(...) */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
351
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
352 struct insn_data_d
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
353 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
354 const char *const name;
111
kono
parents: 67
diff changeset
355 #if HAVE_DESIGNATED_UNION_INITIALIZERS
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
356 union {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
357 const char *single;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
358 const char *const *multi;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
359 insn_output_fn function;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
360 } output;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
361 #else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
362 struct {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
363 const char *single;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
364 const char *const *multi;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
365 insn_output_fn function;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
366 } output;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
367 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
368 const insn_gen_fn genfun;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
369 const struct insn_operand_data *const operand;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
370
111
kono
parents: 67
diff changeset
371 const char n_generator_args;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
372 const char n_operands;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
373 const char n_dups;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
374 const char n_alternatives;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
375 const char output_format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
376 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
377
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
378 extern const struct insn_data_d insn_data[];
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
379 extern int peep2_current_count;
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
380
111
kono
parents: 67
diff changeset
381 #ifndef GENERATOR_FILE
kono
parents: 67
diff changeset
382 #include "insn-codes.h"
kono
parents: 67
diff changeset
383
kono
parents: 67
diff changeset
384 /* An enum of boolean attributes that may only depend on the current
kono
parents: 67
diff changeset
385 subtarget, not on things like operands or compiler phase. */
kono
parents: 67
diff changeset
386 enum bool_attr {
kono
parents: 67
diff changeset
387 BA_ENABLED,
kono
parents: 67
diff changeset
388 BA_PREFERRED_FOR_SPEED,
kono
parents: 67
diff changeset
389 BA_PREFERRED_FOR_SIZE,
kono
parents: 67
diff changeset
390 BA_LAST = BA_PREFERRED_FOR_SIZE
kono
parents: 67
diff changeset
391 };
kono
parents: 67
diff changeset
392
kono
parents: 67
diff changeset
393 /* Target-dependent globals. */
kono
parents: 67
diff changeset
394 struct target_recog {
kono
parents: 67
diff changeset
395 bool x_initialized;
kono
parents: 67
diff changeset
396 alternative_mask x_bool_attr_masks[NUM_INSN_CODES][BA_LAST + 1];
kono
parents: 67
diff changeset
397 operand_alternative *x_op_alt[NUM_INSN_CODES];
kono
parents: 67
diff changeset
398 };
kono
parents: 67
diff changeset
399
kono
parents: 67
diff changeset
400 extern struct target_recog default_target_recog;
kono
parents: 67
diff changeset
401 #if SWITCHABLE_TARGET
kono
parents: 67
diff changeset
402 extern struct target_recog *this_target_recog;
kono
parents: 67
diff changeset
403 #else
kono
parents: 67
diff changeset
404 #define this_target_recog (&default_target_recog)
kono
parents: 67
diff changeset
405 #endif
kono
parents: 67
diff changeset
406
kono
parents: 67
diff changeset
407 alternative_mask get_enabled_alternatives (rtx_insn *);
kono
parents: 67
diff changeset
408 alternative_mask get_preferred_alternatives (rtx_insn *);
kono
parents: 67
diff changeset
409 alternative_mask get_preferred_alternatives (rtx_insn *, basic_block);
kono
parents: 67
diff changeset
410 bool check_bool_attrs (rtx_insn *);
kono
parents: 67
diff changeset
411
kono
parents: 67
diff changeset
412 void recog_init ();
kono
parents: 67
diff changeset
413 #endif
kono
parents: 67
diff changeset
414
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
415 #endif /* GCC_RECOG_H */