annotate gcc/config/epiphany/predicates.md @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ;; Predicate definitions for code generation on the EPIPHANY cpu.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 ;; Copyright (C) 1994-2018 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3 ;; Contributed by Embecosm on behalf of Adapteva, Inc.
kono
parents:
diff changeset
4 ;;
kono
parents:
diff changeset
5 ;; This file is part of GCC.
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 ;; GCC is free software; you can redistribute it and/or modify
kono
parents:
diff changeset
8 ;; it under the terms of the GNU General Public License as published by
kono
parents:
diff changeset
9 ;; the Free Software Foundation; either version 3, or (at your option)
kono
parents:
diff changeset
10 ;; any later version.
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 ;; GCC is distributed in the hope that it will be useful,
kono
parents:
diff changeset
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
kono
parents:
diff changeset
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
kono
parents:
diff changeset
15 ;; GNU General Public License for more details.
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 ;; You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
18 ;; along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
19 ;; <http://www.gnu.org/licenses/>.
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 ;; Returns true iff OP is a symbol reference that is a valid operand
kono
parents:
diff changeset
22 ;; in a jump or call instruction.
kono
parents:
diff changeset
23
kono
parents:
diff changeset
24 (define_predicate "symbolic_operand"
kono
parents:
diff changeset
25 (match_code "symbol_ref,label_ref,const")
kono
parents:
diff changeset
26 {
kono
parents:
diff changeset
27 if (GET_CODE (op) == SYMBOL_REF)
kono
parents:
diff changeset
28 return (!epiphany_is_long_call_p (op)
kono
parents:
diff changeset
29 && (!flag_pic || SYMBOL_REF_LOCAL_P (op)));
kono
parents:
diff changeset
30 if (GET_CODE (op) == LABEL_REF)
kono
parents:
diff changeset
31 return true;
kono
parents:
diff changeset
32 if (GET_CODE (op) == CONST)
kono
parents:
diff changeset
33 {
kono
parents:
diff changeset
34 op = XEXP (op, 0);
kono
parents:
diff changeset
35 if (GET_CODE (op) != PLUS || !symbolic_operand (XEXP (op, 0), mode))
kono
parents:
diff changeset
36 return false;
kono
parents:
diff changeset
37 /* The idea here is that a 'small' constant offset should be OK.
kono
parents:
diff changeset
38 What exactly is considered 'small' is a bit arbitrary. */
kono
parents:
diff changeset
39 return satisfies_constraint_L (XEXP (op, 1));
kono
parents:
diff changeset
40 }
kono
parents:
diff changeset
41 gcc_unreachable ();
kono
parents:
diff changeset
42 })
kono
parents:
diff changeset
43
kono
parents:
diff changeset
44 ;; Acceptable arguments to the call insn.
kono
parents:
diff changeset
45
kono
parents:
diff changeset
46 (define_predicate "call_address_operand"
kono
parents:
diff changeset
47 (ior (match_code "reg")
kono
parents:
diff changeset
48 (match_operand 0 "symbolic_operand")))
kono
parents:
diff changeset
49
kono
parents:
diff changeset
50 (define_predicate "call_operand"
kono
parents:
diff changeset
51 (match_code "mem")
kono
parents:
diff changeset
52 {
kono
parents:
diff changeset
53 op = XEXP (op, 0);
kono
parents:
diff changeset
54 return call_address_operand (op, mode);
kono
parents:
diff changeset
55 })
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 ;; general purpose register.
kono
parents:
diff changeset
58 (define_predicate "gpr_operand"
kono
parents:
diff changeset
59 (match_code "reg,subreg")
kono
parents:
diff changeset
60 {
kono
parents:
diff changeset
61 int regno;
kono
parents:
diff changeset
62
kono
parents:
diff changeset
63 if (!register_operand (op, mode))
kono
parents:
diff changeset
64 return 0;
kono
parents:
diff changeset
65 if (GET_CODE (op) == SUBREG)
kono
parents:
diff changeset
66 op = XEXP (op, 0);
kono
parents:
diff changeset
67 regno = REGNO (op);
kono
parents:
diff changeset
68 return regno >= FIRST_PSEUDO_REGISTER || regno <= 63;
kono
parents:
diff changeset
69 })
kono
parents:
diff changeset
70
kono
parents:
diff changeset
71 (define_special_predicate "any_gpr_operand"
kono
parents:
diff changeset
72 (match_code "subreg,reg")
kono
parents:
diff changeset
73 {
kono
parents:
diff changeset
74 return gpr_operand (op, mode);
kono
parents:
diff changeset
75 })
kono
parents:
diff changeset
76
kono
parents:
diff changeset
77 ;; register suitable for integer add / sub operations; besides general purpose
kono
parents:
diff changeset
78 ;; registers we allow fake hard registers that are eliminated to a real
kono
parents:
diff changeset
79 ;; hard register via an offset.
kono
parents:
diff changeset
80 (define_predicate "add_reg_operand"
kono
parents:
diff changeset
81 (match_code "reg,subreg")
kono
parents:
diff changeset
82 {
kono
parents:
diff changeset
83 int regno;
kono
parents:
diff changeset
84
kono
parents:
diff changeset
85 if (!register_operand (op, mode))
kono
parents:
diff changeset
86 return 0;
kono
parents:
diff changeset
87 if (GET_CODE (op) == SUBREG)
kono
parents:
diff changeset
88 op = XEXP (op, 0);
kono
parents:
diff changeset
89 regno = REGNO (op);
kono
parents:
diff changeset
90 return (regno >= FIRST_PSEUDO_REGISTER || regno <= 63
kono
parents:
diff changeset
91 || regno == FRAME_POINTER_REGNUM
kono
parents:
diff changeset
92 || regno == ARG_POINTER_REGNUM);
kono
parents:
diff changeset
93 })
kono
parents:
diff changeset
94
kono
parents:
diff changeset
95 ;; Also allows suitable constants
kono
parents:
diff changeset
96 (define_predicate "add_operand"
kono
parents:
diff changeset
97 (match_code "reg,subreg,const_int,symbol_ref,label_ref,const")
kono
parents:
diff changeset
98 {
kono
parents:
diff changeset
99 if (GET_CODE (op) == REG || GET_CODE (op) == SUBREG)
kono
parents:
diff changeset
100 return add_reg_operand (op, mode);
kono
parents:
diff changeset
101 return satisfies_constraint_L (op) || satisfies_constraint_CnL (op);
kono
parents:
diff changeset
102 })
kono
parents:
diff changeset
103
kono
parents:
diff changeset
104 ;; Ordinary 3rd operand for arithmetic operations
kono
parents:
diff changeset
105 (define_predicate "arith_operand"
kono
parents:
diff changeset
106 (match_code "reg,subreg,const_int,symbol_ref,label_ref,const")
kono
parents:
diff changeset
107 {
kono
parents:
diff changeset
108 if (GET_CODE (op) == REG || GET_CODE (op) == SUBREG)
kono
parents:
diff changeset
109 return register_operand (op, mode);
kono
parents:
diff changeset
110 return satisfies_constraint_L (op);
kono
parents:
diff changeset
111 })
kono
parents:
diff changeset
112
kono
parents:
diff changeset
113 ;; Constant integer 3rd operand for arithmetic operations
kono
parents:
diff changeset
114 (define_predicate "arith_int_operand"
kono
parents:
diff changeset
115 (match_code "const_int,symbol_ref,label_ref,const")
kono
parents:
diff changeset
116 {
kono
parents:
diff changeset
117 return satisfies_constraint_L (op);
kono
parents:
diff changeset
118 })
kono
parents:
diff changeset
119
kono
parents:
diff changeset
120 ;; Return true if OP is an acceptable argument for a single word move source.
kono
parents:
diff changeset
121
kono
parents:
diff changeset
122 (define_predicate "move_src_operand"
kono
parents:
diff changeset
123 (match_code
kono
parents:
diff changeset
124 "symbol_ref,label_ref,const,const_int,const_double,reg,subreg,mem,unspec")
kono
parents:
diff changeset
125 {
kono
parents:
diff changeset
126 switch (GET_CODE (op))
kono
parents:
diff changeset
127 {
kono
parents:
diff changeset
128 case SYMBOL_REF :
kono
parents:
diff changeset
129 case LABEL_REF :
kono
parents:
diff changeset
130 case CONST :
kono
parents:
diff changeset
131 return 1;
kono
parents:
diff changeset
132 case CONST_INT :
kono
parents:
diff changeset
133 return immediate_operand (op, mode);
kono
parents:
diff changeset
134 case CONST_DOUBLE :
kono
parents:
diff changeset
135 /* SImode constants should always fit into a CONST_INT. Large
kono
parents:
diff changeset
136 unsigned 32-bit constants are represented as negative CONST_INTs. */
kono
parents:
diff changeset
137 gcc_assert (GET_MODE (op) != SImode);
kono
parents:
diff changeset
138 /* We can handle 32-bit floating point constants. */
kono
parents:
diff changeset
139 if (mode == SFmode)
kono
parents:
diff changeset
140 return GET_MODE (op) == SFmode;
kono
parents:
diff changeset
141 return 0;
kono
parents:
diff changeset
142 case REG :
kono
parents:
diff changeset
143 return op != frame_pointer_rtx && register_operand (op, mode);
kono
parents:
diff changeset
144 case SUBREG :
kono
parents:
diff changeset
145 /* (subreg (mem ...) ...) can occur here if the inner part was once a
kono
parents:
diff changeset
146 pseudo-reg and is now a stack slot. */
kono
parents:
diff changeset
147 if (GET_CODE (SUBREG_REG (op)) == MEM)
kono
parents:
diff changeset
148 return address_operand (XEXP (SUBREG_REG (op), 0), mode);
kono
parents:
diff changeset
149 else
kono
parents:
diff changeset
150 return register_operand (op, mode);
kono
parents:
diff changeset
151 case MEM :
kono
parents:
diff changeset
152 return address_operand (XEXP (op, 0), mode);
kono
parents:
diff changeset
153 case UNSPEC:
kono
parents:
diff changeset
154 return satisfies_constraint_Sra (op);
kono
parents:
diff changeset
155 default :
kono
parents:
diff changeset
156 return 0;
kono
parents:
diff changeset
157 }
kono
parents:
diff changeset
158 })
kono
parents:
diff changeset
159
kono
parents:
diff changeset
160 ;; Return true if OP is an acceptable argument for a double word move source.
kono
parents:
diff changeset
161
kono
parents:
diff changeset
162 (define_predicate "move_double_src_operand"
kono
parents:
diff changeset
163 (match_code "reg,subreg,mem,const_int,const_double,const_vector")
kono
parents:
diff changeset
164 {
kono
parents:
diff changeset
165 if (GET_CODE (op) == MEM && misaligned_operand (op, mode)
kono
parents:
diff changeset
166 && !address_operand (plus_constant (Pmode, XEXP (op, 0), 4), SImode))
kono
parents:
diff changeset
167 return 0;
kono
parents:
diff changeset
168 return general_operand (op, mode);
kono
parents:
diff changeset
169 })
kono
parents:
diff changeset
170
kono
parents:
diff changeset
171 ;; Return true if OP is an acceptable argument for a move destination.
kono
parents:
diff changeset
172
kono
parents:
diff changeset
173 (define_predicate "move_dest_operand"
kono
parents:
diff changeset
174 (match_code "reg,subreg,mem")
kono
parents:
diff changeset
175 {
kono
parents:
diff changeset
176 switch (GET_CODE (op))
kono
parents:
diff changeset
177 {
kono
parents:
diff changeset
178 case REG :
kono
parents:
diff changeset
179 return register_operand (op, mode);
kono
parents:
diff changeset
180 case SUBREG :
kono
parents:
diff changeset
181 /* (subreg (mem ...) ...) can occur here if the inner part was once a
kono
parents:
diff changeset
182 pseudo-reg and is now a stack slot. */
kono
parents:
diff changeset
183 if (GET_CODE (SUBREG_REG (op)) == MEM)
kono
parents:
diff changeset
184 {
kono
parents:
diff changeset
185 return address_operand (XEXP (SUBREG_REG (op), 0), mode);
kono
parents:
diff changeset
186 }
kono
parents:
diff changeset
187 else
kono
parents:
diff changeset
188 {
kono
parents:
diff changeset
189 return register_operand (op, mode);
kono
parents:
diff changeset
190 }
kono
parents:
diff changeset
191 case MEM :
kono
parents:
diff changeset
192 if (GET_MODE_SIZE (mode) == 8 && misaligned_operand (op, mode)
kono
parents:
diff changeset
193 && !address_operand (plus_constant (Pmode, XEXP (op, 0), 4), SImode))
kono
parents:
diff changeset
194 return 0;
kono
parents:
diff changeset
195 return address_operand (XEXP (op, 0), mode);
kono
parents:
diff changeset
196 default :
kono
parents:
diff changeset
197 return 0;
kono
parents:
diff changeset
198 }
kono
parents:
diff changeset
199 })
kono
parents:
diff changeset
200
kono
parents:
diff changeset
201 (define_special_predicate "stacktop_operand"
kono
parents:
diff changeset
202 (match_code "mem")
kono
parents:
diff changeset
203 {
kono
parents:
diff changeset
204 if (mode != VOIDmode && GET_MODE (op) != mode)
kono
parents:
diff changeset
205 return false;
kono
parents:
diff changeset
206 return rtx_equal_p (XEXP (op, 0), stack_pointer_rtx);
kono
parents:
diff changeset
207 })
kono
parents:
diff changeset
208
kono
parents:
diff changeset
209 ;; Return 1 if OP is a comparison operator valid for the mode of CC.
kono
parents:
diff changeset
210 ;; This allows the use of MATCH_OPERATOR to recognize all the branch insns.
kono
parents:
diff changeset
211 ;;
kono
parents:
diff changeset
212 ;; Some insns only set a few bits in the condition code. So only allow those
kono
parents:
diff changeset
213 ;; comparisons that use the bits that are valid.
kono
parents:
diff changeset
214
kono
parents:
diff changeset
215 (define_predicate "proper_comparison_operator"
kono
parents:
diff changeset
216 (match_code "eq, ne, le, lt, ge, gt, leu, ltu, geu, gtu, unordered, ordered, uneq, unge, ungt, unle, unlt, ltgt")
kono
parents:
diff changeset
217 {
kono
parents:
diff changeset
218 enum rtx_code code = GET_CODE (op);
kono
parents:
diff changeset
219 rtx cc = XEXP (op, 0);
kono
parents:
diff changeset
220
kono
parents:
diff changeset
221 /* combine can try strange things. */
kono
parents:
diff changeset
222 if (!REG_P (cc))
kono
parents:
diff changeset
223 return 0;
kono
parents:
diff changeset
224 switch (GET_MODE (cc))
kono
parents:
diff changeset
225 {
kono
parents:
diff changeset
226 case E_CC_Zmode:
kono
parents:
diff changeset
227 case E_CC_N_NEmode:
kono
parents:
diff changeset
228 case E_CC_FP_EQmode:
kono
parents:
diff changeset
229 return REGNO (cc) == CC_REGNUM && (code == EQ || code == NE);
kono
parents:
diff changeset
230 case E_CC_C_LTUmode:
kono
parents:
diff changeset
231 return REGNO (cc) == CC_REGNUM && (code == LTU || code == GEU);
kono
parents:
diff changeset
232 case E_CC_C_GTUmode:
kono
parents:
diff changeset
233 return REGNO (cc) == CC_REGNUM && (code == GTU || code == LEU);
kono
parents:
diff changeset
234 case E_CC_FPmode:
kono
parents:
diff changeset
235 return (REGNO (cc) == CCFP_REGNUM
kono
parents:
diff changeset
236 && (code == EQ || code == NE || code == LT || code == LE));
kono
parents:
diff changeset
237 case E_CC_FP_GTEmode:
kono
parents:
diff changeset
238 return (REGNO (cc) == CC_REGNUM
kono
parents:
diff changeset
239 && (code == EQ || code == NE || code == GT || code == GE
kono
parents:
diff changeset
240 || code == UNLE || code == UNLT));
kono
parents:
diff changeset
241 case E_CC_FP_ORDmode:
kono
parents:
diff changeset
242 return REGNO (cc) == CC_REGNUM && (code == ORDERED || code == UNORDERED);
kono
parents:
diff changeset
243 case E_CC_FP_UNEQmode:
kono
parents:
diff changeset
244 return REGNO (cc) == CC_REGNUM && (code == UNEQ || code == LTGT);
kono
parents:
diff changeset
245 case E_CCmode:
kono
parents:
diff changeset
246 return REGNO (cc) == CC_REGNUM;
kono
parents:
diff changeset
247 /* From combiner. */
kono
parents:
diff changeset
248 case E_QImode: case E_SImode: case E_SFmode: case E_HImode:
kono
parents:
diff changeset
249 /* From cse.c:dead_libcall_p. */
kono
parents:
diff changeset
250 case E_DFmode:
kono
parents:
diff changeset
251 return 0;
kono
parents:
diff changeset
252 default:
kono
parents:
diff changeset
253 gcc_unreachable ();
kono
parents:
diff changeset
254 }
kono
parents:
diff changeset
255 })
kono
parents:
diff changeset
256
kono
parents:
diff changeset
257 (define_predicate "addsub_operator"
kono
parents:
diff changeset
258 (match_code "plus, minus"))
kono
parents:
diff changeset
259
kono
parents:
diff changeset
260 (define_predicate "cc_operand"
kono
parents:
diff changeset
261 (and (match_code "reg")
kono
parents:
diff changeset
262 (match_test "REGNO (op) == CC_REGNUM || REGNO (op) == CCFP_REGNUM")))
kono
parents:
diff changeset
263
kono
parents:
diff changeset
264 (define_predicate "const0_operand"
kono
parents:
diff changeset
265 (match_code "const_int, const_double")
kono
parents:
diff changeset
266 {
kono
parents:
diff changeset
267 if (mode == VOIDmode)
kono
parents:
diff changeset
268 mode = GET_MODE (op);
kono
parents:
diff changeset
269 return op == CONST0_RTX (mode);
kono
parents:
diff changeset
270 })
kono
parents:
diff changeset
271
kono
parents:
diff changeset
272 (define_predicate "const_float_1_operand"
kono
parents:
diff changeset
273 (match_code "const_double")
kono
parents:
diff changeset
274 {
kono
parents:
diff changeset
275 return op == CONST1_RTX (mode);
kono
parents:
diff changeset
276 })
kono
parents:
diff changeset
277
kono
parents:
diff changeset
278 (define_predicate "cc_move_operand"
kono
parents:
diff changeset
279 (and (match_code "reg")
kono
parents:
diff changeset
280 (ior (match_test "REGNO (op) == CC_REGNUM")
kono
parents:
diff changeset
281 (match_test "gpr_operand (op, mode)"))))
kono
parents:
diff changeset
282
kono
parents:
diff changeset
283 (define_predicate "float_operation"
kono
parents:
diff changeset
284 (match_code "parallel")
kono
parents:
diff changeset
285 {
kono
parents:
diff changeset
286 /* Most patterns start out with one SET and one CLOBBER, and gain a USE
kono
parents:
diff changeset
287 or two of FP_NEAREST_REGNUM / FP_TRUNCATE_REGNUM / FP_ANYFP_REGNUM
kono
parents:
diff changeset
288 after mode switching. The longer patterns are
kono
parents:
diff changeset
289 all beyond length 4, and before mode switching, end with a
kono
parents:
diff changeset
290 CLOBBER of CCFP_REGNUM. */
kono
parents:
diff changeset
291 int count = XVECLEN (op, 0);
kono
parents:
diff changeset
292 bool inserted = MACHINE_FUNCTION (cfun)->control_use_inserted;
kono
parents:
diff changeset
293 int i;
kono
parents:
diff changeset
294
kono
parents:
diff changeset
295 if (count == 2
kono
parents:
diff changeset
296 /* Vector ashift has an extra use for the constant factor required to
kono
parents:
diff changeset
297 implement the shift as multiply. */
kono
parents:
diff changeset
298 || (count == 3 && GET_CODE (XVECEXP (op, 0, 0)) == SET
kono
parents:
diff changeset
299 && GET_CODE (XEXP (XVECEXP (op, 0, 0), 1)) == ASHIFT))
kono
parents:
diff changeset
300 return !inserted;
kono
parents:
diff changeset
301
kono
parents:
diff changeset
302 /* combine / recog will pass any old garbage here before checking the
kono
parents:
diff changeset
303 rest of the insn. */
kono
parents:
diff changeset
304 if (count <= 3)
kono
parents:
diff changeset
305 return false;
kono
parents:
diff changeset
306
kono
parents:
diff changeset
307 i = 1;
kono
parents:
diff changeset
308 if (count > 4)
kono
parents:
diff changeset
309 for (i = 2; i < count; i++)
kono
parents:
diff changeset
310 {
kono
parents:
diff changeset
311 rtx x = XVECEXP (op, 0, i);
kono
parents:
diff changeset
312
kono
parents:
diff changeset
313 if (GET_CODE (x) == CLOBBER)
kono
parents:
diff changeset
314 {
kono
parents:
diff changeset
315 if (!REG_P (XEXP (x, 0)))
kono
parents:
diff changeset
316 return false;
kono
parents:
diff changeset
317 if (REGNO (XEXP (x, 0)) == CCFP_REGNUM)
kono
parents:
diff changeset
318 {
kono
parents:
diff changeset
319 if (count == i + 1)
kono
parents:
diff changeset
320 return !inserted;
kono
parents:
diff changeset
321 break;
kono
parents:
diff changeset
322 }
kono
parents:
diff changeset
323 /* Just an ordinary clobber, keep looking. */
kono
parents:
diff changeset
324 }
kono
parents:
diff changeset
325 else if (GET_CODE (x) == USE
kono
parents:
diff changeset
326 || (GET_CODE (x) == SET && i == 2))
kono
parents:
diff changeset
327 continue;
kono
parents:
diff changeset
328 else
kono
parents:
diff changeset
329 return false;
kono
parents:
diff changeset
330 }
kono
parents:
diff changeset
331 if (count != i + 3 || !inserted)
kono
parents:
diff changeset
332 return false;
kono
parents:
diff changeset
333 for (i = i+1; i < count; i++)
kono
parents:
diff changeset
334 {
kono
parents:
diff changeset
335 rtx x = XVECEXP (op, 0, i);
kono
parents:
diff changeset
336
kono
parents:
diff changeset
337 if (GET_CODE (x) != USE && GET_CODE (x) != CLOBBER)
kono
parents:
diff changeset
338 return false;
kono
parents:
diff changeset
339 x = XEXP (x, 0);
kono
parents:
diff changeset
340 if (!REG_P (x)
kono
parents:
diff changeset
341 || (REGNO (x) != FP_NEAREST_REGNUM
kono
parents:
diff changeset
342 && REGNO (x) != FP_TRUNCATE_REGNUM
kono
parents:
diff changeset
343 && REGNO (x) != FP_ANYFP_REGNUM))
kono
parents:
diff changeset
344 return false;
kono
parents:
diff changeset
345 }
kono
parents:
diff changeset
346 return true;
kono
parents:
diff changeset
347 })
kono
parents:
diff changeset
348
kono
parents:
diff changeset
349 (define_predicate "set_fp_mode_operand"
kono
parents:
diff changeset
350 (ior (match_test "gpr_operand (op, mode)")
kono
parents:
diff changeset
351 (and (match_code "const")
kono
parents:
diff changeset
352 (match_test "satisfies_constraint_Cfm (op)"))))
kono
parents:
diff changeset
353
kono
parents:
diff changeset
354 (define_predicate "post_modify_address"
kono
parents:
diff changeset
355 (match_code "post_modify,post_inc,post_dec"))
kono
parents:
diff changeset
356
kono
parents:
diff changeset
357 (define_predicate "post_modify_operand"
kono
parents:
diff changeset
358 (and (match_code "mem")
kono
parents:
diff changeset
359 (match_test "post_modify_address (XEXP (op, 0), Pmode)")))
kono
parents:
diff changeset
360
kono
parents:
diff changeset
361 ; used in the memory clobber of stack_adjust_str, allows addresses with
kono
parents:
diff changeset
362 ; large offsets.
kono
parents:
diff changeset
363 (define_predicate "memclob_operand"
kono
parents:
diff changeset
364 (match_code "mem"))
kono
parents:
diff changeset
365
kono
parents:
diff changeset
366 (define_predicate "nonsymbolic_immediate_operand"
kono
parents:
diff changeset
367 (ior (match_test "immediate_operand (op, mode)")
kono
parents:
diff changeset
368 (match_code "const_vector"))) /* Is this specific enough? */
kono
parents:
diff changeset
369
kono
parents:
diff changeset
370 ;; Return true if OP is misaligned memory operand
kono
parents:
diff changeset
371 (define_predicate "misaligned_operand"
kono
parents:
diff changeset
372 (and (match_code "mem")
kono
parents:
diff changeset
373 (match_test "MEM_ALIGN (op) < GET_MODE_ALIGNMENT (mode)")))