annotate gcc/config/avr/constraints.md @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents a06113de4d67
children 84e7813d76e9
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 ATMEL AVR micro controllers.
111
kono
parents: 0
diff changeset
2 ;; Copyright (C) 2006-2017 Free Software Foundation, Inc.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 ;;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 ;; This file is part of GCC.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 ;;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 ;; GCC is free software; you can redistribute it and/or modify
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 ;; it under the terms of the GNU General Public License as published by
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 ;; the Free Software Foundation; either version 3, or (at your option)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 ;; any later version.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 ;;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 ;; GCC is distributed in the hope that it will be useful,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 ;; GNU General Public License for more details.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 ;;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 ;; You should have received a copy of the GNU General Public License
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 ;; along with GCC; see the file COPYING3. If not see
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 ;; <http://www.gnu.org/licenses/>.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 ;; Register constraints
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 (define_register_constraint "t" "R0_REG"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 "Temporary register r0")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 (define_register_constraint "b" "BASE_POINTER_REGS"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 "Base pointer registers (r28--r31)")
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 (define_register_constraint "e" "POINTER_REGS"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 "Pointer registers (r26--r31)")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 (define_register_constraint "w" "ADDW_REGS"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 "Registers from r24 to r31. These registers
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 can be used in @samp{adiw} command.")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 (define_register_constraint "d" "LD_REGS"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 "Registers from r16 to r31.")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 (define_register_constraint "l" "NO_LD_REGS"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 "Registers from r0 to r15.")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 (define_register_constraint "a" "SIMPLE_LD_REGS"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 "Registers from r16 to r23.")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 (define_register_constraint "x" "POINTER_X_REGS"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 "Register pair X (r27:r26).")
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 "y" "POINTER_Y_REGS"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 "Register pair Y (r29:r28).")
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 "z" "POINTER_Z_REGS"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 "Register pair Z (r31:r30).")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 (define_register_constraint "q" "STACK_REG"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 "Stack pointer register (SPH:SPL).")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
55
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 (define_constraint "I"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 "Integer constant in the range 0 @dots{} 63."
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 (and (match_code "const_int")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 (match_test "ival >= 0 && ival <= 63")))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
60
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 (define_constraint "J"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 "Integer constant in the range -63 @dots{} 0."
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 (and (match_code "const_int")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 (match_test "ival <= 0 && ival >= -63")))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
65
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 (define_constraint "K"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 "Integer constant 2."
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 (and (match_code "const_int")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 (match_test "ival == 2")))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
70
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 (define_constraint "L"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 "Zero."
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 (and (match_code "const_int")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 (match_test "ival == 0")))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
75
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 (define_constraint "M"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 "Integer constant in the range 0 @dots{} 0xff."
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
78 (and (match_code "const_int")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 (match_test "ival >= 0 && ival <= 0xff")))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
80
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 (define_constraint "N"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 "Constant integer @minus{}1."
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 (and (match_code "const_int")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 (match_test "ival == -1")))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
85
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 (define_constraint "O"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 "Constant integer 8, 16, or 24."
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
88 (and (match_code "const_int")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 (match_test "ival == 8 || ival == 16 || ival == 24")))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
90
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 (define_constraint "P"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
92 "Constant integer 1."
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 (and (match_code "const_int")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
94 (match_test "ival == 1")))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
95
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
96 (define_constraint "G"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 "Constant float 0."
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 (and (match_code "const_double")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
99 (match_test "op == CONST0_RTX (SFmode)")))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
100
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
101 (define_memory_constraint "Q"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 "A memory address based on Y or Z pointer with displacement."
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
103 (and (match_code "mem")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 (match_test "extra_constraint_Q (op)")))
111
kono
parents: 0
diff changeset
105
kono
parents: 0
diff changeset
106 (define_constraint "Cm2"
kono
parents: 0
diff changeset
107 "Constant integer @minus{}2."
kono
parents: 0
diff changeset
108 (and (match_code "const_int")
kono
parents: 0
diff changeset
109 (match_test "ival == -2")))
kono
parents: 0
diff changeset
110
kono
parents: 0
diff changeset
111 (define_constraint "C03"
kono
parents: 0
diff changeset
112 "Constant integer 3."
kono
parents: 0
diff changeset
113 (and (match_code "const_int")
kono
parents: 0
diff changeset
114 (match_test "ival == 3")))
kono
parents: 0
diff changeset
115
kono
parents: 0
diff changeset
116 (define_constraint "C04"
kono
parents: 0
diff changeset
117 "Constant integer 4."
kono
parents: 0
diff changeset
118 (and (match_code "const_int")
kono
parents: 0
diff changeset
119 (match_test "ival == 4")))
kono
parents: 0
diff changeset
120
kono
parents: 0
diff changeset
121 (define_constraint "C05"
kono
parents: 0
diff changeset
122 "Constant integer 5."
kono
parents: 0
diff changeset
123 (and (match_code "const_int")
kono
parents: 0
diff changeset
124 (match_test "ival == 5")))
kono
parents: 0
diff changeset
125
kono
parents: 0
diff changeset
126 (define_constraint "C06"
kono
parents: 0
diff changeset
127 "Constant integer 6."
kono
parents: 0
diff changeset
128 (and (match_code "const_int")
kono
parents: 0
diff changeset
129 (match_test "ival == 6")))
kono
parents: 0
diff changeset
130
kono
parents: 0
diff changeset
131 (define_constraint "C07"
kono
parents: 0
diff changeset
132 "Constant integer 7."
kono
parents: 0
diff changeset
133 (and (match_code "const_int")
kono
parents: 0
diff changeset
134 (match_test "ival == 7")))
kono
parents: 0
diff changeset
135
kono
parents: 0
diff changeset
136 (define_constraint "Ca1"
kono
parents: 0
diff changeset
137 "Constant 1-byte integer that allows AND by means of CLT + BLD."
kono
parents: 0
diff changeset
138 (and (match_code "const_int")
kono
parents: 0
diff changeset
139 (match_test "avr_popcount_each_byte (op, 1, 1<<7)")))
kono
parents: 0
diff changeset
140
kono
parents: 0
diff changeset
141 (define_constraint "Ca2"
kono
parents: 0
diff changeset
142 "Constant 2-byte integer that allows AND without clobber register."
kono
parents: 0
diff changeset
143 (and (match_code "const_int")
kono
parents: 0
diff changeset
144 (match_test "avr_popcount_each_byte (op, 2, (1<<0) | (1<<7) | (1<<8))")))
kono
parents: 0
diff changeset
145
kono
parents: 0
diff changeset
146 (define_constraint "Ca3"
kono
parents: 0
diff changeset
147 "Constant 3-byte integer that allows AND without clobber register."
kono
parents: 0
diff changeset
148 (and (match_code "const_int")
kono
parents: 0
diff changeset
149 (match_test "avr_popcount_each_byte (op, 3, (1<<0) | (1<<7) | (1<<8))")))
kono
parents: 0
diff changeset
150
kono
parents: 0
diff changeset
151 (define_constraint "Ca4"
kono
parents: 0
diff changeset
152 "Constant 4-byte integer that allows AND without clobber register."
kono
parents: 0
diff changeset
153 (and (match_code "const_int")
kono
parents: 0
diff changeset
154 (match_test "avr_popcount_each_byte (op, 4, (1<<0) | (1<<7) | (1<<8))")))
kono
parents: 0
diff changeset
155
kono
parents: 0
diff changeset
156 (define_constraint "Co1"
kono
parents: 0
diff changeset
157 "Constant 1-byte integer that allows AND by means of SET + BLD."
kono
parents: 0
diff changeset
158 (and (match_code "const_int")
kono
parents: 0
diff changeset
159 (match_test "avr_popcount_each_byte (op, 1, 1<<1)")))
kono
parents: 0
diff changeset
160
kono
parents: 0
diff changeset
161 (define_constraint "Co2"
kono
parents: 0
diff changeset
162 "Constant 2-byte integer that allows OR without clobber register."
kono
parents: 0
diff changeset
163 (and (match_code "const_int")
kono
parents: 0
diff changeset
164 (match_test "avr_popcount_each_byte (op, 2, (1<<0) | (1<<1) | (1<<8))")))
kono
parents: 0
diff changeset
165
kono
parents: 0
diff changeset
166 (define_constraint "Co3"
kono
parents: 0
diff changeset
167 "Constant 3-byte integer that allows OR without clobber register."
kono
parents: 0
diff changeset
168 (and (match_code "const_int")
kono
parents: 0
diff changeset
169 (match_test "avr_popcount_each_byte (op, 3, (1<<0) | (1<<1) | (1<<8))")))
kono
parents: 0
diff changeset
170
kono
parents: 0
diff changeset
171 (define_constraint "Co4"
kono
parents: 0
diff changeset
172 "Constant 4-byte integer that allows OR without clobber register."
kono
parents: 0
diff changeset
173 (and (match_code "const_int")
kono
parents: 0
diff changeset
174 (match_test "avr_popcount_each_byte (op, 4, (1<<0) | (1<<1) | (1<<8))")))
kono
parents: 0
diff changeset
175
kono
parents: 0
diff changeset
176 (define_constraint "Cx2"
kono
parents: 0
diff changeset
177 "Constant 2-byte integer that allows XOR without clobber register."
kono
parents: 0
diff changeset
178 (and (match_code "const_int")
kono
parents: 0
diff changeset
179 (match_test "avr_popcount_each_byte (op, 2, (1<<0) | (1<<8))")))
kono
parents: 0
diff changeset
180
kono
parents: 0
diff changeset
181 (define_constraint "Cx3"
kono
parents: 0
diff changeset
182 "Constant 3-byte integer that allows XOR without clobber register."
kono
parents: 0
diff changeset
183 (and (match_code "const_int")
kono
parents: 0
diff changeset
184 (match_test "avr_popcount_each_byte (op, 3, (1<<0) | (1<<8))")))
kono
parents: 0
diff changeset
185
kono
parents: 0
diff changeset
186 (define_constraint "Cx4"
kono
parents: 0
diff changeset
187 "Constant 4-byte integer that allows XOR without clobber register."
kono
parents: 0
diff changeset
188 (and (match_code "const_int")
kono
parents: 0
diff changeset
189 (match_test "avr_popcount_each_byte (op, 4, (1<<0) | (1<<8))")))
kono
parents: 0
diff changeset
190
kono
parents: 0
diff changeset
191 (define_constraint "Csp"
kono
parents: 0
diff changeset
192 "Integer constant in the range -11 @dots{} 6."
kono
parents: 0
diff changeset
193 (and (match_code "const_int")
kono
parents: 0
diff changeset
194 (match_test "IN_RANGE (ival, -11, 6)")))
kono
parents: 0
diff changeset
195
kono
parents: 0
diff changeset
196 (define_constraint "Cxf"
kono
parents: 0
diff changeset
197 "32-bit integer constant where at least one nibble is 0xf."
kono
parents: 0
diff changeset
198 (and (match_code "const_int")
kono
parents: 0
diff changeset
199 (match_test "avr_has_nibble_0xf (op)")))
kono
parents: 0
diff changeset
200
kono
parents: 0
diff changeset
201 (define_constraint "C0f"
kono
parents: 0
diff changeset
202 "32-bit integer constant where no nibble equals 0xf."
kono
parents: 0
diff changeset
203 (and (match_code "const_int")
kono
parents: 0
diff changeset
204 (match_test "!avr_has_nibble_0xf (op)")))
kono
parents: 0
diff changeset
205
kono
parents: 0
diff changeset
206 (define_constraint "Cn8"
kono
parents: 0
diff changeset
207 "A negative constant integer in the range @minus{}255 @dots{} @minus{}1."
kono
parents: 0
diff changeset
208 (and (match_code "const_int")
kono
parents: 0
diff changeset
209 (match_test "IN_RANGE (ival, -255, -1)")))
kono
parents: 0
diff changeset
210
kono
parents: 0
diff changeset
211 ;; CONST_FIXED is no element of 'n' so cook our own.
kono
parents: 0
diff changeset
212 ;; "i" or "s" would match but because the insn uses iterators that cover
kono
parents: 0
diff changeset
213 ;; INT_MODE, "i" or "s" is not always possible.
kono
parents: 0
diff changeset
214
kono
parents: 0
diff changeset
215 (define_constraint "Ynn"
kono
parents: 0
diff changeset
216 "Fixed-point constant known at compile time."
kono
parents: 0
diff changeset
217 (match_code "const_fixed"))
kono
parents: 0
diff changeset
218
kono
parents: 0
diff changeset
219 (define_constraint "Y00"
kono
parents: 0
diff changeset
220 "Fixed-point or integer constant with bit representation 0x0"
kono
parents: 0
diff changeset
221 (and (match_code "const_fixed,const_int")
kono
parents: 0
diff changeset
222 (match_test "op == CONST0_RTX (GET_MODE (op))")))
kono
parents: 0
diff changeset
223
kono
parents: 0
diff changeset
224 (define_constraint "Y01"
kono
parents: 0
diff changeset
225 "Fixed-point or integer constant with bit representation 0x1"
kono
parents: 0
diff changeset
226 (ior (and (match_code "const_fixed")
kono
parents: 0
diff changeset
227 (match_test "1 == INTVAL (avr_to_int_mode (op))"))
kono
parents: 0
diff changeset
228 (match_test "satisfies_constraint_P (op)")))
kono
parents: 0
diff changeset
229
kono
parents: 0
diff changeset
230 (define_constraint "Ym1"
kono
parents: 0
diff changeset
231 "Fixed-point or integer constant with bit representation -0x1"
kono
parents: 0
diff changeset
232 (ior (and (match_code "const_fixed")
kono
parents: 0
diff changeset
233 (match_test "-1 == INTVAL (avr_to_int_mode (op))"))
kono
parents: 0
diff changeset
234 (match_test "satisfies_constraint_N (op)")))
kono
parents: 0
diff changeset
235
kono
parents: 0
diff changeset
236 (define_constraint "Y02"
kono
parents: 0
diff changeset
237 "Fixed-point or integer constant with bit representation 0x2"
kono
parents: 0
diff changeset
238 (ior (and (match_code "const_fixed")
kono
parents: 0
diff changeset
239 (match_test "2 == INTVAL (avr_to_int_mode (op))"))
kono
parents: 0
diff changeset
240 (match_test "satisfies_constraint_K (op)")))
kono
parents: 0
diff changeset
241
kono
parents: 0
diff changeset
242 (define_constraint "Ym2"
kono
parents: 0
diff changeset
243 "Fixed-point or integer constant with bit representation -0x2"
kono
parents: 0
diff changeset
244 (ior (and (match_code "const_fixed")
kono
parents: 0
diff changeset
245 (match_test "-2 == INTVAL (avr_to_int_mode (op))"))
kono
parents: 0
diff changeset
246 (match_test "satisfies_constraint_Cm2 (op)")))
kono
parents: 0
diff changeset
247
kono
parents: 0
diff changeset
248 (define_constraint "Yx2"
kono
parents: 0
diff changeset
249 "Fixed-point or integer constant not in the range @minus{}2 @dots{} 2"
kono
parents: 0
diff changeset
250 (and (ior (match_code "const_int")
kono
parents: 0
diff changeset
251 (match_code "const_fixed"))
kono
parents: 0
diff changeset
252 (match_test "!IN_RANGE (INTVAL (avr_to_int_mode (op)), -2, 2)")))
kono
parents: 0
diff changeset
253
kono
parents: 0
diff changeset
254 ;; Similar to "IJ" used with ADIW/SBIW, but for CONST_FIXED.
kono
parents: 0
diff changeset
255
kono
parents: 0
diff changeset
256 (define_constraint "YIJ"
kono
parents: 0
diff changeset
257 "Fixed-point constant from @minus{}0x003f to 0x003f."
kono
parents: 0
diff changeset
258 (and (match_code "const_fixed")
kono
parents: 0
diff changeset
259 (match_test "IN_RANGE (INTVAL (avr_to_int_mode (op)), -63, 63)")))