constraints.md revision 1.10 1 1.1 mrg ;; Constraint definitions for ARM and Thumb
2 1.10 mrg ;; Copyright (C) 2006-2019 Free Software Foundation, Inc.
3 1.1 mrg ;; Contributed by ARM Ltd.
4 1.1 mrg
5 1.1 mrg ;; This file is part of GCC.
6 1.1 mrg
7 1.1 mrg ;; GCC is free software; you can redistribute it and/or modify it
8 1.1 mrg ;; under the terms of the GNU General Public License as published
9 1.1 mrg ;; by the Free Software Foundation; either version 3, or (at your
10 1.1 mrg ;; option) any later version.
11 1.1 mrg
12 1.1 mrg ;; GCC is distributed in the hope that it will be useful, but WITHOUT
13 1.1 mrg ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 1.1 mrg ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 1.1 mrg ;; License for more details.
16 1.1 mrg
17 1.1 mrg ;; You should have received a copy of the GNU General Public License
18 1.1 mrg ;; along with GCC; see the file COPYING3. If not see
19 1.1 mrg ;; <http://www.gnu.org/licenses/>.
20 1.1 mrg
21 1.1 mrg ;; The following register constraints have been used:
22 1.3 mrg ;; - in ARM/Thumb-2 state: t, w, x, y, z
23 1.1 mrg ;; - in Thumb state: h, b
24 1.6 mrg ;; - in both states: l, c, k, q, Cs, Ts, US
25 1.1 mrg ;; In ARM state, 'l' is an alias for 'r'
26 1.3 mrg ;; 'f' and 'v' were previously used for FPA and MAVERICK registers.
27 1.1 mrg
28 1.1 mrg ;; The following normal constraints have been used:
29 1.3 mrg ;; in ARM/Thumb-2 state: G, I, j, J, K, L, M
30 1.1 mrg ;; in Thumb-1 state: I, J, K, L, M, N, O
31 1.3 mrg ;; 'H' was previously used for FPA.
32 1.1 mrg
33 1.1 mrg ;; The following multi-letter normal constraints have been used:
34 1.9 mrg ;; in ARM/Thumb-2 state: Da, Db, Dc, Dd, Dn, DN, Dm, Dl, DL, Do, Dv, Dy, Di,
35 1.10 mrg ;; Dt, Dp, Dz, Tu
36 1.3 mrg ;; in Thumb-1 state: Pa, Pb, Pc, Pd, Pe
37 1.10 mrg ;; in Thumb-2 state: Ha, Pj, PJ, Ps, Pt, Pu, Pv, Pw, Px, Py, Pz
38 1.8 mrg ;; in all states: Pf
39 1.1 mrg
40 1.1 mrg ;; The following memory constraints have been used:
41 1.8 mrg ;; in ARM/Thumb-2 state: Uh, Ut, Uv, Uy, Un, Um, Us
42 1.1 mrg ;; in ARM state: Uq
43 1.3 mrg ;; in Thumb state: Uu, Uw
44 1.8 mrg ;; in all states: Q
45 1.1 mrg
46 1.1 mrg
47 1.1 mrg (define_register_constraint "t" "TARGET_32BIT ? VFP_LO_REGS : NO_REGS"
48 1.1 mrg "The VFP registers @code{s0}-@code{s31}.")
49 1.1 mrg
50 1.1 mrg (define_register_constraint "w"
51 1.1 mrg "TARGET_32BIT ? (TARGET_VFPD32 ? VFP_REGS : VFP_LO_REGS) : NO_REGS"
52 1.1 mrg "The VFP registers @code{d0}-@code{d15}, or @code{d0}-@code{d31} for VFPv3.")
53 1.1 mrg
54 1.1 mrg (define_register_constraint "x" "TARGET_32BIT ? VFP_D0_D7_REGS : NO_REGS"
55 1.1 mrg "The VFP registers @code{d0}-@code{d7}.")
56 1.1 mrg
57 1.1 mrg (define_register_constraint "y" "TARGET_REALLY_IWMMXT ? IWMMXT_REGS : NO_REGS"
58 1.1 mrg "The Intel iWMMX co-processor registers.")
59 1.1 mrg
60 1.1 mrg (define_register_constraint "z"
61 1.1 mrg "TARGET_REALLY_IWMMXT ? IWMMXT_GR_REGS : NO_REGS"
62 1.1 mrg "The Intel iWMMX GR registers.")
63 1.1 mrg
64 1.1 mrg (define_register_constraint "l" "TARGET_THUMB ? LO_REGS : GENERAL_REGS"
65 1.1 mrg "In Thumb state the core registers @code{r0}-@code{r7}.")
66 1.1 mrg
67 1.1 mrg (define_register_constraint "h" "TARGET_THUMB ? HI_REGS : NO_REGS"
68 1.1 mrg "In Thumb state the core registers @code{r8}-@code{r15}.")
69 1.1 mrg
70 1.1 mrg (define_constraint "j"
71 1.1 mrg "A constant suitable for a MOVW instruction. (ARM/Thumb-2)"
72 1.8 mrg (and (match_test "TARGET_HAVE_MOVT")
73 1.5 mrg (ior (and (match_code "high")
74 1.5 mrg (match_test "arm_valid_symbolic_address_p (XEXP (op, 0))"))
75 1.1 mrg (and (match_code "const_int")
76 1.1 mrg (match_test "(ival & 0xffff0000) == 0")))))
77 1.1 mrg
78 1.3 mrg (define_constraint "Pj"
79 1.3 mrg "@internal A 12-bit constant suitable for an ADDW or SUBW instruction. (Thumb-2)"
80 1.3 mrg (and (match_code "const_int")
81 1.3 mrg (and (match_test "TARGET_THUMB2")
82 1.3 mrg (match_test "(ival & 0xfffff000) == 0"))))
83 1.3 mrg
84 1.3 mrg (define_constraint "PJ"
85 1.3 mrg "@internal A constant that satisfies the Pj constrant if negated."
86 1.3 mrg (and (match_code "const_int")
87 1.3 mrg (and (match_test "TARGET_THUMB2")
88 1.3 mrg (match_test "((-ival) & 0xfffff000) == 0"))))
89 1.3 mrg
90 1.1 mrg (define_register_constraint "k" "STACK_REG"
91 1.1 mrg "@internal The stack register.")
92 1.1 mrg
93 1.1 mrg (define_register_constraint "b" "TARGET_THUMB ? BASE_REGS : NO_REGS"
94 1.1 mrg "@internal
95 1.1 mrg Thumb only. The union of the low registers and the stack register.")
96 1.1 mrg
97 1.1 mrg (define_register_constraint "c" "CC_REG"
98 1.1 mrg "@internal The condition code register.")
99 1.1 mrg
100 1.5 mrg (define_register_constraint "Cs" "CALLER_SAVE_REGS"
101 1.5 mrg "@internal The caller save registers. Useful for sibcalls.")
102 1.5 mrg
103 1.1 mrg (define_constraint "I"
104 1.1 mrg "In ARM/Thumb-2 state a constant that can be used as an immediate value in a
105 1.1 mrg Data Processing instruction. In Thumb-1 state a constant in the range
106 1.1 mrg 0-255."
107 1.1 mrg (and (match_code "const_int")
108 1.1 mrg (match_test "TARGET_32BIT ? const_ok_for_arm (ival)
109 1.1 mrg : ival >= 0 && ival <= 255")))
110 1.1 mrg
111 1.1 mrg (define_constraint "J"
112 1.1 mrg "In ARM/Thumb-2 state a constant in the range @minus{}4095-4095. In Thumb-1
113 1.1 mrg state a constant in the range @minus{}255-@minus{}1."
114 1.1 mrg (and (match_code "const_int")
115 1.1 mrg (match_test "TARGET_32BIT ? (ival >= -4095 && ival <= 4095)
116 1.1 mrg : (ival >= -255 && ival <= -1)")))
117 1.1 mrg
118 1.1 mrg (define_constraint "K"
119 1.1 mrg "In ARM/Thumb-2 state a constant that satisfies the @code{I} constraint if
120 1.1 mrg inverted. In Thumb-1 state a constant that satisfies the @code{I}
121 1.1 mrg constraint multiplied by any power of 2."
122 1.1 mrg (and (match_code "const_int")
123 1.1 mrg (match_test "TARGET_32BIT ? const_ok_for_arm (~ival)
124 1.1 mrg : thumb_shiftable_const (ival)")))
125 1.1 mrg
126 1.1 mrg (define_constraint "L"
127 1.1 mrg "In ARM/Thumb-2 state a constant that satisfies the @code{I} constraint if
128 1.1 mrg negated. In Thumb-1 state a constant in the range @minus{}7-7."
129 1.1 mrg (and (match_code "const_int")
130 1.1 mrg (match_test "TARGET_32BIT ? const_ok_for_arm (-ival)
131 1.1 mrg : (ival >= -7 && ival <= 7)")))
132 1.1 mrg
133 1.1 mrg ;; The ARM state version is internal...
134 1.1 mrg ;; @internal In ARM/Thumb-2 state a constant in the range 0-32 or any
135 1.1 mrg ;; power of 2.
136 1.1 mrg (define_constraint "M"
137 1.1 mrg "In Thumb-1 state a constant that is a multiple of 4 in the range 0-1020."
138 1.1 mrg (and (match_code "const_int")
139 1.1 mrg (match_test "TARGET_32BIT ? ((ival >= 0 && ival <= 32)
140 1.3 mrg || (((ival & (ival - 1)) & 0xFFFFFFFF) == 0))
141 1.3 mrg : ival >= 0 && ival <= 1020 && (ival & 3) == 0")))
142 1.1 mrg
143 1.1 mrg (define_constraint "N"
144 1.1 mrg "Thumb-1 state a constant in the range 0-31."
145 1.1 mrg (and (match_code "const_int")
146 1.1 mrg (match_test "!TARGET_32BIT && (ival >= 0 && ival <= 31)")))
147 1.1 mrg
148 1.1 mrg (define_constraint "O"
149 1.1 mrg "In Thumb-1 state a constant that is a multiple of 4 in the range
150 1.1 mrg @minus{}508-508."
151 1.1 mrg (and (match_code "const_int")
152 1.1 mrg (match_test "TARGET_THUMB1 && ival >= -508 && ival <= 508
153 1.1 mrg && ((ival & 3) == 0)")))
154 1.1 mrg
155 1.1 mrg (define_constraint "Pa"
156 1.1 mrg "@internal In Thumb-1 state a constant in the range -510 to +510"
157 1.1 mrg (and (match_code "const_int")
158 1.1 mrg (match_test "TARGET_THUMB1 && ival >= -510 && ival <= 510
159 1.1 mrg && (ival > 255 || ival < -255)")))
160 1.1 mrg
161 1.1 mrg (define_constraint "Pb"
162 1.1 mrg "@internal In Thumb-1 state a constant in the range -262 to +262"
163 1.1 mrg (and (match_code "const_int")
164 1.1 mrg (match_test "TARGET_THUMB1 && ival >= -262 && ival <= 262
165 1.1 mrg && (ival > 255 || ival < -255)")))
166 1.1 mrg
167 1.3 mrg (define_constraint "Pc"
168 1.3 mrg "@internal In Thumb-1 state a constant that is in the range 1021 to 1275"
169 1.3 mrg (and (match_code "const_int")
170 1.3 mrg (match_test "TARGET_THUMB1
171 1.3 mrg && ival > 1020 && ival <= 1275")))
172 1.3 mrg
173 1.3 mrg (define_constraint "Pd"
174 1.5 mrg "@internal In Thumb state a constant in the range 0 to 7"
175 1.3 mrg (and (match_code "const_int")
176 1.5 mrg (match_test "TARGET_THUMB && ival >= 0 && ival <= 7")))
177 1.3 mrg
178 1.3 mrg (define_constraint "Pe"
179 1.3 mrg "@internal In Thumb-1 state a constant in the range 256 to +510"
180 1.3 mrg (and (match_code "const_int")
181 1.3 mrg (match_test "TARGET_THUMB1 && ival >= 256 && ival <= 510")))
182 1.3 mrg
183 1.8 mrg (define_constraint "Pf"
184 1.8 mrg "Memory models except relaxed, consume or release ones."
185 1.8 mrg (and (match_code "const_int")
186 1.8 mrg (match_test "!is_mm_relaxed (memmodel_from_int (ival))
187 1.8 mrg && !is_mm_consume (memmodel_from_int (ival))
188 1.8 mrg && !is_mm_release (memmodel_from_int (ival))")))
189 1.8 mrg
190 1.1 mrg (define_constraint "Ps"
191 1.1 mrg "@internal In Thumb-2 state a constant in the range -255 to +255"
192 1.1 mrg (and (match_code "const_int")
193 1.1 mrg (match_test "TARGET_THUMB2 && ival >= -255 && ival <= 255")))
194 1.1 mrg
195 1.1 mrg (define_constraint "Pt"
196 1.1 mrg "@internal In Thumb-2 state a constant in the range -7 to +7"
197 1.1 mrg (and (match_code "const_int")
198 1.1 mrg (match_test "TARGET_THUMB2 && ival >= -7 && ival <= 7")))
199 1.1 mrg
200 1.3 mrg (define_constraint "Pu"
201 1.3 mrg "@internal In Thumb-2 state a constant in the range +1 to +8"
202 1.3 mrg (and (match_code "const_int")
203 1.3 mrg (match_test "TARGET_THUMB2 && ival >= 1 && ival <= 8")))
204 1.3 mrg
205 1.3 mrg (define_constraint "Pv"
206 1.3 mrg "@internal In Thumb-2 state a constant in the range -255 to 0"
207 1.3 mrg (and (match_code "const_int")
208 1.3 mrg (match_test "TARGET_THUMB2 && ival >= -255 && ival <= 0")))
209 1.3 mrg
210 1.3 mrg (define_constraint "Pw"
211 1.3 mrg "@internal In Thumb-2 state a constant in the range -255 to -1"
212 1.3 mrg (and (match_code "const_int")
213 1.3 mrg (match_test "TARGET_THUMB2 && ival >= -255 && ival <= -1")))
214 1.3 mrg
215 1.3 mrg (define_constraint "Px"
216 1.3 mrg "@internal In Thumb-2 state a constant in the range -7 to -1"
217 1.3 mrg (and (match_code "const_int")
218 1.3 mrg (match_test "TARGET_THUMB2 && ival >= -7 && ival <= -1")))
219 1.3 mrg
220 1.3 mrg (define_constraint "Py"
221 1.3 mrg "@internal In Thumb-2 state a constant in the range 0 to 255"
222 1.3 mrg (and (match_code "const_int")
223 1.3 mrg (match_test "TARGET_THUMB2 && ival >= 0 && ival <= 255")))
224 1.3 mrg
225 1.5 mrg (define_constraint "Pz"
226 1.5 mrg "@internal In Thumb-2 state the constant 0"
227 1.5 mrg (and (match_code "const_int")
228 1.5 mrg (match_test "TARGET_THUMB2 && (ival == 0)")))
229 1.5 mrg
230 1.1 mrg (define_constraint "G"
231 1.3 mrg "In ARM/Thumb-2 state the floating-point constant 0."
232 1.1 mrg (and (match_code "const_double")
233 1.1 mrg (match_test "TARGET_32BIT && arm_const_double_rtx (op)")))
234 1.1 mrg
235 1.10 mrg (define_constraint "Ha"
236 1.10 mrg "@internal In ARM / Thumb-2 a float constant iff literal pools are allowed."
237 1.10 mrg (and (match_code "const_double")
238 1.10 mrg (match_test "satisfies_constraint_E (op)")
239 1.10 mrg (match_test "!arm_disable_literal_pool")))
240 1.10 mrg
241 1.3 mrg (define_constraint "Dz"
242 1.3 mrg "@internal
243 1.3 mrg In ARM/Thumb-2 state a vector of constant zeros."
244 1.3 mrg (and (match_code "const_vector")
245 1.3 mrg (match_test "TARGET_NEON && op == CONST0_RTX (mode)")))
246 1.1 mrg
247 1.1 mrg (define_constraint "Da"
248 1.1 mrg "@internal
249 1.1 mrg In ARM/Thumb-2 state a const_int, const_double or const_vector that can
250 1.1 mrg be generated with two Data Processing insns."
251 1.1 mrg (and (match_code "const_double,const_int,const_vector")
252 1.1 mrg (match_test "TARGET_32BIT && arm_const_double_inline_cost (op) == 2")))
253 1.1 mrg
254 1.1 mrg (define_constraint "Db"
255 1.1 mrg "@internal
256 1.1 mrg In ARM/Thumb-2 state a const_int, const_double or const_vector that can
257 1.1 mrg be generated with three Data Processing insns."
258 1.1 mrg (and (match_code "const_double,const_int,const_vector")
259 1.1 mrg (match_test "TARGET_32BIT && arm_const_double_inline_cost (op) == 3")))
260 1.1 mrg
261 1.1 mrg (define_constraint "Dc"
262 1.1 mrg "@internal
263 1.1 mrg In ARM/Thumb-2 state a const_int, const_double or const_vector that can
264 1.1 mrg be generated with four Data Processing insns. This pattern is disabled
265 1.1 mrg if optimizing for space or when we have load-delay slots to fill."
266 1.1 mrg (and (match_code "const_double,const_int,const_vector")
267 1.1 mrg (match_test "TARGET_32BIT && arm_const_double_inline_cost (op) == 4
268 1.1 mrg && !(optimize_size || arm_ld_sched)")))
269 1.1 mrg
270 1.3 mrg (define_constraint "Dd"
271 1.3 mrg "@internal
272 1.3 mrg In ARM/Thumb-2 state a const_int that can be used by insn adddi."
273 1.3 mrg (and (match_code "const_int")
274 1.3 mrg (match_test "TARGET_32BIT && const_ok_for_dimode_op (ival, PLUS)")))
275 1.3 mrg
276 1.5 mrg (define_constraint "De"
277 1.5 mrg "@internal
278 1.5 mrg In ARM/Thumb-2 state a const_int that can be used by insn anddi."
279 1.5 mrg (and (match_code "const_int")
280 1.5 mrg (match_test "TARGET_32BIT && const_ok_for_dimode_op (ival, AND)")))
281 1.5 mrg
282 1.5 mrg (define_constraint "Df"
283 1.5 mrg "@internal
284 1.5 mrg In ARM/Thumb-2 state a const_int that can be used by insn iordi."
285 1.5 mrg (and (match_code "const_int")
286 1.5 mrg (match_test "TARGET_32BIT && const_ok_for_dimode_op (ival, IOR)")))
287 1.5 mrg
288 1.5 mrg (define_constraint "Dg"
289 1.5 mrg "@internal
290 1.5 mrg In ARM/Thumb-2 state a const_int that can be used by insn xordi."
291 1.5 mrg (and (match_code "const_int")
292 1.5 mrg (match_test "TARGET_32BIT && const_ok_for_dimode_op (ival, XOR)")))
293 1.5 mrg
294 1.3 mrg (define_constraint "Di"
295 1.3 mrg "@internal
296 1.3 mrg In ARM/Thumb-2 state a const_int or const_double where both the high
297 1.3 mrg and low SImode words can be generated as immediates in 32-bit instructions."
298 1.3 mrg (and (match_code "const_double,const_int")
299 1.3 mrg (match_test "TARGET_32BIT && arm_const_double_by_immediates (op)")))
300 1.3 mrg
301 1.9 mrg (define_constraint "Dm"
302 1.1 mrg "@internal
303 1.9 mrg In ARM/Thumb-2 state a const_vector which can be loaded with a Neon vmov
304 1.9 mrg immediate instruction."
305 1.9 mrg (and (match_code "const_vector")
306 1.1 mrg (match_test "TARGET_32BIT
307 1.1 mrg && imm_for_neon_mov_operand (op, GET_MODE (op))")))
308 1.1 mrg
309 1.9 mrg (define_constraint "Dn"
310 1.9 mrg "@internal
311 1.9 mrg In ARM/Thumb-2 state a DImode const_int which can be loaded with a Neon vmov
312 1.9 mrg immediate instruction."
313 1.9 mrg (and (match_code "const_int")
314 1.9 mrg (match_test "TARGET_32BIT && imm_for_neon_mov_operand (op, DImode)")))
315 1.9 mrg
316 1.9 mrg (define_constraint "DN"
317 1.9 mrg "@internal
318 1.9 mrg In ARM/Thumb-2 state a TImode const_int which can be loaded with a Neon vmov
319 1.9 mrg immediate instruction."
320 1.9 mrg (and (match_code "const_int")
321 1.9 mrg (match_test "TARGET_32BIT && imm_for_neon_mov_operand (op, TImode)")))
322 1.9 mrg
323 1.1 mrg (define_constraint "Dl"
324 1.1 mrg "@internal
325 1.1 mrg In ARM/Thumb-2 state a const_vector which can be used with a Neon vorr or
326 1.1 mrg vbic instruction."
327 1.1 mrg (and (match_code "const_vector")
328 1.1 mrg (match_test "TARGET_32BIT
329 1.1 mrg && imm_for_neon_logic_operand (op, GET_MODE (op))")))
330 1.1 mrg
331 1.1 mrg (define_constraint "DL"
332 1.1 mrg "@internal
333 1.1 mrg In ARM/Thumb-2 state a const_vector which can be used with a Neon vorn or
334 1.1 mrg vand instruction."
335 1.1 mrg (and (match_code "const_vector")
336 1.1 mrg (match_test "TARGET_32BIT
337 1.1 mrg && imm_for_neon_inv_logic_operand (op, GET_MODE (op))")))
338 1.1 mrg
339 1.3 mrg (define_constraint "Do"
340 1.3 mrg "@internal
341 1.3 mrg In ARM/Thumb2 state valid offset for an ldrd/strd instruction."
342 1.3 mrg (and (match_code "const_int")
343 1.3 mrg (match_test "TARGET_LDRD && offset_ok_for_ldrd_strd (ival)")))
344 1.3 mrg
345 1.1 mrg (define_constraint "Dv"
346 1.1 mrg "@internal
347 1.1 mrg In ARM/Thumb-2 state a const_double which can be used with a VFP fconsts
348 1.1 mrg instruction."
349 1.1 mrg (and (match_code "const_double")
350 1.1 mrg (match_test "TARGET_32BIT && vfp3_const_double_rtx (op)")))
351 1.1 mrg
352 1.1 mrg (define_constraint "Dy"
353 1.1 mrg "@internal
354 1.1 mrg In ARM/Thumb-2 state a const_double which can be used with a VFP fconstd
355 1.1 mrg instruction."
356 1.1 mrg (and (match_code "const_double")
357 1.1 mrg (match_test "TARGET_32BIT && TARGET_VFP_DOUBLE && vfp3_const_double_rtx (op)")))
358 1.1 mrg
359 1.5 mrg (define_constraint "Dt"
360 1.3 mrg "@internal
361 1.3 mrg In ARM/ Thumb2 a const_double which can be used with a vcvt.f32.s32 with fract bits operation"
362 1.3 mrg (and (match_code "const_double")
363 1.8 mrg (match_test "TARGET_32BIT && vfp3_const_double_for_fract_bits (op)")))
364 1.3 mrg
365 1.5 mrg (define_constraint "Dp"
366 1.5 mrg "@internal
367 1.5 mrg In ARM/ Thumb2 a const_double which can be used with a vcvt.s32.f32 with bits operation"
368 1.5 mrg (and (match_code "const_double")
369 1.8 mrg (match_test "TARGET_32BIT
370 1.5 mrg && vfp3_const_double_for_bits (op) > 0")))
371 1.5 mrg
372 1.10 mrg (define_constraint "Tu"
373 1.10 mrg "@internal In ARM / Thumb-2 an integer constant iff literal pools are
374 1.10 mrg allowed."
375 1.10 mrg (and (match_test "CONSTANT_P (op)")
376 1.10 mrg (match_test "!arm_disable_literal_pool")))
377 1.10 mrg
378 1.5 mrg (define_register_constraint "Ts" "(arm_restrict_it) ? LO_REGS : GENERAL_REGS"
379 1.5 mrg "For arm_restrict_it the core registers @code{r0}-@code{r7}. GENERAL_REGS otherwise.")
380 1.5 mrg
381 1.3 mrg (define_memory_constraint "Ua"
382 1.3 mrg "@internal
383 1.3 mrg An address valid for loading/storing register exclusive"
384 1.3 mrg (match_operand 0 "mem_noofs_operand"))
385 1.3 mrg
386 1.3 mrg (define_memory_constraint "Uh"
387 1.3 mrg "@internal
388 1.3 mrg An address suitable for byte and half-word loads which does not point inside a constant pool"
389 1.3 mrg (and (match_code "mem")
390 1.3 mrg (match_test "arm_legitimate_address_p (GET_MODE (op), XEXP (op, 0), false) && !arm_is_constant_pool_ref (op)")))
391 1.3 mrg
392 1.1 mrg (define_memory_constraint "Ut"
393 1.1 mrg "@internal
394 1.1 mrg In ARM/Thumb-2 state an address valid for loading/storing opaque structure
395 1.1 mrg types wider than TImode."
396 1.1 mrg (and (match_code "mem")
397 1.1 mrg (match_test "TARGET_32BIT && neon_struct_mem_operand (op)")))
398 1.1 mrg
399 1.1 mrg (define_memory_constraint "Uv"
400 1.1 mrg "@internal
401 1.1 mrg In ARM/Thumb-2 state a valid VFP load/store address."
402 1.1 mrg (and (match_code "mem")
403 1.1 mrg (match_test "TARGET_32BIT && arm_coproc_mem_operand (op, FALSE)")))
404 1.1 mrg
405 1.1 mrg (define_memory_constraint "Uy"
406 1.1 mrg "@internal
407 1.1 mrg In ARM/Thumb-2 state a valid iWMMX load/store address."
408 1.1 mrg (and (match_code "mem")
409 1.1 mrg (match_test "TARGET_32BIT && arm_coproc_mem_operand (op, TRUE)")))
410 1.1 mrg
411 1.1 mrg (define_memory_constraint "Un"
412 1.1 mrg "@internal
413 1.1 mrg In ARM/Thumb-2 state a valid address for Neon doubleword vector
414 1.1 mrg load/store instructions."
415 1.1 mrg (and (match_code "mem")
416 1.5 mrg (match_test "TARGET_32BIT && neon_vector_mem_operand (op, 0, true)")))
417 1.1 mrg
418 1.1 mrg (define_memory_constraint "Um"
419 1.1 mrg "@internal
420 1.1 mrg In ARM/Thumb-2 state a valid address for Neon element and structure
421 1.1 mrg load/store instructions."
422 1.1 mrg (and (match_code "mem")
423 1.5 mrg (match_test "TARGET_32BIT && neon_vector_mem_operand (op, 2, true)")))
424 1.1 mrg
425 1.1 mrg (define_memory_constraint "Us"
426 1.1 mrg "@internal
427 1.1 mrg In ARM/Thumb-2 state a valid address for non-offset loads/stores of
428 1.1 mrg quad-word values in four ARM registers."
429 1.1 mrg (and (match_code "mem")
430 1.5 mrg (match_test "TARGET_32BIT && neon_vector_mem_operand (op, 1, true)")))
431 1.1 mrg
432 1.1 mrg (define_memory_constraint "Uq"
433 1.1 mrg "@internal
434 1.1 mrg In ARM state an address valid in ldrsb instructions."
435 1.1 mrg (and (match_code "mem")
436 1.1 mrg (match_test "TARGET_ARM
437 1.1 mrg && arm_legitimate_address_outer_p (GET_MODE (op), XEXP (op, 0),
438 1.3 mrg SIGN_EXTEND, 0)
439 1.3 mrg && !arm_is_constant_pool_ref (op)")))
440 1.1 mrg
441 1.1 mrg (define_memory_constraint "Q"
442 1.1 mrg "@internal
443 1.8 mrg An address that is a single base register."
444 1.1 mrg (and (match_code "mem")
445 1.1 mrg (match_test "REG_P (XEXP (op, 0))")))
446 1.1 mrg
447 1.3 mrg (define_memory_constraint "Uu"
448 1.3 mrg "@internal
449 1.3 mrg In Thumb state an address that is valid in 16bit encoding."
450 1.3 mrg (and (match_code "mem")
451 1.3 mrg (match_test "TARGET_THUMB
452 1.3 mrg && thumb1_legitimate_address_p (GET_MODE (op), XEXP (op, 0),
453 1.3 mrg 0)")))
454 1.3 mrg
455 1.3 mrg ; The 16-bit post-increment LDR/STR accepted by thumb1_legitimate_address_p
456 1.3 mrg ; are actually LDM/STM instructions, so cannot be used to access unaligned
457 1.3 mrg ; data.
458 1.3 mrg (define_memory_constraint "Uw"
459 1.3 mrg "@internal
460 1.3 mrg In Thumb state an address that is valid in 16bit encoding, and that can be
461 1.3 mrg used for unaligned accesses."
462 1.3 mrg (and (match_code "mem")
463 1.3 mrg (match_test "TARGET_THUMB
464 1.3 mrg && thumb1_legitimate_address_p (GET_MODE (op), XEXP (op, 0),
465 1.3 mrg 0)
466 1.3 mrg && GET_CODE (XEXP (op, 0)) != POST_INC")))
467 1.3 mrg
468 1.5 mrg (define_constraint "US"
469 1.5 mrg "@internal
470 1.5 mrg US is a symbol reference."
471 1.5 mrg (match_code "symbol_ref")
472 1.5 mrg )
473 1.5 mrg
474 1.8 mrg (define_memory_constraint "Uz"
475 1.8 mrg "@internal
476 1.8 mrg A memory access that is accessible as an LDC/STC operand"
477 1.8 mrg (and (match_code "mem")
478 1.8 mrg (match_test "arm_coproc_ldc_stc_legitimate_address (op)")))
479 1.8 mrg
480 1.1 mrg ;; We used to have constraint letters for S and R in ARM state, but
481 1.1 mrg ;; all uses of these now appear to have been removed.
482 1.1 mrg
483 1.1 mrg ;; Additionally, we used to have a Q constraint in Thumb state, but
484 1.1 mrg ;; this wasn't really a valid memory constraint. Again, all uses of
485 1.1 mrg ;; this now seem to have been removed.
486 1.5 mrg
487