111
|
1 ;; m32c constraints
|
145
|
2 ;; Copyright (C) 2012-2020 Free Software Foundation, Inc.
|
111
|
3 ;;
|
|
4 ;; This file is part of GCC.
|
|
5 ;;
|
|
6 ;; GCC is free software; you can redistribute it and/or modify it
|
|
7 ;; under the terms of the GNU General Public License as published by
|
|
8 ;; the Free Software Foundation; either version 3, or (at your option)
|
|
9 ;; any later version.
|
|
10 ;;
|
|
11 ;; GCC is distributed in the hope that it will be useful, but WITHOUT
|
|
12 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
13 ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
|
14 ;; License for more details.
|
|
15 ;;
|
|
16 ;; You should have received a copy of the GNU General Public License
|
|
17 ;; along with GCC; see the file COPYING3. If not see
|
|
18 ;; <http://www.gnu.org/licenses/>.
|
|
19
|
|
20 (define_register_constraint "Rsp" "SP_REGS"
|
|
21 "@internal")
|
|
22
|
|
23 (define_register_constraint "Rfb" "FB_REGS"
|
|
24 "@internal")
|
|
25
|
|
26 (define_register_constraint "Rsb" "SB_REGS"
|
|
27 "@internal")
|
|
28
|
|
29 (define_register_constraint "Rcr" "TARGET_A16 ? CR_REGS : NO_REGS"
|
|
30 "@internal")
|
|
31
|
|
32 (define_register_constraint "Rcl" "TARGET_A24 ? CR_REGS : NO_REGS"
|
|
33 "@internal")
|
|
34
|
|
35 (define_register_constraint "R0w" "R0_REGS"
|
|
36 "@internal")
|
|
37
|
|
38 (define_register_constraint "R1w" "R1_REGS"
|
|
39 "@internal")
|
|
40
|
|
41 (define_register_constraint "R2w" "R2_REGS"
|
|
42 "@internal")
|
|
43
|
|
44 (define_register_constraint "R3w" "R3_REGS"
|
|
45 "@internal")
|
|
46
|
|
47 (define_register_constraint "R02" "R02_REGS"
|
|
48 "@internal")
|
|
49
|
|
50 (define_register_constraint "R13" "R13_REGS"
|
|
51 "@internal")
|
|
52
|
|
53 (define_register_constraint "R03" "R03_REGS"
|
|
54 "@internal")
|
|
55
|
|
56 (define_register_constraint "Rdi" "DI_REGS"
|
|
57 "@internal")
|
|
58
|
|
59 (define_register_constraint "Rhl" "HL_REGS"
|
|
60 "@internal")
|
|
61
|
|
62 (define_register_constraint "R23" "R23_REGS"
|
|
63 "@internal")
|
|
64
|
|
65 (define_register_constraint "Ra0" "A0_REGS"
|
|
66 "@internal")
|
|
67
|
|
68 (define_register_constraint "Ra1" "A1_REGS"
|
|
69 "@internal")
|
|
70
|
|
71 (define_register_constraint "Raa" "A_REGS"
|
|
72 "@internal")
|
|
73
|
|
74 (define_register_constraint "Raw" "TARGET_A16 ? A_REGS : NO_REGS"
|
|
75 "@internal")
|
|
76
|
|
77 (define_register_constraint "Ral" "TARGET_A24 ? A_REGS : NO_REGS"
|
|
78 "@internal")
|
|
79
|
|
80 (define_register_constraint "Rqi" "QI_REGS"
|
|
81 "@internal")
|
|
82
|
|
83 (define_register_constraint "Rad" "AD_REGS"
|
|
84 "@internal")
|
|
85
|
|
86 (define_register_constraint "Rsi" "SI_REGS"
|
|
87 "@internal")
|
|
88
|
|
89 (define_register_constraint "Rhi" "HI_REGS"
|
|
90 "@internal")
|
|
91
|
|
92 (define_register_constraint "Rhc" "HC_REGS"
|
|
93 "@internal")
|
|
94
|
|
95 (define_register_constraint "Rra" "RA_REGS"
|
|
96 "@internal")
|
|
97
|
|
98 (define_register_constraint "Rfl" "FLG_REGS"
|
|
99 "@internal")
|
|
100
|
|
101 (define_register_constraint "Rmm" "fixed_regs[MEM0_REGNO] ? NO_REGS : MEM_REGS"
|
|
102 "@internal")
|
|
103
|
|
104 (define_register_constraint "Rpi" "TARGET_A16 ? HI_REGS : RA_REGS"
|
|
105 "@internal")
|
|
106
|
|
107 ;;; For integer constant constraints:
|
|
108 ;;; s=signed u=unsigned n=nonzero m=minus l=log2able,
|
|
109 ;;; [sun] bits [SUN] bytes, p=pointer size
|
|
110 ;;; I[-0-9][0-9] matches that number
|
|
111
|
|
112 (define_constraint "Is3"
|
|
113 "@internal"
|
|
114 (and (match_code "const_int")
|
|
115 (match_test "IN_RANGE (ival, -8, 7)")))
|
|
116
|
|
117 (define_constraint "IS1"
|
|
118 "@internal"
|
|
119 (and (match_code "const_int")
|
|
120 (match_test "IN_RANGE (ival, -128, 127)")))
|
|
121
|
|
122 (define_constraint "IS2"
|
|
123 "@internal"
|
|
124 (and (match_code "const_int")
|
|
125 (match_test "IN_RANGE (ival, -32768, 32767)")))
|
|
126
|
|
127 (define_constraint "IU2"
|
|
128 "@internal"
|
|
129 (and (match_code "const_int")
|
|
130 (match_test "IN_RANGE (ival, 0, 65535)")))
|
|
131
|
|
132 (define_constraint "IU3"
|
|
133 "@internal"
|
|
134 (and (match_code "const_int")
|
|
135 (match_test "IN_RANGE (ival, 0, 0x00ffffff)")))
|
|
136
|
|
137 (define_constraint "In4"
|
|
138 "@internal"
|
|
139 (and (match_code "const_int")
|
|
140 (match_test "IN_RANGE (ival, -8, 8) && ival")))
|
|
141
|
|
142 (define_constraint "In5"
|
|
143 "@internal"
|
|
144 (and (match_code "const_int")
|
|
145 (match_test "IN_RANGE (ival, -16, 16) && ival")))
|
|
146
|
|
147 (define_constraint "In6"
|
|
148 "@internal"
|
|
149 (and (match_code "const_int")
|
|
150 (match_test "IN_RANGE (ival, -32, 32) && ival")))
|
|
151
|
|
152 (define_constraint "IM2"
|
|
153 "@internal"
|
|
154 (and (match_code "const_int")
|
|
155 (match_test "IN_RANGE (ival, -65536, -1)")))
|
|
156
|
|
157 (define_constraint "Ilb"
|
|
158 "@internal"
|
|
159 (and (match_code "const_int")
|
|
160 (match_test "IN_RANGE (exact_log2 (ival), 0, 7)")))
|
|
161
|
|
162 (define_constraint "Imb"
|
|
163 "@internal"
|
|
164 (and (match_code "const_int")
|
|
165 (match_test "IN_RANGE (exact_log2 ((ival ^ 0xff) & 0xff), 0, 7)")))
|
|
166
|
|
167 (define_constraint "ImB"
|
|
168 "@internal"
|
|
169 (and (match_code "const_int")
|
|
170 (match_test "IN_RANGE (exact_log2 ((ival ^ 0xffff) & 0xffff), 0, 7)")))
|
|
171
|
|
172 (define_constraint "Ilw"
|
|
173 "@internal"
|
|
174 (and (match_code "const_int")
|
|
175 (match_test "IN_RANGE (exact_log2 (ival), 0, 15)")))
|
|
176
|
|
177 (define_constraint "Imw"
|
|
178 "@internal"
|
|
179 (and (match_code "const_int")
|
|
180 (match_test "IN_RANGE (exact_log2 ((ival ^ 0xffff) & 0xffff), 0, 15)")))
|
|
181
|
|
182 (define_constraint "I00"
|
|
183 "@internal"
|
|
184 (and (match_code "const_int")
|
|
185 (match_test "ival == 0")))
|
|
186
|
|
187 (define_memory_constraint "SF"
|
|
188 "@internal"
|
|
189 (match_test "m32c_matches_constraint_p (op, CONSTRAINT_SF)"))
|
|
190
|
|
191 (define_memory_constraint "Sd"
|
|
192 "@internal"
|
|
193 (match_test "m32c_matches_constraint_p (op, CONSTRAINT_Sd)"))
|
|
194
|
|
195 (define_memory_constraint "Sa"
|
|
196 "@internal"
|
|
197 (match_test "m32c_matches_constraint_p (op, CONSTRAINT_Sa)"))
|
|
198
|
|
199 (define_memory_constraint "Si"
|
|
200 "@internal"
|
|
201 (match_test "m32c_matches_constraint_p (op, CONSTRAINT_Si)"))
|
|
202
|
|
203 (define_memory_constraint "Ss"
|
|
204 "@internal"
|
|
205 (match_test "m32c_matches_constraint_p (op, CONSTRAINT_Ss)"))
|
|
206
|
|
207 (define_memory_constraint "Sf"
|
|
208 "@internal"
|
|
209 (match_test "m32c_matches_constraint_p (op, CONSTRAINT_Sf)"))
|
|
210
|
|
211 (define_memory_constraint "Sb"
|
|
212 "@internal"
|
|
213 (match_test "m32c_matches_constraint_p (op, CONSTRAINT_Sb)"))
|
|
214
|
|
215 (define_memory_constraint "Sp"
|
|
216 "@internal"
|
|
217 (match_test "m32c_matches_constraint_p (op, CONSTRAINT_Sp)"))
|
|
218
|
|
219 (define_memory_constraint "S1"
|
|
220 "@internal"
|
|
221 (match_test "m32c_matches_constraint_p (op, CONSTRAINT_S1)"))
|
|
222
|
|
223 (define_constraint "Rpa"
|
|
224 "@internal"
|
|
225 (match_test "m32c_matches_constraint_p (op, CONSTRAINT_Rpa)"))
|