annotate gcc/recog.h @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
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.
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
2 Copyright (C) 1987-2020 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
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
27 typedef uint64_t alternative_mask; /* Keep in sync with genattrtab.c. */
111
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 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
116
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 extern int offsettable_memref_p (rtx);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
118 extern int offsettable_nonstrict_memref_p (rtx);
111
kono
parents: 67
diff changeset
119 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
120 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
121 #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
122 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
123 ADDR_SPACE_GENERIC)
111
kono
parents: 67
diff changeset
124 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
125
111
kono
parents: 67
diff changeset
126 extern int recog (rtx, rtx_insn *, int *);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 #ifndef GENERATOR_FILE
111
kono
parents: 67
diff changeset
128 static inline int recog_memoized (rtx_insn *insn);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
129 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 extern void add_clobbers (rtx, int);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
131 extern int added_clobbers_hard_reg_p (int);
111
kono
parents: 67
diff changeset
132 extern void insn_extract (rtx_insn *);
kono
parents: 67
diff changeset
133 extern void extract_insn (rtx_insn *);
kono
parents: 67
diff changeset
134 extern void extract_constrain_insn (rtx_insn *insn);
kono
parents: 67
diff changeset
135 extern void extract_constrain_insn_cached (rtx_insn *);
kono
parents: 67
diff changeset
136 extern void extract_insn_cached (rtx_insn *);
kono
parents: 67
diff changeset
137 extern void preprocess_constraints (int, int, const char **,
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
138 operand_alternative *, rtx **);
111
kono
parents: 67
diff changeset
139 extern const operand_alternative *preprocess_insn_constraints (unsigned int);
kono
parents: 67
diff changeset
140 extern void preprocess_constraints (rtx_insn *);
kono
parents: 67
diff changeset
141 extern rtx_insn *peep2_next_insn (int);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
142 extern int peep2_regno_dead_p (int, int);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
143 extern int peep2_reg_dead_p (int, rtx);
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
144 #ifdef HARD_CONST
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
145 extern rtx peep2_find_free_register (int, int, const char *,
111
kono
parents: 67
diff changeset
146 machine_mode, HARD_REG_SET *);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
147 #endif
111
kono
parents: 67
diff changeset
148 extern rtx_insn *peephole2_insns (rtx, rtx_insn *, int *);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
149
111
kono
parents: 67
diff changeset
150 extern int store_data_bypass_p (rtx_insn *, rtx_insn *);
kono
parents: 67
diff changeset
151 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
152
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
153 #ifndef GENERATOR_FILE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
154 /* Try recognizing the instruction INSN,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
155 and return the code number that results.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
156 Remember the code so that repeated calls do not
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
157 need to spend the time for actual rerecognition.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
158
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
159 This function is the normal interface to instruction recognition.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
160 The automatically-generated function `recog' is normally called
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
161 through this one. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
162
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
163 static inline int
111
kono
parents: 67
diff changeset
164 recog_memoized (rtx_insn *insn)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
165 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
166 if (INSN_CODE (insn) < 0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
167 INSN_CODE (insn) = recog (PATTERN (insn), insn, 0);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
168 return INSN_CODE (insn);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
169 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
170 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
171
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
172 /* 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
173 useful to skip alternatives in a constraint string. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
174 static inline const char *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
175 skip_alternative (const char *p)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
176 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
177 const char *r = p;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
178 while (*r != '\0' && *r != ',')
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
179 r++;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
180 if (*r == ',')
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
181 r++;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
182 return r;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
183 }
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 /* Nonzero means volatile operands are recognized. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
186 extern int volatile_ok;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
187
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
188 /* RAII class for temporarily setting volatile_ok. */
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
189
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
190 class temporary_volatile_ok
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
191 {
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
192 public:
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
193 temporary_volatile_ok (int value) : save_volatile_ok (volatile_ok)
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
194 {
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
195 volatile_ok = value;
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
196 }
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
197
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
198 ~temporary_volatile_ok () { volatile_ok = save_volatile_ok; }
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
199
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
200 private:
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
201 temporary_volatile_ok (const temporary_volatile_ok &);
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
202 int save_volatile_ok;
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
203 };
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
204
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
205 /* 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
206 matched. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
207 extern int which_alternative;
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 /* The following vectors hold the results from insn_extract. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
210
111
kono
parents: 67
diff changeset
211 struct recog_data_d
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
212 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
213 /* 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
214 structure and index on that. However, to be source compatible
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
215 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
216 templates, we need `operand' as a flat array. Without that
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
217 member, making an array for the rest seems pointless. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
218
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
219 /* Gives value of operand N. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
220 rtx operand[MAX_RECOG_OPERANDS];
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
221
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
222 /* Gives location where operand N was found. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
223 rtx *operand_loc[MAX_RECOG_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 constraint string for operand N. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
226 const char *constraints[MAX_RECOG_OPERANDS];
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
227
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
228 /* 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
229 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
230
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
231 /* Gives the mode of operand N. */
111
kono
parents: 67
diff changeset
232 machine_mode operand_mode[MAX_RECOG_OPERANDS];
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
233
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
234 /* Gives the type (in, out, inout) for operand N. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
235 enum op_type operand_type[MAX_RECOG_OPERANDS];
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
236
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
237 /* Gives location where the Nth duplicate-appearance of an operand
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
238 was found. This is something that matched MATCH_DUP. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
239 rtx *dup_loc[MAX_DUP_OPERANDS];
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
240
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
241 /* Gives the operand number that was duplicated in the Nth
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
242 duplicate-appearance of an operand. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
243 char dup_num[MAX_DUP_OPERANDS];
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 /* ??? 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
246 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
247 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
248 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
249 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
250 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
251 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
252 continue to consider unsignedness when performing arithmetic inside
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
253 a comparison. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
254
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
255 /* The number of operands of the insn. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
256 char n_operands;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
257
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
258 /* The number of MATCH_DUPs in the insn. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
259 char n_dups;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
260
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
261 /* The number of alternatives in the constraints for the insn. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
262 char n_alternatives;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
263
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
264 /* 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
265 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
266
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
267 /* In case we are caching, hold insn data was generated for. */
111
kono
parents: 67
diff changeset
268 rtx_insn *insn;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
269 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
270
111
kono
parents: 67
diff changeset
271 extern struct recog_data_d recog_data;
kono
parents: 67
diff changeset
272
kono
parents: 67
diff changeset
273 extern const operand_alternative *recog_op_alt;
kono
parents: 67
diff changeset
274
kono
parents: 67
diff changeset
275 /* Return a pointer to an array in which index OP describes the constraints
kono
parents: 67
diff changeset
276 on operand OP of the current instruction alternative (which_alternative).
kono
parents: 67
diff changeset
277 Only valid after calling preprocess_constraints and constrain_operands. */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
278
111
kono
parents: 67
diff changeset
279 inline static const operand_alternative *
kono
parents: 67
diff changeset
280 which_op_alt ()
kono
parents: 67
diff changeset
281 {
kono
parents: 67
diff changeset
282 gcc_checking_assert (IN_RANGE (which_alternative, 0,
kono
parents: 67
diff changeset
283 recog_data.n_alternatives - 1));
kono
parents: 67
diff changeset
284 return &recog_op_alt[which_alternative * recog_data.n_operands];
kono
parents: 67
diff changeset
285 }
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
286
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
287 /* 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
288 each insn-code value. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
289
111
kono
parents: 67
diff changeset
290 typedef int (*insn_operand_predicate_fn) (rtx, machine_mode);
kono
parents: 67
diff changeset
291 typedef const char * (*insn_output_fn) (rtx *, rtx_insn *);
kono
parents: 67
diff changeset
292
kono
parents: 67
diff changeset
293 struct insn_gen_fn
kono
parents: 67
diff changeset
294 {
kono
parents: 67
diff changeset
295 typedef rtx_insn * (*f0) (void);
kono
parents: 67
diff changeset
296 typedef rtx_insn * (*f1) (rtx);
kono
parents: 67
diff changeset
297 typedef rtx_insn * (*f2) (rtx, rtx);
kono
parents: 67
diff changeset
298 typedef rtx_insn * (*f3) (rtx, rtx, rtx);
kono
parents: 67
diff changeset
299 typedef rtx_insn * (*f4) (rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
300 typedef rtx_insn * (*f5) (rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
301 typedef rtx_insn * (*f6) (rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
302 typedef rtx_insn * (*f7) (rtx, rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
303 typedef rtx_insn * (*f8) (rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
304 typedef rtx_insn * (*f9) (rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
305 typedef rtx_insn * (*f10) (rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
306 typedef rtx_insn * (*f11) (rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
307 typedef rtx_insn * (*f12) (rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
308 typedef rtx_insn * (*f13) (rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
309 typedef rtx_insn * (*f14) (rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
310 typedef rtx_insn * (*f15) (rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents: 67
diff changeset
311 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
312
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
313 typedef void (*stored_funcptr) (void);
111
kono
parents: 67
diff changeset
314
kono
parents: 67
diff changeset
315 rtx_insn * operator () (void) const { return ((f0)func) (); }
kono
parents: 67
diff changeset
316 rtx_insn * operator () (rtx a0) const { return ((f1)func) (a0); }
kono
parents: 67
diff changeset
317 rtx_insn * operator () (rtx a0, rtx a1) const { return ((f2)func) (a0, a1); }
kono
parents: 67
diff changeset
318 rtx_insn * operator () (rtx a0, rtx a1, rtx a2) const { return ((f3)func) (a0, a1, a2); }
kono
parents: 67
diff changeset
319 rtx_insn * operator () (rtx a0, rtx a1, rtx a2, rtx a3) const { return ((f4)func) (a0, a1, a2, a3); }
kono
parents: 67
diff changeset
320 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
321 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
322 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
323 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
324 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
325 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
326 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
327 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
328 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
329 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
330 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
331 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
332
kono
parents: 67
diff changeset
333 // This is for compatibility of code that invokes functions like
kono
parents: 67
diff changeset
334 // (*funcptr) (arg)
kono
parents: 67
diff changeset
335 insn_gen_fn operator * (void) const { return *this; }
kono
parents: 67
diff changeset
336
kono
parents: 67
diff changeset
337 // The wrapped function pointer must be public and there must not be any
kono
parents: 67
diff changeset
338 // constructors. Otherwise the insn_data_d struct initializers generated
kono
parents: 67
diff changeset
339 // by genoutput.c will result in static initializer functions, which defeats
kono
parents: 67
diff changeset
340 // the purpose of the generated insn_data_d array.
kono
parents: 67
diff changeset
341 stored_funcptr func;
kono
parents: 67
diff changeset
342 };
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 struct insn_operand_data
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
345 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
346 const insn_operand_predicate_fn predicate;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
347
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
348 const char *const constraint;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
349
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
350 ENUM_BITFIELD(machine_mode) const mode : 16;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
351
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
352 const char strict_low;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
353
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
354 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
355
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
356 const char eliminable;
111
kono
parents: 67
diff changeset
357
kono
parents: 67
diff changeset
358 const char allows_mem;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
359 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
360
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
361 /* 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
362 is stored in insn_data.output. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
363 #define INSN_OUTPUT_FORMAT_NONE 0 /* abort */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
364 #define INSN_OUTPUT_FORMAT_SINGLE 1 /* const char * */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
365 #define INSN_OUTPUT_FORMAT_MULTI 2 /* const char * const * */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
366 #define INSN_OUTPUT_FORMAT_FUNCTION 3 /* const char * (*)(...) */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
367
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
368 struct insn_data_d
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
369 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
370 const char *const name;
111
kono
parents: 67
diff changeset
371 #if HAVE_DESIGNATED_UNION_INITIALIZERS
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
372 union {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
373 const char *single;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
374 const char *const *multi;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
375 insn_output_fn function;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
376 } output;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
377 #else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
378 struct {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
379 const char *single;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
380 const char *const *multi;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
381 insn_output_fn function;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
382 } output;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
383 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
384 const insn_gen_fn genfun;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
385 const struct insn_operand_data *const operand;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
386
111
kono
parents: 67
diff changeset
387 const char n_generator_args;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
388 const char n_operands;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
389 const char n_dups;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
390 const char n_alternatives;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
391 const char output_format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
392 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
393
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
394 extern const struct insn_data_d insn_data[];
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
395 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
396
111
kono
parents: 67
diff changeset
397 #ifndef GENERATOR_FILE
kono
parents: 67
diff changeset
398 #include "insn-codes.h"
kono
parents: 67
diff changeset
399
kono
parents: 67
diff changeset
400 /* An enum of boolean attributes that may only depend on the current
kono
parents: 67
diff changeset
401 subtarget, not on things like operands or compiler phase. */
kono
parents: 67
diff changeset
402 enum bool_attr {
kono
parents: 67
diff changeset
403 BA_ENABLED,
kono
parents: 67
diff changeset
404 BA_PREFERRED_FOR_SPEED,
kono
parents: 67
diff changeset
405 BA_PREFERRED_FOR_SIZE,
kono
parents: 67
diff changeset
406 BA_LAST = BA_PREFERRED_FOR_SIZE
kono
parents: 67
diff changeset
407 };
kono
parents: 67
diff changeset
408
kono
parents: 67
diff changeset
409 /* Target-dependent globals. */
kono
parents: 67
diff changeset
410 struct target_recog {
kono
parents: 67
diff changeset
411 bool x_initialized;
kono
parents: 67
diff changeset
412 alternative_mask x_bool_attr_masks[NUM_INSN_CODES][BA_LAST + 1];
kono
parents: 67
diff changeset
413 operand_alternative *x_op_alt[NUM_INSN_CODES];
kono
parents: 67
diff changeset
414 };
kono
parents: 67
diff changeset
415
kono
parents: 67
diff changeset
416 extern struct target_recog default_target_recog;
kono
parents: 67
diff changeset
417 #if SWITCHABLE_TARGET
kono
parents: 67
diff changeset
418 extern struct target_recog *this_target_recog;
kono
parents: 67
diff changeset
419 #else
kono
parents: 67
diff changeset
420 #define this_target_recog (&default_target_recog)
kono
parents: 67
diff changeset
421 #endif
kono
parents: 67
diff changeset
422
kono
parents: 67
diff changeset
423 alternative_mask get_enabled_alternatives (rtx_insn *);
kono
parents: 67
diff changeset
424 alternative_mask get_preferred_alternatives (rtx_insn *);
kono
parents: 67
diff changeset
425 alternative_mask get_preferred_alternatives (rtx_insn *, basic_block);
kono
parents: 67
diff changeset
426 bool check_bool_attrs (rtx_insn *);
kono
parents: 67
diff changeset
427
kono
parents: 67
diff changeset
428 void recog_init ();
kono
parents: 67
diff changeset
429 #endif
kono
parents: 67
diff changeset
430
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
431 #endif /* GCC_RECOG_H */