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