annotate gcc/config/arm/vfp.md @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents f6334be47118
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 ;; ARM VFP instruction patterns
111
kono
parents: 67
diff changeset
2 ;; Copyright (C) 2003-2017 Free Software Foundation, Inc.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 ;; Written by CodeSourcery.
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 by
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 ;; 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
10 ;; 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
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 ;; General Public 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
111
kono
parents: 67
diff changeset
21 ;; Patterns for HI moves which provide more data transfer instructions when VFP
kono
parents: 67
diff changeset
22 ;; support is enabled.
kono
parents: 67
diff changeset
23 (define_insn "*arm_movhi_vfp"
kono
parents: 67
diff changeset
24 [(set
kono
parents: 67
diff changeset
25 (match_operand:HI 0 "nonimmediate_operand"
kono
parents: 67
diff changeset
26 "=rk, r, r, m, r, *t, r, *t")
kono
parents: 67
diff changeset
27 (match_operand:HI 1 "general_operand"
kono
parents: 67
diff changeset
28 "rIk, K, n, r, mi, r, *t, *t"))]
kono
parents: 67
diff changeset
29 "TARGET_ARM && TARGET_HARD_FLOAT
kono
parents: 67
diff changeset
30 && !TARGET_VFP_FP16INST
kono
parents: 67
diff changeset
31 && (register_operand (operands[0], HImode)
kono
parents: 67
diff changeset
32 || register_operand (operands[1], HImode))"
kono
parents: 67
diff changeset
33 {
kono
parents: 67
diff changeset
34 switch (which_alternative)
kono
parents: 67
diff changeset
35 {
kono
parents: 67
diff changeset
36 case 0:
kono
parents: 67
diff changeset
37 return "mov%?\t%0, %1\t%@ movhi";
kono
parents: 67
diff changeset
38 case 1:
kono
parents: 67
diff changeset
39 return "mvn%?\t%0, #%B1\t%@ movhi";
kono
parents: 67
diff changeset
40 case 2:
kono
parents: 67
diff changeset
41 return "movw%?\t%0, %L1\t%@ movhi";
kono
parents: 67
diff changeset
42 case 3:
kono
parents: 67
diff changeset
43 return "strh%?\t%1, %0\t%@ movhi";
kono
parents: 67
diff changeset
44 case 4:
kono
parents: 67
diff changeset
45 return "ldrh%?\t%0, %1\t%@ movhi";
kono
parents: 67
diff changeset
46 case 5:
kono
parents: 67
diff changeset
47 case 6:
kono
parents: 67
diff changeset
48 return "vmov%?\t%0, %1\t%@ int";
kono
parents: 67
diff changeset
49 case 7:
kono
parents: 67
diff changeset
50 return "vmov%?.f32\t%0, %1\t%@ int";
kono
parents: 67
diff changeset
51 default:
kono
parents: 67
diff changeset
52 gcc_unreachable ();
kono
parents: 67
diff changeset
53 }
kono
parents: 67
diff changeset
54 }
kono
parents: 67
diff changeset
55 [(set_attr "predicable" "yes")
kono
parents: 67
diff changeset
56 (set_attr_alternative "type"
kono
parents: 67
diff changeset
57 [(if_then_else
kono
parents: 67
diff changeset
58 (match_operand 1 "const_int_operand" "")
kono
parents: 67
diff changeset
59 (const_string "mov_imm")
kono
parents: 67
diff changeset
60 (const_string "mov_reg"))
kono
parents: 67
diff changeset
61 (const_string "mvn_imm")
kono
parents: 67
diff changeset
62 (const_string "mov_imm")
kono
parents: 67
diff changeset
63 (const_string "store_4")
kono
parents: 67
diff changeset
64 (const_string "load_4")
kono
parents: 67
diff changeset
65 (const_string "f_mcr")
kono
parents: 67
diff changeset
66 (const_string "f_mrc")
kono
parents: 67
diff changeset
67 (const_string "fmov")])
kono
parents: 67
diff changeset
68 (set_attr "arch" "*, *, v6t2, *, *, *, *, *")
kono
parents: 67
diff changeset
69 (set_attr "pool_range" "*, *, *, *, 256, *, *, *")
kono
parents: 67
diff changeset
70 (set_attr "neg_pool_range" "*, *, *, *, 244, *, *, *")
kono
parents: 67
diff changeset
71 (set_attr "length" "4")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
73
111
kono
parents: 67
diff changeset
74 (define_insn "*thumb2_movhi_vfp"
kono
parents: 67
diff changeset
75 [(set
kono
parents: 67
diff changeset
76 (match_operand:HI 0 "nonimmediate_operand"
kono
parents: 67
diff changeset
77 "=rk, r, l, r, m, r, *t, r, *t")
kono
parents: 67
diff changeset
78 (match_operand:HI 1 "general_operand"
kono
parents: 67
diff changeset
79 "rk, I, Py, n, r, m, r, *t, *t"))]
kono
parents: 67
diff changeset
80 "TARGET_THUMB2 && TARGET_HARD_FLOAT
kono
parents: 67
diff changeset
81 && !TARGET_VFP_FP16INST
kono
parents: 67
diff changeset
82 && (register_operand (operands[0], HImode)
kono
parents: 67
diff changeset
83 || register_operand (operands[1], HImode))"
kono
parents: 67
diff changeset
84 {
kono
parents: 67
diff changeset
85 switch (which_alternative)
kono
parents: 67
diff changeset
86 {
kono
parents: 67
diff changeset
87 case 0:
kono
parents: 67
diff changeset
88 case 1:
kono
parents: 67
diff changeset
89 case 2:
kono
parents: 67
diff changeset
90 return "mov%?\t%0, %1\t%@ movhi";
kono
parents: 67
diff changeset
91 case 3:
kono
parents: 67
diff changeset
92 return "movw%?\t%0, %L1\t%@ movhi";
kono
parents: 67
diff changeset
93 case 4:
kono
parents: 67
diff changeset
94 return "strh%?\t%1, %0\t%@ movhi";
kono
parents: 67
diff changeset
95 case 5:
kono
parents: 67
diff changeset
96 return "ldrh%?\t%0, %1\t%@ movhi";
kono
parents: 67
diff changeset
97 case 6:
kono
parents: 67
diff changeset
98 case 7:
kono
parents: 67
diff changeset
99 return "vmov%?\t%0, %1\t%@ int";
kono
parents: 67
diff changeset
100 case 8:
kono
parents: 67
diff changeset
101 return "vmov%?.f32\t%0, %1\t%@ int";
kono
parents: 67
diff changeset
102 default:
kono
parents: 67
diff changeset
103 gcc_unreachable ();
kono
parents: 67
diff changeset
104 }
kono
parents: 67
diff changeset
105 }
kono
parents: 67
diff changeset
106 [(set_attr "predicable" "yes")
kono
parents: 67
diff changeset
107 (set_attr "predicable_short_it"
kono
parents: 67
diff changeset
108 "yes, no, yes, no, no, no, no, no, no")
kono
parents: 67
diff changeset
109 (set_attr "type"
kono
parents: 67
diff changeset
110 "mov_reg, mov_imm, mov_imm, mov_imm, store_4, load_4,\
kono
parents: 67
diff changeset
111 f_mcr, f_mrc, fmov")
kono
parents: 67
diff changeset
112 (set_attr "arch" "*, *, *, v6t2, *, *, *, *, *")
kono
parents: 67
diff changeset
113 (set_attr "pool_range" "*, *, *, *, *, 4094, *, *, *")
kono
parents: 67
diff changeset
114 (set_attr "neg_pool_range" "*, *, *, *, *, 250, *, *, *")
kono
parents: 67
diff changeset
115 (set_attr "length" "2, 4, 2, 4, 4, 4, 4, 4, 4")]
kono
parents: 67
diff changeset
116 )
kono
parents: 67
diff changeset
117
kono
parents: 67
diff changeset
118 ;; Patterns for HI moves which provide more data transfer instructions when FP16
kono
parents: 67
diff changeset
119 ;; instructions are available.
kono
parents: 67
diff changeset
120 (define_insn "*arm_movhi_fp16"
kono
parents: 67
diff changeset
121 [(set
kono
parents: 67
diff changeset
122 (match_operand:HI 0 "nonimmediate_operand"
kono
parents: 67
diff changeset
123 "=r, r, r, m, r, *t, r, *t")
kono
parents: 67
diff changeset
124 (match_operand:HI 1 "general_operand"
kono
parents: 67
diff changeset
125 "rIk, K, n, r, mi, r, *t, *t"))]
kono
parents: 67
diff changeset
126 "TARGET_ARM && TARGET_VFP_FP16INST
kono
parents: 67
diff changeset
127 && (register_operand (operands[0], HImode)
kono
parents: 67
diff changeset
128 || register_operand (operands[1], HImode))"
kono
parents: 67
diff changeset
129 {
kono
parents: 67
diff changeset
130 switch (which_alternative)
kono
parents: 67
diff changeset
131 {
kono
parents: 67
diff changeset
132 case 0:
kono
parents: 67
diff changeset
133 return "mov%?\t%0, %1\t%@ movhi";
kono
parents: 67
diff changeset
134 case 1:
kono
parents: 67
diff changeset
135 return "mvn%?\t%0, #%B1\t%@ movhi";
kono
parents: 67
diff changeset
136 case 2:
kono
parents: 67
diff changeset
137 return "movw%?\t%0, %L1\t%@ movhi";
kono
parents: 67
diff changeset
138 case 3:
kono
parents: 67
diff changeset
139 return "strh%?\t%1, %0\t%@ movhi";
kono
parents: 67
diff changeset
140 case 4:
kono
parents: 67
diff changeset
141 return "ldrh%?\t%0, %1\t%@ movhi";
kono
parents: 67
diff changeset
142 case 5:
kono
parents: 67
diff changeset
143 case 6:
kono
parents: 67
diff changeset
144 return "vmov.f16\t%0, %1\t%@ int";
kono
parents: 67
diff changeset
145 case 7:
kono
parents: 67
diff changeset
146 return "vmov%?.f32\t%0, %1\t%@ int";
kono
parents: 67
diff changeset
147 default:
kono
parents: 67
diff changeset
148 gcc_unreachable ();
kono
parents: 67
diff changeset
149 }
kono
parents: 67
diff changeset
150 }
kono
parents: 67
diff changeset
151 [(set_attr "predicable" "yes, yes, yes, yes, yes, no, no, yes")
kono
parents: 67
diff changeset
152 (set_attr_alternative "type"
kono
parents: 67
diff changeset
153 [(if_then_else
kono
parents: 67
diff changeset
154 (match_operand 1 "const_int_operand" "")
kono
parents: 67
diff changeset
155 (const_string "mov_imm")
kono
parents: 67
diff changeset
156 (const_string "mov_reg"))
kono
parents: 67
diff changeset
157 (const_string "mvn_imm")
kono
parents: 67
diff changeset
158 (const_string "mov_imm")
kono
parents: 67
diff changeset
159 (const_string "store_4")
kono
parents: 67
diff changeset
160 (const_string "load_4")
kono
parents: 67
diff changeset
161 (const_string "f_mcr")
kono
parents: 67
diff changeset
162 (const_string "f_mrc")
kono
parents: 67
diff changeset
163 (const_string "fmov")])
kono
parents: 67
diff changeset
164 (set_attr "arch" "*, *, v6t2, *, *, *, *, *")
kono
parents: 67
diff changeset
165 (set_attr "pool_range" "*, *, *, *, 256, *, *, *")
kono
parents: 67
diff changeset
166 (set_attr "neg_pool_range" "*, *, *, *, 244, *, *, *")
kono
parents: 67
diff changeset
167 (set_attr "length" "4")]
kono
parents: 67
diff changeset
168 )
kono
parents: 67
diff changeset
169
kono
parents: 67
diff changeset
170 (define_insn "*thumb2_movhi_fp16"
kono
parents: 67
diff changeset
171 [(set
kono
parents: 67
diff changeset
172 (match_operand:HI 0 "nonimmediate_operand"
kono
parents: 67
diff changeset
173 "=rk, r, l, r, m, r, *t, r, *t")
kono
parents: 67
diff changeset
174 (match_operand:HI 1 "general_operand"
kono
parents: 67
diff changeset
175 "rk, I, Py, n, r, m, r, *t, *t"))]
kono
parents: 67
diff changeset
176 "TARGET_THUMB2 && TARGET_VFP_FP16INST
kono
parents: 67
diff changeset
177 && (register_operand (operands[0], HImode)
kono
parents: 67
diff changeset
178 || register_operand (operands[1], HImode))"
kono
parents: 67
diff changeset
179 {
kono
parents: 67
diff changeset
180 switch (which_alternative)
kono
parents: 67
diff changeset
181 {
kono
parents: 67
diff changeset
182 case 0:
kono
parents: 67
diff changeset
183 case 1:
kono
parents: 67
diff changeset
184 case 2:
kono
parents: 67
diff changeset
185 return "mov%?\t%0, %1\t%@ movhi";
kono
parents: 67
diff changeset
186 case 3:
kono
parents: 67
diff changeset
187 return "movw%?\t%0, %L1\t%@ movhi";
kono
parents: 67
diff changeset
188 case 4:
kono
parents: 67
diff changeset
189 return "strh%?\t%1, %0\t%@ movhi";
kono
parents: 67
diff changeset
190 case 5:
kono
parents: 67
diff changeset
191 return "ldrh%?\t%0, %1\t%@ movhi";
kono
parents: 67
diff changeset
192 case 6:
kono
parents: 67
diff changeset
193 case 7:
kono
parents: 67
diff changeset
194 return "vmov.f16\t%0, %1\t%@ int";
kono
parents: 67
diff changeset
195 case 8:
kono
parents: 67
diff changeset
196 return "vmov%?.f32\t%0, %1\t%@ int";
kono
parents: 67
diff changeset
197 default:
kono
parents: 67
diff changeset
198 gcc_unreachable ();
kono
parents: 67
diff changeset
199 }
kono
parents: 67
diff changeset
200 }
kono
parents: 67
diff changeset
201 [(set_attr "predicable"
kono
parents: 67
diff changeset
202 "yes, yes, yes, yes, yes, yes, no, no, yes")
kono
parents: 67
diff changeset
203 (set_attr "predicable_short_it"
kono
parents: 67
diff changeset
204 "yes, no, yes, no, no, no, no, no, no")
kono
parents: 67
diff changeset
205 (set_attr "type"
kono
parents: 67
diff changeset
206 "mov_reg, mov_imm, mov_imm, mov_imm, store_4, load_4,\
kono
parents: 67
diff changeset
207 f_mcr, f_mrc, fmov")
kono
parents: 67
diff changeset
208 (set_attr "arch" "*, *, *, v6t2, *, *, *, *, *")
kono
parents: 67
diff changeset
209 (set_attr "pool_range" "*, *, *, *, *, 4094, *, *, *")
kono
parents: 67
diff changeset
210 (set_attr "neg_pool_range" "*, *, *, *, *, 250, *, *, *")
kono
parents: 67
diff changeset
211 (set_attr "length" "2, 4, 2, 4, 4, 4, 4, 4, 4")]
kono
parents: 67
diff changeset
212 )
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
213
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
214 ;; SImode moves
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
215 ;; ??? For now do not allow loading constants into vfp regs. This causes
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
216 ;; problems because small constants get converted into adds.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
217 (define_insn "*arm_movsi_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
218 [(set (match_operand:SI 0 "nonimmediate_operand" "=rk,r,r,r,rk,m ,*t,r,*t,*t, *Uv")
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
219 (match_operand:SI 1 "general_operand" "rk, I,K,j,mi,rk,r,*t,*t,*Uvi,*t"))]
111
kono
parents: 67
diff changeset
220 "TARGET_ARM && TARGET_HARD_FLOAT
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
221 && ( s_register_operand (operands[0], SImode)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
222 || s_register_operand (operands[1], SImode))"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
223 "*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
224 switch (which_alternative)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
225 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
226 case 0: case 1:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
227 return \"mov%?\\t%0, %1\";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
228 case 2:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
229 return \"mvn%?\\t%0, #%B1\";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
230 case 3:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
231 return \"movw%?\\t%0, %1\";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
232 case 4:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
233 return \"ldr%?\\t%0, %1\";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
234 case 5:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
235 return \"str%?\\t%1, %0\";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
236 case 6:
111
kono
parents: 67
diff changeset
237 return \"vmov%?\\t%0, %1\\t%@ int\";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
238 case 7:
111
kono
parents: 67
diff changeset
239 return \"vmov%?\\t%0, %1\\t%@ int\";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
240 case 8:
111
kono
parents: 67
diff changeset
241 return \"vmov%?.f32\\t%0, %1\\t%@ int\";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
242 case 9: case 10:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
243 return output_move_vfp (operands);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
244 default:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
245 gcc_unreachable ();
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
246 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
247 "
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
248 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
249 (set_attr "type" "mov_reg,mov_reg,mvn_imm,mov_imm,load_4,store_4,
kono
parents: 67
diff changeset
250 f_mcr,f_mrc,fmov,f_loads,f_stores")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
251 (set_attr "pool_range" "*,*,*,*,4096,*,*,*,*,1020,*")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
252 (set_attr "neg_pool_range" "*,*,*,*,4084,*,*,*,*,1008,*")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
253 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
254
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
255 ;; See thumb2.md:thumb2_movsi_insn for an explanation of the split
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
256 ;; high/low register alternatives for loads and stores here.
111
kono
parents: 67
diff changeset
257 ;; The l/Py alternative should come after r/I to ensure that the short variant
kono
parents: 67
diff changeset
258 ;; is chosen with length 2 when the instruction is predicated for
kono
parents: 67
diff changeset
259 ;; arm_restrict_it.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
260 (define_insn "*thumb2_movsi_vfp"
111
kono
parents: 67
diff changeset
261 [(set (match_operand:SI 0 "nonimmediate_operand" "=rk,r,l,r,r, l,*hk,m, *m,*t, r,*t,*t, *Uv")
kono
parents: 67
diff changeset
262 (match_operand:SI 1 "general_operand" "rk,I,Py,K,j,mi,*mi,l,*hk, r,*t,*t,*Uvi,*t"))]
kono
parents: 67
diff changeset
263 "TARGET_THUMB2 && TARGET_HARD_FLOAT
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
264 && ( s_register_operand (operands[0], SImode)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
265 || s_register_operand (operands[1], SImode))"
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 switch (which_alternative)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
268 {
111
kono
parents: 67
diff changeset
269 case 0:
kono
parents: 67
diff changeset
270 case 1:
kono
parents: 67
diff changeset
271 case 2:
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
272 return \"mov%?\\t%0, %1\";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
273 case 3:
111
kono
parents: 67
diff changeset
274 return \"mvn%?\\t%0, #%B1\";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
275 case 4:
111
kono
parents: 67
diff changeset
276 return \"movw%?\\t%0, %1\";
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
277 case 5:
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
278 case 6:
111
kono
parents: 67
diff changeset
279 return \"ldr%?\\t%0, %1\";
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
280 case 7:
111
kono
parents: 67
diff changeset
281 case 8:
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
282 return \"str%?\\t%1, %0\";
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
283 case 9:
111
kono
parents: 67
diff changeset
284 return \"vmov%?\\t%0, %1\\t%@ int\";
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
285 case 10:
111
kono
parents: 67
diff changeset
286 return \"vmov%?\\t%0, %1\\t%@ int\";
kono
parents: 67
diff changeset
287 case 11:
kono
parents: 67
diff changeset
288 return \"vmov%?.f32\\t%0, %1\\t%@ int\";
kono
parents: 67
diff changeset
289 case 12: case 13:
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
290 return output_move_vfp (operands);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
291 default:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
292 gcc_unreachable ();
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
293 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
294 "
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
295 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
296 (set_attr "predicable_short_it" "yes,no,yes,no,no,no,no,no,no,no,no,no,no,no")
kono
parents: 67
diff changeset
297 (set_attr "type" "mov_reg,mov_reg,mov_reg,mvn_reg,mov_imm,load_4,load_4,store_4,store_4,f_mcr,f_mrc,fmov,f_loads,f_stores")
kono
parents: 67
diff changeset
298 (set_attr "length" "2,4,2,4,4,4,4,4,4,4,4,4,4,4")
kono
parents: 67
diff changeset
299 (set_attr "pool_range" "*,*,*,*,*,1018,4094,*,*,*,*,*,1018,*")
kono
parents: 67
diff changeset
300 (set_attr "neg_pool_range" "*,*,*,*,*, 0, 0,*,*,*,*,*,1008,*")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
301 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
302
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
303
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
304 ;; DImode moves
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
305
111
kono
parents: 67
diff changeset
306 (define_insn "*movdi_vfp"
kono
parents: 67
diff changeset
307 [(set (match_operand:DI 0 "nonimmediate_di_operand" "=r,r,r,r,q,q,m,w,r,w,w, Uv")
kono
parents: 67
diff changeset
308 (match_operand:DI 1 "di_operand" "r,rDa,Db,Dc,mi,mi,q,r,w,w,Uvi,w"))]
kono
parents: 67
diff changeset
309 "TARGET_32BIT && TARGET_HARD_FLOAT && arm_tune != TARGET_CPU_cortexa8
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
310 && ( register_operand (operands[0], DImode)
111
kono
parents: 67
diff changeset
311 || register_operand (operands[1], DImode))
kono
parents: 67
diff changeset
312 && !(TARGET_NEON && CONST_INT_P (operands[1])
kono
parents: 67
diff changeset
313 && neon_immediate_valid_for_move (operands[1], DImode, NULL, NULL))"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
314 "*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
315 switch (which_alternative)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
316 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
317 case 0:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
318 case 1:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
319 case 2:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
320 case 3:
111
kono
parents: 67
diff changeset
321 return \"#\";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
322 case 4:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
323 case 5:
111
kono
parents: 67
diff changeset
324 case 6:
kono
parents: 67
diff changeset
325 return output_move_double (operands, true, NULL);
kono
parents: 67
diff changeset
326 case 7:
kono
parents: 67
diff changeset
327 return \"vmov%?\\t%P0, %Q1, %R1\\t%@ int\";
kono
parents: 67
diff changeset
328 case 8:
kono
parents: 67
diff changeset
329 return \"vmov%?\\t%Q0, %R0, %P1\\t%@ int\";
kono
parents: 67
diff changeset
330 case 9:
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
331 if (TARGET_VFP_SINGLE)
111
kono
parents: 67
diff changeset
332 return \"vmov%?.f32\\t%0, %1\\t%@ int\;vmov%?.f32\\t%p0, %p1\\t%@ int\";
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
333 else
111
kono
parents: 67
diff changeset
334 return \"vmov%?.f64\\t%P0, %P1\\t%@ int\";
kono
parents: 67
diff changeset
335 case 10: case 11:
kono
parents: 67
diff changeset
336 return output_move_vfp (operands);
kono
parents: 67
diff changeset
337 default:
kono
parents: 67
diff changeset
338 gcc_unreachable ();
kono
parents: 67
diff changeset
339 }
kono
parents: 67
diff changeset
340 "
kono
parents: 67
diff changeset
341 [(set_attr "type" "multiple,multiple,multiple,multiple,load_8,load_8,store_8,f_mcrr,f_mrrc,ffarithd,f_loadd,f_stored")
kono
parents: 67
diff changeset
342 (set (attr "length") (cond [(eq_attr "alternative" "1,4,5,6") (const_int 8)
kono
parents: 67
diff changeset
343 (eq_attr "alternative" "2") (const_int 12)
kono
parents: 67
diff changeset
344 (eq_attr "alternative" "3") (const_int 16)
kono
parents: 67
diff changeset
345 (eq_attr "alternative" "9")
kono
parents: 67
diff changeset
346 (if_then_else
kono
parents: 67
diff changeset
347 (match_test "TARGET_VFP_SINGLE")
kono
parents: 67
diff changeset
348 (const_int 8)
kono
parents: 67
diff changeset
349 (const_int 4))]
kono
parents: 67
diff changeset
350 (const_int 4)))
kono
parents: 67
diff changeset
351 (set_attr "arm_pool_range" "*,*,*,*,1020,4096,*,*,*,*,1020,*")
kono
parents: 67
diff changeset
352 (set_attr "thumb2_pool_range" "*,*,*,*,1018,4094,*,*,*,*,1018,*")
kono
parents: 67
diff changeset
353 (set_attr "neg_pool_range" "*,*,*,*,1004,0,*,*,*,*,1004,*")
kono
parents: 67
diff changeset
354 (set_attr "arch" "t2,any,any,any,a,t2,any,any,any,any,any,any")]
kono
parents: 67
diff changeset
355 )
kono
parents: 67
diff changeset
356
kono
parents: 67
diff changeset
357 (define_insn "*movdi_vfp_cortexa8"
kono
parents: 67
diff changeset
358 [(set (match_operand:DI 0 "nonimmediate_di_operand" "=r,r,r,r,q,q,m,w,!r,w,w, Uv")
kono
parents: 67
diff changeset
359 (match_operand:DI 1 "di_operand" "r,rDa,Db,Dc,mi,mi,q,r,w,w,Uvi,w"))]
kono
parents: 67
diff changeset
360 "TARGET_32BIT && TARGET_HARD_FLOAT && arm_tune == TARGET_CPU_cortexa8
kono
parents: 67
diff changeset
361 && ( register_operand (operands[0], DImode)
kono
parents: 67
diff changeset
362 || register_operand (operands[1], DImode))
kono
parents: 67
diff changeset
363 && !(TARGET_NEON && CONST_INT_P (operands[1])
kono
parents: 67
diff changeset
364 && neon_immediate_valid_for_move (operands[1], DImode, NULL, NULL))"
kono
parents: 67
diff changeset
365 "*
kono
parents: 67
diff changeset
366 switch (which_alternative)
kono
parents: 67
diff changeset
367 {
kono
parents: 67
diff changeset
368 case 0:
kono
parents: 67
diff changeset
369 case 1:
kono
parents: 67
diff changeset
370 case 2:
kono
parents: 67
diff changeset
371 case 3:
kono
parents: 67
diff changeset
372 return \"#\";
kono
parents: 67
diff changeset
373 case 4:
kono
parents: 67
diff changeset
374 case 5:
kono
parents: 67
diff changeset
375 case 6:
kono
parents: 67
diff changeset
376 return output_move_double (operands, true, NULL);
kono
parents: 67
diff changeset
377 case 7:
kono
parents: 67
diff changeset
378 return \"vmov%?\\t%P0, %Q1, %R1\\t%@ int\";
kono
parents: 67
diff changeset
379 case 8:
kono
parents: 67
diff changeset
380 return \"vmov%?\\t%Q0, %R0, %P1\\t%@ int\";
kono
parents: 67
diff changeset
381 case 9:
kono
parents: 67
diff changeset
382 return \"vmov%?.f64\\t%P0, %P1\\t%@ int\";
kono
parents: 67
diff changeset
383 case 10: case 11:
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
384 return output_move_vfp (operands);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
385 default:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
386 gcc_unreachable ();
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
387 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
388 "
111
kono
parents: 67
diff changeset
389 [(set_attr "type" "multiple,multiple,multiple,multiple,load_8,load_8,store_8,f_mcrr,f_mrrc,ffarithd,f_loadd,f_stored")
kono
parents: 67
diff changeset
390 (set (attr "length") (cond [(eq_attr "alternative" "1") (const_int 8)
kono
parents: 67
diff changeset
391 (eq_attr "alternative" "2") (const_int 12)
kono
parents: 67
diff changeset
392 (eq_attr "alternative" "3") (const_int 16)
kono
parents: 67
diff changeset
393 (eq_attr "alternative" "4,5,6")
kono
parents: 67
diff changeset
394 (symbol_ref
kono
parents: 67
diff changeset
395 "arm_count_output_move_double_insns (operands) \
kono
parents: 67
diff changeset
396 * 4")]
kono
parents: 67
diff changeset
397 (const_int 4)))
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
398 (set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
399 (set_attr "arm_pool_range" "*,*,*,*,1018,4094,*,*,*,*,1018,*")
kono
parents: 67
diff changeset
400 (set_attr "thumb2_pool_range" "*,*,*,*,1018,4094,*,*,*,*,1018,*")
kono
parents: 67
diff changeset
401 (set_attr "neg_pool_range" "*,*,*,*,1004,0,*,*,*,*,1004,*")
kono
parents: 67
diff changeset
402 (set (attr "ce_count")
kono
parents: 67
diff changeset
403 (symbol_ref "get_attr_length (insn) / 4"))
kono
parents: 67
diff changeset
404 (set_attr "arch" "t2,any,any,any,a,t2,any,any,any,any,any,any")]
kono
parents: 67
diff changeset
405 )
kono
parents: 67
diff changeset
406
kono
parents: 67
diff changeset
407 ;; HFmode moves
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
408
111
kono
parents: 67
diff changeset
409 (define_insn "*movhf_vfp_fp16"
kono
parents: 67
diff changeset
410 [(set (match_operand:HF 0 "nonimmediate_operand"
kono
parents: 67
diff changeset
411 "= r,m,t,r,t,r,t,t,Um,r")
kono
parents: 67
diff changeset
412 (match_operand:HF 1 "general_operand"
kono
parents: 67
diff changeset
413 " m,r,t,r,r,t,Dv,Um,t,F"))]
kono
parents: 67
diff changeset
414 "TARGET_32BIT
kono
parents: 67
diff changeset
415 && TARGET_VFP_FP16INST
kono
parents: 67
diff changeset
416 && (s_register_operand (operands[0], HFmode)
kono
parents: 67
diff changeset
417 || s_register_operand (operands[1], HFmode))"
kono
parents: 67
diff changeset
418 {
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
419 switch (which_alternative)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
420 {
111
kono
parents: 67
diff changeset
421 case 0: /* ARM register from memory. */
kono
parents: 67
diff changeset
422 return \"ldrh%?\\t%0, %1\\t%@ __fp16\";
kono
parents: 67
diff changeset
423 case 1: /* Memory from ARM register. */
kono
parents: 67
diff changeset
424 return \"strh%?\\t%1, %0\\t%@ __fp16\";
kono
parents: 67
diff changeset
425 case 2: /* S register from S register. */
kono
parents: 67
diff changeset
426 return \"vmov\\t%0, %1\t%@ __fp16\";
kono
parents: 67
diff changeset
427 case 3: /* ARM register from ARM register. */
kono
parents: 67
diff changeset
428 return \"mov%?\\t%0, %1\\t%@ __fp16\";
kono
parents: 67
diff changeset
429 case 4: /* S register from ARM register. */
kono
parents: 67
diff changeset
430 case 5: /* ARM register from S register. */
kono
parents: 67
diff changeset
431 case 6: /* S register from immediate. */
kono
parents: 67
diff changeset
432 return \"vmov.f16\\t%0, %1\t%@ __fp16\";
kono
parents: 67
diff changeset
433 case 7: /* S register from memory. */
kono
parents: 67
diff changeset
434 return \"vld1.16\\t{%z0}, %A1\";
kono
parents: 67
diff changeset
435 case 8: /* Memory from S register. */
kono
parents: 67
diff changeset
436 return \"vst1.16\\t{%z1}, %A0\";
kono
parents: 67
diff changeset
437 case 9: /* ARM register from constant. */
kono
parents: 67
diff changeset
438 {
kono
parents: 67
diff changeset
439 long bits;
kono
parents: 67
diff changeset
440 rtx ops[4];
kono
parents: 67
diff changeset
441
kono
parents: 67
diff changeset
442 bits = real_to_target (NULL, CONST_DOUBLE_REAL_VALUE (operands[1]),
kono
parents: 67
diff changeset
443 HFmode);
kono
parents: 67
diff changeset
444 ops[0] = operands[0];
kono
parents: 67
diff changeset
445 ops[1] = GEN_INT (bits);
kono
parents: 67
diff changeset
446 ops[2] = GEN_INT (bits & 0xff00);
kono
parents: 67
diff changeset
447 ops[3] = GEN_INT (bits & 0x00ff);
kono
parents: 67
diff changeset
448
kono
parents: 67
diff changeset
449 if (arm_arch_thumb2)
kono
parents: 67
diff changeset
450 output_asm_insn (\"movw\\t%0, %1\", ops);
kono
parents: 67
diff changeset
451 else
kono
parents: 67
diff changeset
452 output_asm_insn (\"mov\\t%0, %2\;orr\\t%0, %0, %3\", ops);
kono
parents: 67
diff changeset
453 return \"\";
kono
parents: 67
diff changeset
454 }
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
455 default:
111
kono
parents: 67
diff changeset
456 gcc_unreachable ();
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
457 }
111
kono
parents: 67
diff changeset
458 }
kono
parents: 67
diff changeset
459 [(set_attr "predicable" "yes, yes, no, yes, no, no, no, no, no, no")
kono
parents: 67
diff changeset
460 (set_attr "predicable_short_it" "no, no, no, yes,\
kono
parents: 67
diff changeset
461 no, no, no, no,\
kono
parents: 67
diff changeset
462 no, no")
kono
parents: 67
diff changeset
463 (set_attr_alternative "type"
kono
parents: 67
diff changeset
464 [(const_string "load_4") (const_string "store_4")
kono
parents: 67
diff changeset
465 (const_string "fmov") (const_string "mov_reg")
kono
parents: 67
diff changeset
466 (const_string "f_mcr") (const_string "f_mrc")
kono
parents: 67
diff changeset
467 (const_string "fconsts") (const_string "neon_load1_1reg")
kono
parents: 67
diff changeset
468 (const_string "neon_store1_1reg")
kono
parents: 67
diff changeset
469 (if_then_else (match_test "arm_arch_thumb2")
kono
parents: 67
diff changeset
470 (const_string "mov_imm")
kono
parents: 67
diff changeset
471 (const_string "multiple"))])
kono
parents: 67
diff changeset
472 (set_attr_alternative "length"
kono
parents: 67
diff changeset
473 [(const_int 4) (const_int 4)
kono
parents: 67
diff changeset
474 (const_int 4) (const_int 4)
kono
parents: 67
diff changeset
475 (const_int 4) (const_int 4)
kono
parents: 67
diff changeset
476 (const_int 4) (const_int 4)
kono
parents: 67
diff changeset
477 (const_int 4)
kono
parents: 67
diff changeset
478 (if_then_else (match_test "arm_arch_thumb2")
kono
parents: 67
diff changeset
479 (const_int 4)
kono
parents: 67
diff changeset
480 (const_int 8))])]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
481 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
482
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
483 (define_insn "*movhf_vfp_neon"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
484 [(set (match_operand:HF 0 "nonimmediate_operand" "= t,Um,r,m,t,r,t,r,r")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
485 (match_operand:HF 1 "general_operand" " Um, t,m,r,t,r,r,t,F"))]
111
kono
parents: 67
diff changeset
486 "TARGET_32BIT
kono
parents: 67
diff changeset
487 && TARGET_HARD_FLOAT && TARGET_NEON_FP16
kono
parents: 67
diff changeset
488 && !TARGET_VFP_FP16INST
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
489 && ( s_register_operand (operands[0], HFmode)
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
490 || s_register_operand (operands[1], HFmode))"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
491 "*
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
492 switch (which_alternative)
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
493 {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
494 case 0: /* S register from memory */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
495 return \"vld1.16\\t{%z0}, %A1\";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
496 case 1: /* memory from S register */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
497 return \"vst1.16\\t{%z1}, %A0\";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
498 case 2: /* ARM register from memory */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
499 return \"ldrh\\t%0, %1\\t%@ __fp16\";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
500 case 3: /* memory from ARM register */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
501 return \"strh\\t%1, %0\\t%@ __fp16\";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
502 case 4: /* S register from S register */
111
kono
parents: 67
diff changeset
503 return \"vmov.f32\\t%0, %1\";
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
504 case 5: /* ARM register from ARM register */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
505 return \"mov\\t%0, %1\\t%@ __fp16\";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
506 case 6: /* S register from ARM register */
111
kono
parents: 67
diff changeset
507 return \"vmov\\t%0, %1\";
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
508 case 7: /* ARM register from S register */
111
kono
parents: 67
diff changeset
509 return \"vmov\\t%0, %1\";
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
510 case 8: /* ARM register from constant */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
511 {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
512 long bits;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
513 rtx ops[4];
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
514
111
kono
parents: 67
diff changeset
515 bits = real_to_target (NULL, CONST_DOUBLE_REAL_VALUE (operands[1]),
kono
parents: 67
diff changeset
516 HFmode);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
517 ops[0] = operands[0];
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
518 ops[1] = GEN_INT (bits);
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
519 ops[2] = GEN_INT (bits & 0xff00);
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
520 ops[3] = GEN_INT (bits & 0x00ff);
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
521
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
522 if (arm_arch_thumb2)
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
523 output_asm_insn (\"movw\\t%0, %1\", ops);
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
524 else
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
525 output_asm_insn (\"mov\\t%0, %2\;orr\\t%0, %0, %3\", ops);
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
526 return \"\";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
527 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
528 default:
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
529 gcc_unreachable ();
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
530 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
531 "
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
532 [(set_attr "conds" "unconditional")
111
kono
parents: 67
diff changeset
533 (set_attr "type" "neon_load1_1reg,neon_store1_1reg,\
kono
parents: 67
diff changeset
534 load_4,store_4,fmov,mov_reg,f_mcr,f_mrc,multiple")
kono
parents: 67
diff changeset
535 (set_attr "length" "4,4,4,4,4,4,4,4,8")]
kono
parents: 67
diff changeset
536 )
kono
parents: 67
diff changeset
537
kono
parents: 67
diff changeset
538 ;; FP16 without element load/store instructions.
kono
parents: 67
diff changeset
539 (define_insn "*movhf_vfp"
kono
parents: 67
diff changeset
540 [(set (match_operand:HF 0 "nonimmediate_operand" "=r,m,t,r,t,r,r")
kono
parents: 67
diff changeset
541 (match_operand:HF 1 "general_operand" " m,r,t,r,r,t,F"))]
kono
parents: 67
diff changeset
542 "TARGET_32BIT
kono
parents: 67
diff changeset
543 && TARGET_HARD_FLOAT
kono
parents: 67
diff changeset
544 && !TARGET_NEON_FP16
kono
parents: 67
diff changeset
545 && !TARGET_VFP_FP16INST
kono
parents: 67
diff changeset
546 && ( s_register_operand (operands[0], HFmode)
kono
parents: 67
diff changeset
547 || s_register_operand (operands[1], HFmode))"
kono
parents: 67
diff changeset
548 "*
kono
parents: 67
diff changeset
549 switch (which_alternative)
kono
parents: 67
diff changeset
550 {
kono
parents: 67
diff changeset
551 case 0: /* ARM register from memory */
kono
parents: 67
diff changeset
552 return \"ldrh\\t%0, %1\\t%@ __fp16\";
kono
parents: 67
diff changeset
553 case 1: /* memory from ARM register */
kono
parents: 67
diff changeset
554 return \"strh\\t%1, %0\\t%@ __fp16\";
kono
parents: 67
diff changeset
555 case 2: /* S register from S register */
kono
parents: 67
diff changeset
556 return \"vmov.f32\\t%0, %1\";
kono
parents: 67
diff changeset
557 case 3: /* ARM register from ARM register */
kono
parents: 67
diff changeset
558 return \"mov\\t%0, %1\\t%@ __fp16\";
kono
parents: 67
diff changeset
559 case 4: /* S register from ARM register */
kono
parents: 67
diff changeset
560 return \"vmov\\t%0, %1\";
kono
parents: 67
diff changeset
561 case 5: /* ARM register from S register */
kono
parents: 67
diff changeset
562 return \"vmov\\t%0, %1\";
kono
parents: 67
diff changeset
563 case 6: /* ARM register from constant */
kono
parents: 67
diff changeset
564 {
kono
parents: 67
diff changeset
565 long bits;
kono
parents: 67
diff changeset
566 rtx ops[4];
kono
parents: 67
diff changeset
567
kono
parents: 67
diff changeset
568 bits = real_to_target (NULL, CONST_DOUBLE_REAL_VALUE (operands[1]),
kono
parents: 67
diff changeset
569 HFmode);
kono
parents: 67
diff changeset
570 ops[0] = operands[0];
kono
parents: 67
diff changeset
571 ops[1] = GEN_INT (bits);
kono
parents: 67
diff changeset
572 ops[2] = GEN_INT (bits & 0xff00);
kono
parents: 67
diff changeset
573 ops[3] = GEN_INT (bits & 0x00ff);
kono
parents: 67
diff changeset
574
kono
parents: 67
diff changeset
575 if (arm_arch_thumb2)
kono
parents: 67
diff changeset
576 output_asm_insn (\"movw\\t%0, %1\", ops);
kono
parents: 67
diff changeset
577 else
kono
parents: 67
diff changeset
578 output_asm_insn (\"mov\\t%0, %2\;orr\\t%0, %0, %3\", ops);
kono
parents: 67
diff changeset
579 return \"\";
kono
parents: 67
diff changeset
580 }
kono
parents: 67
diff changeset
581 default:
kono
parents: 67
diff changeset
582 gcc_unreachable ();
kono
parents: 67
diff changeset
583 }
kono
parents: 67
diff changeset
584 "
kono
parents: 67
diff changeset
585 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
586 (set_attr "type" "load_4,store_4,fmov,mov_reg,f_mcr,f_mrc,multiple")
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
587 (set_attr "length" "4,4,4,4,4,4,8")]
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
588 )
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
589
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
590
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
591 ;; SFmode moves
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
592 ;; Disparage the w<->r cases because reloading an invalid address is
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
593 ;; preferable to loading the value via integer registers.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
594
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
595 (define_insn "*movsf_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
596 [(set (match_operand:SF 0 "nonimmediate_operand" "=t,?r,t ,t ,Uv,r ,m,t,r")
111
kono
parents: 67
diff changeset
597 (match_operand:SF 1 "general_operand" " ?r,t,Dv,UvE,t, mE,r,t,r"))]
kono
parents: 67
diff changeset
598 "TARGET_ARM && TARGET_HARD_FLOAT
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
599 && ( s_register_operand (operands[0], SFmode)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
600 || s_register_operand (operands[1], SFmode))"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
601 "*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
602 switch (which_alternative)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
603 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
604 case 0:
111
kono
parents: 67
diff changeset
605 return \"vmov%?\\t%0, %1\";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
606 case 1:
111
kono
parents: 67
diff changeset
607 return \"vmov%?\\t%0, %1\";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
608 case 2:
111
kono
parents: 67
diff changeset
609 return \"vmov%?.f32\\t%0, %1\";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
610 case 3: case 4:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
611 return output_move_vfp (operands);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
612 case 5:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
613 return \"ldr%?\\t%0, %1\\t%@ float\";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
614 case 6:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
615 return \"str%?\\t%1, %0\\t%@ float\";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
616 case 7:
111
kono
parents: 67
diff changeset
617 return \"vmov%?.f32\\t%0, %1\";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
618 case 8:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
619 return \"mov%?\\t%0, %1\\t%@ float\";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
620 default:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
621 gcc_unreachable ();
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
622 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
623 "
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
624 [(set_attr "predicable" "yes")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
625 (set_attr "type"
111
kono
parents: 67
diff changeset
626 "f_mcr,f_mrc,fconsts,f_loads,f_stores,load_4,store_4,fmov,mov_reg")
kono
parents: 67
diff changeset
627 (set_attr "pool_range" "*,*,*,1020,*,4096,*,*,*")
kono
parents: 67
diff changeset
628 (set_attr "neg_pool_range" "*,*,*,1008,*,4080,*,*,*")]
kono
parents: 67
diff changeset
629 )
kono
parents: 67
diff changeset
630
kono
parents: 67
diff changeset
631 (define_insn "*thumb2_movsf_vfp"
kono
parents: 67
diff changeset
632 [(set (match_operand:SF 0 "nonimmediate_operand" "=t,?r,t, t ,Uv,r ,m,t,r")
kono
parents: 67
diff changeset
633 (match_operand:SF 1 "general_operand" " ?r,t,Dv,UvE,t, mE,r,t,r"))]
kono
parents: 67
diff changeset
634 "TARGET_THUMB2 && TARGET_HARD_FLOAT
kono
parents: 67
diff changeset
635 && ( s_register_operand (operands[0], SFmode)
kono
parents: 67
diff changeset
636 || s_register_operand (operands[1], SFmode))"
kono
parents: 67
diff changeset
637 "*
kono
parents: 67
diff changeset
638 switch (which_alternative)
kono
parents: 67
diff changeset
639 {
kono
parents: 67
diff changeset
640 case 0:
kono
parents: 67
diff changeset
641 return \"vmov%?\\t%0, %1\";
kono
parents: 67
diff changeset
642 case 1:
kono
parents: 67
diff changeset
643 return \"vmov%?\\t%0, %1\";
kono
parents: 67
diff changeset
644 case 2:
kono
parents: 67
diff changeset
645 return \"vmov%?.f32\\t%0, %1\";
kono
parents: 67
diff changeset
646 case 3: case 4:
kono
parents: 67
diff changeset
647 return output_move_vfp (operands);
kono
parents: 67
diff changeset
648 case 5:
kono
parents: 67
diff changeset
649 return \"ldr%?\\t%0, %1\\t%@ float\";
kono
parents: 67
diff changeset
650 case 6:
kono
parents: 67
diff changeset
651 return \"str%?\\t%1, %0\\t%@ float\";
kono
parents: 67
diff changeset
652 case 7:
kono
parents: 67
diff changeset
653 return \"vmov%?.f32\\t%0, %1\";
kono
parents: 67
diff changeset
654 case 8:
kono
parents: 67
diff changeset
655 return \"mov%?\\t%0, %1\\t%@ float\";
kono
parents: 67
diff changeset
656 default:
kono
parents: 67
diff changeset
657 gcc_unreachable ();
kono
parents: 67
diff changeset
658 }
kono
parents: 67
diff changeset
659 "
kono
parents: 67
diff changeset
660 [(set_attr "predicable" "yes")
kono
parents: 67
diff changeset
661 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
662 (set_attr "type"
kono
parents: 67
diff changeset
663 "f_mcr,f_mrc,fconsts,f_loads,f_stores,load_4,store_4,fmov,mov_reg")
kono
parents: 67
diff changeset
664 (set_attr "pool_range" "*,*,*,1018,*,4090,*,*,*")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
665 (set_attr "neg_pool_range" "*,*,*,1008,*,0,*,*,*")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
666 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
667
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
668 ;; DFmode moves
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
669
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
670 (define_insn "*movdf_vfp"
111
kono
parents: 67
diff changeset
671 [(set (match_operand:DF 0 "nonimmediate_soft_df_operand" "=w,?r,w ,w,w ,Uv,r, m,w,r")
kono
parents: 67
diff changeset
672 (match_operand:DF 1 "soft_df_operand" " ?r,w,Dy,G,UvF,w ,mF,r,w,r"))]
kono
parents: 67
diff changeset
673 "TARGET_ARM && TARGET_HARD_FLOAT
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
674 && ( register_operand (operands[0], DFmode)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
675 || register_operand (operands[1], DFmode))"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
676 "*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
677 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
678 switch (which_alternative)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
679 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
680 case 0:
111
kono
parents: 67
diff changeset
681 return \"vmov%?\\t%P0, %Q1, %R1\";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
682 case 1:
111
kono
parents: 67
diff changeset
683 return \"vmov%?\\t%Q0, %R0, %P1\";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
684 case 2:
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
685 gcc_assert (TARGET_VFP_DOUBLE);
111
kono
parents: 67
diff changeset
686 return \"vmov%?.f64\\t%P0, %1\";
kono
parents: 67
diff changeset
687 case 3:
kono
parents: 67
diff changeset
688 gcc_assert (TARGET_VFP_DOUBLE);
kono
parents: 67
diff changeset
689 return \"vmov.i64\\t%P0, #0\\t%@ float\";
kono
parents: 67
diff changeset
690 case 4: case 5:
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
691 return output_move_vfp (operands);
111
kono
parents: 67
diff changeset
692 case 6: case 7:
kono
parents: 67
diff changeset
693 return output_move_double (operands, true, NULL);
kono
parents: 67
diff changeset
694 case 8:
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
695 if (TARGET_VFP_SINGLE)
111
kono
parents: 67
diff changeset
696 return \"vmov%?.f32\\t%0, %1\;vmov%?.f32\\t%p0, %p1\";
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
697 else
111
kono
parents: 67
diff changeset
698 return \"vmov%?.f64\\t%P0, %P1\";
kono
parents: 67
diff changeset
699 case 9:
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
700 return \"#\";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
701 default:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
702 gcc_unreachable ();
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
703 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
704 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
705 "
111
kono
parents: 67
diff changeset
706 [(set_attr "type" "f_mcrr,f_mrrc,fconstd,neon_move,f_loadd,f_stored,\
kono
parents: 67
diff changeset
707 load_8,store_8,ffarithd,multiple")
kono
parents: 67
diff changeset
708 (set (attr "length") (cond [(eq_attr "alternative" "6,7,9") (const_int 8)
kono
parents: 67
diff changeset
709 (eq_attr "alternative" "8")
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
710 (if_then_else
111
kono
parents: 67
diff changeset
711 (match_test "TARGET_VFP_SINGLE")
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
712 (const_int 8)
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
713 (const_int 4))]
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
714 (const_int 4)))
111
kono
parents: 67
diff changeset
715 (set_attr "predicable" "yes,yes,yes,no,yes,yes,yes,yes,yes,yes")
kono
parents: 67
diff changeset
716 (set_attr "pool_range" "*,*,*,*,1020,*,1020,*,*,*")
kono
parents: 67
diff changeset
717 (set_attr "neg_pool_range" "*,*,*,*,1004,*,1004,*,*,*")
kono
parents: 67
diff changeset
718 (set_attr "arch" "any,any,any,neon,any,any,any,any,any,any")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
719 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
720
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
721 (define_insn "*thumb2_movdf_vfp"
111
kono
parents: 67
diff changeset
722 [(set (match_operand:DF 0 "nonimmediate_soft_df_operand" "=w,?r,w ,w,w ,Uv,r ,m,w,r")
kono
parents: 67
diff changeset
723 (match_operand:DF 1 "soft_df_operand" " ?r,w,Dy,G,UvF,w, mF,r, w,r"))]
kono
parents: 67
diff changeset
724 "TARGET_THUMB2 && TARGET_HARD_FLOAT
kono
parents: 67
diff changeset
725 && ( register_operand (operands[0], DFmode)
kono
parents: 67
diff changeset
726 || register_operand (operands[1], DFmode))"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
727 "*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
728 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
729 switch (which_alternative)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
730 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
731 case 0:
111
kono
parents: 67
diff changeset
732 return \"vmov%?\\t%P0, %Q1, %R1\";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
733 case 1:
111
kono
parents: 67
diff changeset
734 return \"vmov%?\\t%Q0, %R0, %P1\";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
735 case 2:
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
736 gcc_assert (TARGET_VFP_DOUBLE);
111
kono
parents: 67
diff changeset
737 return \"vmov%?.f64\\t%P0, %1\";
kono
parents: 67
diff changeset
738 case 3:
kono
parents: 67
diff changeset
739 gcc_assert (TARGET_VFP_DOUBLE);
kono
parents: 67
diff changeset
740 return \"vmov.i64\\t%P0, #0\\t%@ float\";
kono
parents: 67
diff changeset
741 case 4: case 5:
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
742 return output_move_vfp (operands);
111
kono
parents: 67
diff changeset
743 case 6: case 7: case 9:
kono
parents: 67
diff changeset
744 return output_move_double (operands, true, NULL);
kono
parents: 67
diff changeset
745 case 8:
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
746 if (TARGET_VFP_SINGLE)
111
kono
parents: 67
diff changeset
747 return \"vmov%?.f32\\t%0, %1\;vmov%?.f32\\t%p0, %p1\";
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
748 else
111
kono
parents: 67
diff changeset
749 return \"vmov%?.f64\\t%P0, %P1\";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
750 default:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
751 abort ();
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
752 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
753 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
754 "
111
kono
parents: 67
diff changeset
755 [(set_attr "type" "f_mcrr,f_mrrc,fconstd,neon_move,f_loadd,\
kono
parents: 67
diff changeset
756 f_stored,load_8,store_8,ffarithd,multiple")
kono
parents: 67
diff changeset
757 (set (attr "length") (cond [(eq_attr "alternative" "6,7,9") (const_int 8)
kono
parents: 67
diff changeset
758 (eq_attr "alternative" "8")
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
759 (if_then_else
111
kono
parents: 67
diff changeset
760 (match_test "TARGET_VFP_SINGLE")
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
761 (const_int 8)
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
762 (const_int 4))]
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
763 (const_int 4)))
111
kono
parents: 67
diff changeset
764 (set_attr "pool_range" "*,*,*,*,1018,*,4094,*,*,*")
kono
parents: 67
diff changeset
765 (set_attr "neg_pool_range" "*,*,*,*,1008,*,0,*,*,*")
kono
parents: 67
diff changeset
766 (set_attr "arch" "any,any,any,neon,any,any,any,any,any,any")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
767 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
768
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
769
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
770 ;; Conditional move patterns
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
771
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
772 (define_insn "*movsfcc_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
773 [(set (match_operand:SF 0 "s_register_operand" "=t,t,t,t,t,t,?r,?r,?r")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
774 (if_then_else:SF
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
775 (match_operator 3 "arm_comparison_operator"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
776 [(match_operand 4 "cc_register" "") (const_int 0)])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
777 (match_operand:SF 1 "s_register_operand" "0,t,t,0,?r,?r,0,t,t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
778 (match_operand:SF 2 "s_register_operand" "t,0,t,?r,0,?r,t,0,t")))]
111
kono
parents: 67
diff changeset
779 "TARGET_ARM && TARGET_HARD_FLOAT"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
780 "@
111
kono
parents: 67
diff changeset
781 vmov%D3.f32\\t%0, %2
kono
parents: 67
diff changeset
782 vmov%d3.f32\\t%0, %1
kono
parents: 67
diff changeset
783 vmov%D3.f32\\t%0, %2\;vmov%d3.f32\\t%0, %1
kono
parents: 67
diff changeset
784 vmov%D3\\t%0, %2
kono
parents: 67
diff changeset
785 vmov%d3\\t%0, %1
kono
parents: 67
diff changeset
786 vmov%D3\\t%0, %2\;vmov%d3\\t%0, %1
kono
parents: 67
diff changeset
787 vmov%D3\\t%0, %2
kono
parents: 67
diff changeset
788 vmov%d3\\t%0, %1
kono
parents: 67
diff changeset
789 vmov%D3\\t%0, %2\;vmov%d3\\t%0, %1"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
790 [(set_attr "conds" "use")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
791 (set_attr "length" "4,4,8,4,4,8,4,4,8")
111
kono
parents: 67
diff changeset
792 (set_attr "type" "fmov,fmov,fmov,f_mcr,f_mcr,f_mcr,f_mrc,f_mrc,f_mrc")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
793 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
794
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
795 (define_insn "*thumb2_movsfcc_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
796 [(set (match_operand:SF 0 "s_register_operand" "=t,t,t,t,t,t,?r,?r,?r")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
797 (if_then_else:SF
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
798 (match_operator 3 "arm_comparison_operator"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
799 [(match_operand 4 "cc_register" "") (const_int 0)])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
800 (match_operand:SF 1 "s_register_operand" "0,t,t,0,?r,?r,0,t,t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
801 (match_operand:SF 2 "s_register_operand" "t,0,t,?r,0,?r,t,0,t")))]
111
kono
parents: 67
diff changeset
802 "TARGET_THUMB2 && TARGET_HARD_FLOAT && !arm_restrict_it"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
803 "@
111
kono
parents: 67
diff changeset
804 it\\t%D3\;vmov%D3.f32\\t%0, %2
kono
parents: 67
diff changeset
805 it\\t%d3\;vmov%d3.f32\\t%0, %1
kono
parents: 67
diff changeset
806 ite\\t%D3\;vmov%D3.f32\\t%0, %2\;vmov%d3.f32\\t%0, %1
kono
parents: 67
diff changeset
807 it\\t%D3\;vmov%D3\\t%0, %2
kono
parents: 67
diff changeset
808 it\\t%d3\;vmov%d3\\t%0, %1
kono
parents: 67
diff changeset
809 ite\\t%D3\;vmov%D3\\t%0, %2\;vmov%d3\\t%0, %1
kono
parents: 67
diff changeset
810 it\\t%D3\;vmov%D3\\t%0, %2
kono
parents: 67
diff changeset
811 it\\t%d3\;vmov%d3\\t%0, %1
kono
parents: 67
diff changeset
812 ite\\t%D3\;vmov%D3\\t%0, %2\;vmov%d3\\t%0, %1"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
813 [(set_attr "conds" "use")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
814 (set_attr "length" "6,6,10,6,6,10,6,6,10")
111
kono
parents: 67
diff changeset
815 (set_attr "type" "fmov,fmov,fmov,f_mcr,f_mcr,f_mcr,f_mrc,f_mrc,f_mrc")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
816 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
817
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
818 (define_insn "*movdfcc_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
819 [(set (match_operand:DF 0 "s_register_operand" "=w,w,w,w,w,w,?r,?r,?r")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
820 (if_then_else:DF
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
821 (match_operator 3 "arm_comparison_operator"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
822 [(match_operand 4 "cc_register" "") (const_int 0)])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
823 (match_operand:DF 1 "s_register_operand" "0,w,w,0,?r,?r,0,w,w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
824 (match_operand:DF 2 "s_register_operand" "w,0,w,?r,0,?r,w,0,w")))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
825 "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
826 "@
111
kono
parents: 67
diff changeset
827 vmov%D3.f64\\t%P0, %P2
kono
parents: 67
diff changeset
828 vmov%d3.f64\\t%P0, %P1
kono
parents: 67
diff changeset
829 vmov%D3.f64\\t%P0, %P2\;vmov%d3.f64\\t%P0, %P1
kono
parents: 67
diff changeset
830 vmov%D3\\t%P0, %Q2, %R2
kono
parents: 67
diff changeset
831 vmov%d3\\t%P0, %Q1, %R1
kono
parents: 67
diff changeset
832 vmov%D3\\t%P0, %Q2, %R2\;vmov%d3\\t%P0, %Q1, %R1
kono
parents: 67
diff changeset
833 vmov%D3\\t%Q0, %R0, %P2
kono
parents: 67
diff changeset
834 vmov%d3\\t%Q0, %R0, %P1
kono
parents: 67
diff changeset
835 vmov%D3\\t%Q0, %R0, %P2\;vmov%d3\\t%Q0, %R0, %P1"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
836 [(set_attr "conds" "use")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
837 (set_attr "length" "4,4,8,4,4,8,4,4,8")
111
kono
parents: 67
diff changeset
838 (set_attr "type" "ffarithd,ffarithd,ffarithd,f_mcr,f_mcr,f_mcr,f_mrrc,f_mrrc,f_mrrc")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
839 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
840
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
841 (define_insn "*thumb2_movdfcc_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
842 [(set (match_operand:DF 0 "s_register_operand" "=w,w,w,w,w,w,?r,?r,?r")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
843 (if_then_else:DF
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
844 (match_operator 3 "arm_comparison_operator"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
845 [(match_operand 4 "cc_register" "") (const_int 0)])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
846 (match_operand:DF 1 "s_register_operand" "0,w,w,0,?r,?r,0,w,w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
847 (match_operand:DF 2 "s_register_operand" "w,0,w,?r,0,?r,w,0,w")))]
111
kono
parents: 67
diff changeset
848 "TARGET_THUMB2 && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE && !arm_restrict_it"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
849 "@
111
kono
parents: 67
diff changeset
850 it\\t%D3\;vmov%D3.f64\\t%P0, %P2
kono
parents: 67
diff changeset
851 it\\t%d3\;vmov%d3.f64\\t%P0, %P1
kono
parents: 67
diff changeset
852 ite\\t%D3\;vmov%D3.f64\\t%P0, %P2\;vmov%d3.f64\\t%P0, %P1
kono
parents: 67
diff changeset
853 it\t%D3\;vmov%D3\\t%P0, %Q2, %R2
kono
parents: 67
diff changeset
854 it\t%d3\;vmov%d3\\t%P0, %Q1, %R1
kono
parents: 67
diff changeset
855 ite\\t%D3\;vmov%D3\\t%P0, %Q2, %R2\;vmov%d3\\t%P0, %Q1, %R1
kono
parents: 67
diff changeset
856 it\t%D3\;vmov%D3\\t%Q0, %R0, %P2
kono
parents: 67
diff changeset
857 it\t%d3\;vmov%d3\\t%Q0, %R0, %P1
kono
parents: 67
diff changeset
858 ite\\t%D3\;vmov%D3\\t%Q0, %R0, %P2\;vmov%d3\\t%Q0, %R0, %P1"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
859 [(set_attr "conds" "use")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
860 (set_attr "length" "6,6,10,6,6,10,6,6,10")
111
kono
parents: 67
diff changeset
861 (set_attr "type" "ffarithd,ffarithd,ffarithd,f_mcr,f_mcr,f_mcrr,f_mrrc,f_mrrc,f_mrrc")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
862 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
863
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
864
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
865 ;; Sign manipulation functions
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
866
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
867 (define_insn "*abssf2_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
868 [(set (match_operand:SF 0 "s_register_operand" "=t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
869 (abs:SF (match_operand:SF 1 "s_register_operand" "t")))]
111
kono
parents: 67
diff changeset
870 "TARGET_32BIT && TARGET_HARD_FLOAT"
kono
parents: 67
diff changeset
871 "vabs%?.f32\\t%0, %1"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
872 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
873 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
874 (set_attr "type" "ffariths")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
875 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
876
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
877 (define_insn "*absdf2_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
878 [(set (match_operand:DF 0 "s_register_operand" "=w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
879 (abs:DF (match_operand:DF 1 "s_register_operand" "w")))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
880 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
111
kono
parents: 67
diff changeset
881 "vabs%?.f64\\t%P0, %P1"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
882 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
883 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
884 (set_attr "type" "ffarithd")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
885 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
886
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
887 (define_insn "*negsf2_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
888 [(set (match_operand:SF 0 "s_register_operand" "=t,?r")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
889 (neg:SF (match_operand:SF 1 "s_register_operand" "t,r")))]
111
kono
parents: 67
diff changeset
890 "TARGET_32BIT && TARGET_HARD_FLOAT"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
891 "@
111
kono
parents: 67
diff changeset
892 vneg%?.f32\\t%0, %1
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
893 eor%?\\t%0, %1, #-2147483648"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
894 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
895 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
896 (set_attr "type" "ffariths")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
897 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
898
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
899 (define_insn_and_split "*negdf2_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
900 [(set (match_operand:DF 0 "s_register_operand" "=w,?r,?r")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
901 (neg:DF (match_operand:DF 1 "s_register_operand" "w,0,r")))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
902 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
903 "@
111
kono
parents: 67
diff changeset
904 vneg%?.f64\\t%P0, %P1
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
905 #
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
906 #"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
907 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE && reload_completed
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
908 && arm_general_register_operand (operands[0], DFmode)"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
909 [(set (match_dup 0) (match_dup 1))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
910 "
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
911 if (REGNO (operands[0]) == REGNO (operands[1]))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
912 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
913 operands[0] = gen_highpart (SImode, operands[0]);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
914 operands[1] = gen_rtx_XOR (SImode, operands[0], GEN_INT (0x80000000));
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
915 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
916 else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
917 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
918 rtx in_hi, in_lo, out_hi, out_lo;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
919
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
920 in_hi = gen_rtx_XOR (SImode, gen_highpart (SImode, operands[1]),
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
921 GEN_INT (0x80000000));
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
922 in_lo = gen_lowpart (SImode, operands[1]);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
923 out_hi = gen_highpart (SImode, operands[0]);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
924 out_lo = gen_lowpart (SImode, operands[0]);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
925
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
926 if (REGNO (in_lo) == REGNO (out_hi))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
927 {
111
kono
parents: 67
diff changeset
928 emit_insn (gen_rtx_SET (out_lo, in_lo));
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
929 operands[0] = out_hi;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
930 operands[1] = in_hi;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
931 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
932 else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
933 {
111
kono
parents: 67
diff changeset
934 emit_insn (gen_rtx_SET (out_hi, in_hi));
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
935 operands[0] = out_lo;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
936 operands[1] = in_lo;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
937 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
938 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
939 "
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
940 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
941 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
942 (set_attr "length" "4,4,8")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
943 (set_attr "type" "ffarithd")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
944 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
945
111
kono
parents: 67
diff changeset
946 ;; ABS and NEG for FP16.
kono
parents: 67
diff changeset
947 (define_insn "<absneg_str>hf2"
kono
parents: 67
diff changeset
948 [(set (match_operand:HF 0 "s_register_operand" "=w")
kono
parents: 67
diff changeset
949 (ABSNEG:HF (match_operand:HF 1 "s_register_operand" "w")))]
kono
parents: 67
diff changeset
950 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
951 "v<absneg_str>.f16\t%0, %1"
kono
parents: 67
diff changeset
952 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
953 (set_attr "type" "ffariths")]
kono
parents: 67
diff changeset
954 )
kono
parents: 67
diff changeset
955
kono
parents: 67
diff changeset
956 (define_expand "neon_vabshf"
kono
parents: 67
diff changeset
957 [(set
kono
parents: 67
diff changeset
958 (match_operand:HF 0 "s_register_operand")
kono
parents: 67
diff changeset
959 (abs:HF (match_operand:HF 1 "s_register_operand")))]
kono
parents: 67
diff changeset
960 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
961 {
kono
parents: 67
diff changeset
962 emit_insn (gen_abshf2 (operands[0], operands[1]));
kono
parents: 67
diff changeset
963 DONE;
kono
parents: 67
diff changeset
964 })
kono
parents: 67
diff changeset
965
kono
parents: 67
diff changeset
966 ;; VRND for FP16.
kono
parents: 67
diff changeset
967 (define_insn "neon_v<fp16_rnd_str>hf"
kono
parents: 67
diff changeset
968 [(set (match_operand:HF 0 "s_register_operand" "=w")
kono
parents: 67
diff changeset
969 (unspec:HF
kono
parents: 67
diff changeset
970 [(match_operand:HF 1 "s_register_operand" "w")]
kono
parents: 67
diff changeset
971 FP16_RND))]
kono
parents: 67
diff changeset
972 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
973 "<fp16_rnd_insn>.f16\t%0, %1"
kono
parents: 67
diff changeset
974 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
975 (set_attr "type" "neon_fp_round_s")]
kono
parents: 67
diff changeset
976 )
kono
parents: 67
diff changeset
977
kono
parents: 67
diff changeset
978 (define_insn "neon_vrndihf"
kono
parents: 67
diff changeset
979 [(set (match_operand:HF 0 "s_register_operand" "=w")
kono
parents: 67
diff changeset
980 (unspec:HF
kono
parents: 67
diff changeset
981 [(match_operand:HF 1 "s_register_operand" "w")]
kono
parents: 67
diff changeset
982 UNSPEC_VRNDI))]
kono
parents: 67
diff changeset
983 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
984 "vrintr.f16\t%0, %1"
kono
parents: 67
diff changeset
985 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
986 (set_attr "type" "neon_fp_round_s")]
kono
parents: 67
diff changeset
987 )
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
988
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
989 ;; Arithmetic insns
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
990
111
kono
parents: 67
diff changeset
991 (define_insn "addhf3"
kono
parents: 67
diff changeset
992 [(set
kono
parents: 67
diff changeset
993 (match_operand:HF 0 "s_register_operand" "=w")
kono
parents: 67
diff changeset
994 (plus:HF
kono
parents: 67
diff changeset
995 (match_operand:HF 1 "s_register_operand" "w")
kono
parents: 67
diff changeset
996 (match_operand:HF 2 "s_register_operand" "w")))]
kono
parents: 67
diff changeset
997 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
998 "vadd.f16\t%0, %1, %2"
kono
parents: 67
diff changeset
999 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
1000 (set_attr "type" "fadds")]
kono
parents: 67
diff changeset
1001 )
kono
parents: 67
diff changeset
1002
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1003 (define_insn "*addsf3_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1004 [(set (match_operand:SF 0 "s_register_operand" "=t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1005 (plus:SF (match_operand:SF 1 "s_register_operand" "t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1006 (match_operand:SF 2 "s_register_operand" "t")))]
111
kono
parents: 67
diff changeset
1007 "TARGET_32BIT && TARGET_HARD_FLOAT"
kono
parents: 67
diff changeset
1008 "vadd%?.f32\\t%0, %1, %2"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1009 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1010 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1011 (set_attr "type" "fadds")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1012 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1013
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1014 (define_insn "*adddf3_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1015 [(set (match_operand:DF 0 "s_register_operand" "=w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1016 (plus:DF (match_operand:DF 1 "s_register_operand" "w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1017 (match_operand:DF 2 "s_register_operand" "w")))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1018 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
111
kono
parents: 67
diff changeset
1019 "vadd%?.f64\\t%P0, %P1, %P2"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1020 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1021 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1022 (set_attr "type" "faddd")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1023 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1024
111
kono
parents: 67
diff changeset
1025 (define_insn "subhf3"
kono
parents: 67
diff changeset
1026 [(set
kono
parents: 67
diff changeset
1027 (match_operand:HF 0 "s_register_operand" "=w")
kono
parents: 67
diff changeset
1028 (minus:HF
kono
parents: 67
diff changeset
1029 (match_operand:HF 1 "s_register_operand" "w")
kono
parents: 67
diff changeset
1030 (match_operand:HF 2 "s_register_operand" "w")))]
kono
parents: 67
diff changeset
1031 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1032 "vsub.f16\t%0, %1, %2"
kono
parents: 67
diff changeset
1033 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
1034 (set_attr "type" "fadds")]
kono
parents: 67
diff changeset
1035 )
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1036
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1037 (define_insn "*subsf3_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1038 [(set (match_operand:SF 0 "s_register_operand" "=t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1039 (minus:SF (match_operand:SF 1 "s_register_operand" "t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1040 (match_operand:SF 2 "s_register_operand" "t")))]
111
kono
parents: 67
diff changeset
1041 "TARGET_32BIT && TARGET_HARD_FLOAT"
kono
parents: 67
diff changeset
1042 "vsub%?.f32\\t%0, %1, %2"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1043 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1044 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1045 (set_attr "type" "fadds")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1046 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1047
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1048 (define_insn "*subdf3_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1049 [(set (match_operand:DF 0 "s_register_operand" "=w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1050 (minus:DF (match_operand:DF 1 "s_register_operand" "w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1051 (match_operand:DF 2 "s_register_operand" "w")))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1052 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
111
kono
parents: 67
diff changeset
1053 "vsub%?.f64\\t%P0, %P1, %P2"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1054 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1055 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1056 (set_attr "type" "faddd")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1057 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1058
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1059
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1060 ;; Division insns
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1061
111
kono
parents: 67
diff changeset
1062 ;; FP16 Division.
kono
parents: 67
diff changeset
1063 (define_insn "divhf3"
kono
parents: 67
diff changeset
1064 [(set
kono
parents: 67
diff changeset
1065 (match_operand:HF 0 "s_register_operand" "=w")
kono
parents: 67
diff changeset
1066 (div:HF
kono
parents: 67
diff changeset
1067 (match_operand:HF 1 "s_register_operand" "w")
kono
parents: 67
diff changeset
1068 (match_operand:HF 2 "s_register_operand" "w")))]
kono
parents: 67
diff changeset
1069 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1070 "vdiv.f16\t%0, %1, %2"
kono
parents: 67
diff changeset
1071 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
1072 (set_attr "type" "fdivs")]
kono
parents: 67
diff changeset
1073 )
kono
parents: 67
diff changeset
1074
kono
parents: 67
diff changeset
1075 ; VFP9 Erratum 760019: It's potentially unsafe to overwrite the input
kono
parents: 67
diff changeset
1076 ; operands, so mark the output as early clobber for VFPv2 on ARMv5 or
kono
parents: 67
diff changeset
1077 ; earlier.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1078 (define_insn "*divsf3_vfp"
111
kono
parents: 67
diff changeset
1079 [(set (match_operand:SF 0 "s_register_operand" "=&t,t")
kono
parents: 67
diff changeset
1080 (div:SF (match_operand:SF 1 "s_register_operand" "t,t")
kono
parents: 67
diff changeset
1081 (match_operand:SF 2 "s_register_operand" "t,t")))]
kono
parents: 67
diff changeset
1082 "TARGET_32BIT && TARGET_HARD_FLOAT"
kono
parents: 67
diff changeset
1083 "vdiv%?.f32\\t%0, %1, %2"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1084 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1085 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1086 (set_attr "arch" "*,armv6_or_vfpv3")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1087 (set_attr "type" "fdivs")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1088 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1089
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1090 (define_insn "*divdf3_vfp"
111
kono
parents: 67
diff changeset
1091 [(set (match_operand:DF 0 "s_register_operand" "=&w,w")
kono
parents: 67
diff changeset
1092 (div:DF (match_operand:DF 1 "s_register_operand" "w,w")
kono
parents: 67
diff changeset
1093 (match_operand:DF 2 "s_register_operand" "w,w")))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1094 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
111
kono
parents: 67
diff changeset
1095 "vdiv%?.f64\\t%P0, %P1, %P2"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1096 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1097 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1098 (set_attr "arch" "*,armv6_or_vfpv3")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1099 (set_attr "type" "fdivd")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1100 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1101
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1102
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1103 ;; Multiplication insns
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1104
111
kono
parents: 67
diff changeset
1105 (define_insn "mulhf3"
kono
parents: 67
diff changeset
1106 [(set
kono
parents: 67
diff changeset
1107 (match_operand:HF 0 "s_register_operand" "=w")
kono
parents: 67
diff changeset
1108 (mult:HF (match_operand:HF 1 "s_register_operand" "w")
kono
parents: 67
diff changeset
1109 (match_operand:HF 2 "s_register_operand" "w")))]
kono
parents: 67
diff changeset
1110 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1111 "vmul.f16\t%0, %1, %2"
kono
parents: 67
diff changeset
1112 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
1113 (set_attr "type" "fmuls")]
kono
parents: 67
diff changeset
1114 )
kono
parents: 67
diff changeset
1115
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1116 (define_insn "*mulsf3_vfp"
111
kono
parents: 67
diff changeset
1117 [(set (match_operand:SF 0 "s_register_operand" "=t")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1118 (mult:SF (match_operand:SF 1 "s_register_operand" "t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1119 (match_operand:SF 2 "s_register_operand" "t")))]
111
kono
parents: 67
diff changeset
1120 "TARGET_32BIT && TARGET_HARD_FLOAT"
kono
parents: 67
diff changeset
1121 "vmul%?.f32\\t%0, %1, %2"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1122 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1123 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1124 (set_attr "type" "fmuls")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1125 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1126
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1127 (define_insn "*muldf3_vfp"
111
kono
parents: 67
diff changeset
1128 [(set (match_operand:DF 0 "s_register_operand" "=w")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1129 (mult:DF (match_operand:DF 1 "s_register_operand" "w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1130 (match_operand:DF 2 "s_register_operand" "w")))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1131 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
111
kono
parents: 67
diff changeset
1132 "vmul%?.f64\\t%P0, %P1, %P2"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1133 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1134 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1135 (set_attr "type" "fmuld")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1136 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1137
111
kono
parents: 67
diff changeset
1138 (define_insn "*mulsf3neghf_vfp"
kono
parents: 67
diff changeset
1139 [(set (match_operand:HF 0 "s_register_operand" "=t")
kono
parents: 67
diff changeset
1140 (mult:HF (neg:HF (match_operand:HF 1 "s_register_operand" "t"))
kono
parents: 67
diff changeset
1141 (match_operand:HF 2 "s_register_operand" "t")))]
kono
parents: 67
diff changeset
1142 "TARGET_VFP_FP16INST && !flag_rounding_math"
kono
parents: 67
diff changeset
1143 "vnmul.f16\\t%0, %1, %2"
kono
parents: 67
diff changeset
1144 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
1145 (set_attr "type" "fmuls")]
kono
parents: 67
diff changeset
1146 )
kono
parents: 67
diff changeset
1147
kono
parents: 67
diff changeset
1148 (define_insn "*negmulhf3_vfp"
kono
parents: 67
diff changeset
1149 [(set (match_operand:HF 0 "s_register_operand" "=t")
kono
parents: 67
diff changeset
1150 (neg:HF (mult:HF (match_operand:HF 1 "s_register_operand" "t")
kono
parents: 67
diff changeset
1151 (match_operand:HF 2 "s_register_operand" "t"))))]
kono
parents: 67
diff changeset
1152 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1153 "vnmul.f16\\t%0, %1, %2"
kono
parents: 67
diff changeset
1154 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
1155 (set_attr "type" "fmuls")]
kono
parents: 67
diff changeset
1156 )
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1157
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1158 (define_insn "*mulsf3negsf_vfp"
111
kono
parents: 67
diff changeset
1159 [(set (match_operand:SF 0 "s_register_operand" "=t")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1160 (mult:SF (neg:SF (match_operand:SF 1 "s_register_operand" "t"))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1161 (match_operand:SF 2 "s_register_operand" "t")))]
111
kono
parents: 67
diff changeset
1162 "TARGET_32BIT && TARGET_HARD_FLOAT && !flag_rounding_math"
kono
parents: 67
diff changeset
1163 "vnmul%?.f32\\t%0, %1, %2"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1164 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1165 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1166 (set_attr "type" "fmuls")]
kono
parents: 67
diff changeset
1167 )
kono
parents: 67
diff changeset
1168
kono
parents: 67
diff changeset
1169 (define_insn "*negmulsf3_vfp"
kono
parents: 67
diff changeset
1170 [(set (match_operand:SF 0 "s_register_operand" "=t")
kono
parents: 67
diff changeset
1171 (neg:SF (mult:SF (match_operand:SF 1 "s_register_operand" "t")
kono
parents: 67
diff changeset
1172 (match_operand:SF 2 "s_register_operand" "t"))))]
kono
parents: 67
diff changeset
1173 "TARGET_32BIT && TARGET_HARD_FLOAT"
kono
parents: 67
diff changeset
1174 "vnmul%?.f32\\t%0, %1, %2"
kono
parents: 67
diff changeset
1175 [(set_attr "predicable" "yes")
kono
parents: 67
diff changeset
1176 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1177 (set_attr "type" "fmuls")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1178 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1179
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1180 (define_insn "*muldf3negdf_vfp"
111
kono
parents: 67
diff changeset
1181 [(set (match_operand:DF 0 "s_register_operand" "=w")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1182 (mult:DF (neg:DF (match_operand:DF 1 "s_register_operand" "w"))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1183 (match_operand:DF 2 "s_register_operand" "w")))]
111
kono
parents: 67
diff changeset
1184 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE
kono
parents: 67
diff changeset
1185 && !flag_rounding_math"
kono
parents: 67
diff changeset
1186 "vnmul%?.f64\\t%P0, %P1, %P2"
kono
parents: 67
diff changeset
1187 [(set_attr "predicable" "yes")
kono
parents: 67
diff changeset
1188 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1189 (set_attr "type" "fmuld")]
kono
parents: 67
diff changeset
1190 )
kono
parents: 67
diff changeset
1191
kono
parents: 67
diff changeset
1192 (define_insn "*negmuldf3_vfp"
kono
parents: 67
diff changeset
1193 [(set (match_operand:DF 0 "s_register_operand" "=w")
kono
parents: 67
diff changeset
1194 (neg:DF (mult:DF (match_operand:DF 1 "s_register_operand" "w")
kono
parents: 67
diff changeset
1195 (match_operand:DF 2 "s_register_operand" "w"))))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1196 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
111
kono
parents: 67
diff changeset
1197 "vnmul%?.f64\\t%P0, %P1, %P2"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1198 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1199 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1200 (set_attr "type" "fmuld")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1201 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1202
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1203
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1204 ;; Multiply-accumulate insns
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1205
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1206 ;; 0 = 1 * 2 + 0
111
kono
parents: 67
diff changeset
1207 (define_insn "*mulsf3addhf_vfp"
kono
parents: 67
diff changeset
1208 [(set (match_operand:HF 0 "s_register_operand" "=t")
kono
parents: 67
diff changeset
1209 (plus:HF
kono
parents: 67
diff changeset
1210 (mult:HF (match_operand:HF 2 "s_register_operand" "t")
kono
parents: 67
diff changeset
1211 (match_operand:HF 3 "s_register_operand" "t"))
kono
parents: 67
diff changeset
1212 (match_operand:HF 1 "s_register_operand" "0")))]
kono
parents: 67
diff changeset
1213 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1214 "vmla.f16\\t%0, %2, %3"
kono
parents: 67
diff changeset
1215 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
1216 (set_attr "type" "fmacs")]
kono
parents: 67
diff changeset
1217 )
kono
parents: 67
diff changeset
1218
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1219 (define_insn "*mulsf3addsf_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1220 [(set (match_operand:SF 0 "s_register_operand" "=t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1221 (plus:SF (mult:SF (match_operand:SF 2 "s_register_operand" "t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1222 (match_operand:SF 3 "s_register_operand" "t"))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1223 (match_operand:SF 1 "s_register_operand" "0")))]
111
kono
parents: 67
diff changeset
1224 "TARGET_32BIT && TARGET_HARD_FLOAT"
kono
parents: 67
diff changeset
1225 "vmla%?.f32\\t%0, %2, %3"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1226 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1227 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1228 (set_attr "type" "fmacs")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1229 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1230
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1231 (define_insn "*muldf3adddf_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1232 [(set (match_operand:DF 0 "s_register_operand" "=w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1233 (plus:DF (mult:DF (match_operand:DF 2 "s_register_operand" "w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1234 (match_operand:DF 3 "s_register_operand" "w"))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1235 (match_operand:DF 1 "s_register_operand" "0")))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1236 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
111
kono
parents: 67
diff changeset
1237 "vmla%?.f64\\t%P0, %P2, %P3"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1238 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1239 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1240 (set_attr "type" "fmacd")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1241 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1242
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1243 ;; 0 = 1 * 2 - 0
111
kono
parents: 67
diff changeset
1244 (define_insn "*mulhf3subhf_vfp"
kono
parents: 67
diff changeset
1245 [(set (match_operand:HF 0 "s_register_operand" "=t")
kono
parents: 67
diff changeset
1246 (minus:HF (mult:HF (match_operand:HF 2 "s_register_operand" "t")
kono
parents: 67
diff changeset
1247 (match_operand:HF 3 "s_register_operand" "t"))
kono
parents: 67
diff changeset
1248 (match_operand:HF 1 "s_register_operand" "0")))]
kono
parents: 67
diff changeset
1249 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1250 "vnmls.f16\\t%0, %2, %3"
kono
parents: 67
diff changeset
1251 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
1252 (set_attr "type" "fmacs")]
kono
parents: 67
diff changeset
1253 )
kono
parents: 67
diff changeset
1254
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1255 (define_insn "*mulsf3subsf_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1256 [(set (match_operand:SF 0 "s_register_operand" "=t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1257 (minus:SF (mult:SF (match_operand:SF 2 "s_register_operand" "t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1258 (match_operand:SF 3 "s_register_operand" "t"))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1259 (match_operand:SF 1 "s_register_operand" "0")))]
111
kono
parents: 67
diff changeset
1260 "TARGET_32BIT && TARGET_HARD_FLOAT"
kono
parents: 67
diff changeset
1261 "vnmls%?.f32\\t%0, %2, %3"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1262 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1263 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1264 (set_attr "type" "fmacs")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1265 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1266
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1267 (define_insn "*muldf3subdf_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1268 [(set (match_operand:DF 0 "s_register_operand" "=w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1269 (minus:DF (mult:DF (match_operand:DF 2 "s_register_operand" "w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1270 (match_operand:DF 3 "s_register_operand" "w"))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1271 (match_operand:DF 1 "s_register_operand" "0")))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1272 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
111
kono
parents: 67
diff changeset
1273 "vnmls%?.f64\\t%P0, %P2, %P3"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1274 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1275 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1276 (set_attr "type" "fmacd")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1277 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1278
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1279 ;; 0 = -(1 * 2) + 0
111
kono
parents: 67
diff changeset
1280 (define_insn "*mulhf3neghfaddhf_vfp"
kono
parents: 67
diff changeset
1281 [(set (match_operand:HF 0 "s_register_operand" "=t")
kono
parents: 67
diff changeset
1282 (minus:HF (match_operand:HF 1 "s_register_operand" "0")
kono
parents: 67
diff changeset
1283 (mult:HF (match_operand:HF 2 "s_register_operand" "t")
kono
parents: 67
diff changeset
1284 (match_operand:HF 3 "s_register_operand" "t"))))]
kono
parents: 67
diff changeset
1285 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1286 "vmls.f16\\t%0, %2, %3"
kono
parents: 67
diff changeset
1287 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
1288 (set_attr "type" "fmacs")]
kono
parents: 67
diff changeset
1289 )
kono
parents: 67
diff changeset
1290
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1291 (define_insn "*mulsf3negsfaddsf_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1292 [(set (match_operand:SF 0 "s_register_operand" "=t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1293 (minus:SF (match_operand:SF 1 "s_register_operand" "0")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1294 (mult:SF (match_operand:SF 2 "s_register_operand" "t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1295 (match_operand:SF 3 "s_register_operand" "t"))))]
111
kono
parents: 67
diff changeset
1296 "TARGET_32BIT && TARGET_HARD_FLOAT"
kono
parents: 67
diff changeset
1297 "vmls%?.f32\\t%0, %2, %3"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1298 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1299 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1300 (set_attr "type" "fmacs")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1301 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1302
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1303 (define_insn "*fmuldf3negdfadddf_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1304 [(set (match_operand:DF 0 "s_register_operand" "=w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1305 (minus:DF (match_operand:DF 1 "s_register_operand" "0")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1306 (mult:DF (match_operand:DF 2 "s_register_operand" "w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1307 (match_operand:DF 3 "s_register_operand" "w"))))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1308 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
111
kono
parents: 67
diff changeset
1309 "vmls%?.f64\\t%P0, %P2, %P3"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1310 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1311 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1312 (set_attr "type" "fmacd")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1313 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1314
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1315
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1316 ;; 0 = -(1 * 2) - 0
111
kono
parents: 67
diff changeset
1317 (define_insn "*mulhf3neghfsubhf_vfp"
kono
parents: 67
diff changeset
1318 [(set (match_operand:HF 0 "s_register_operand" "=t")
kono
parents: 67
diff changeset
1319 (minus:HF (mult:HF
kono
parents: 67
diff changeset
1320 (neg:HF (match_operand:HF 2 "s_register_operand" "t"))
kono
parents: 67
diff changeset
1321 (match_operand:HF 3 "s_register_operand" "t"))
kono
parents: 67
diff changeset
1322 (match_operand:HF 1 "s_register_operand" "0")))]
kono
parents: 67
diff changeset
1323 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1324 "vnmla.f16\\t%0, %2, %3"
kono
parents: 67
diff changeset
1325 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
1326 (set_attr "type" "fmacs")]
kono
parents: 67
diff changeset
1327 )
kono
parents: 67
diff changeset
1328
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1329 (define_insn "*mulsf3negsfsubsf_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1330 [(set (match_operand:SF 0 "s_register_operand" "=t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1331 (minus:SF (mult:SF
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1332 (neg:SF (match_operand:SF 2 "s_register_operand" "t"))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1333 (match_operand:SF 3 "s_register_operand" "t"))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1334 (match_operand:SF 1 "s_register_operand" "0")))]
111
kono
parents: 67
diff changeset
1335 "TARGET_32BIT && TARGET_HARD_FLOAT"
kono
parents: 67
diff changeset
1336 "vnmla%?.f32\\t%0, %2, %3"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1337 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1338 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1339 (set_attr "type" "fmacs")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1340 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1341
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1342 (define_insn "*muldf3negdfsubdf_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1343 [(set (match_operand:DF 0 "s_register_operand" "=w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1344 (minus:DF (mult:DF
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1345 (neg:DF (match_operand:DF 2 "s_register_operand" "w"))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1346 (match_operand:DF 3 "s_register_operand" "w"))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1347 (match_operand:DF 1 "s_register_operand" "0")))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1348 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
111
kono
parents: 67
diff changeset
1349 "vnmla%?.f64\\t%P0, %P2, %P3"
kono
parents: 67
diff changeset
1350 [(set_attr "predicable" "yes")
kono
parents: 67
diff changeset
1351 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1352 (set_attr "type" "fmacd")]
kono
parents: 67
diff changeset
1353 )
kono
parents: 67
diff changeset
1354
kono
parents: 67
diff changeset
1355 ;; Fused-multiply-accumulate
kono
parents: 67
diff changeset
1356
kono
parents: 67
diff changeset
1357 (define_insn "fmahf4"
kono
parents: 67
diff changeset
1358 [(set (match_operand:HF 0 "register_operand" "=w")
kono
parents: 67
diff changeset
1359 (fma:HF
kono
parents: 67
diff changeset
1360 (match_operand:HF 1 "register_operand" "w")
kono
parents: 67
diff changeset
1361 (match_operand:HF 2 "register_operand" "w")
kono
parents: 67
diff changeset
1362 (match_operand:HF 3 "register_operand" "0")))]
kono
parents: 67
diff changeset
1363 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1364 "vfma.f16\\t%0, %1, %2"
kono
parents: 67
diff changeset
1365 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
1366 (set_attr "type" "ffmas")]
kono
parents: 67
diff changeset
1367 )
kono
parents: 67
diff changeset
1368
kono
parents: 67
diff changeset
1369 (define_expand "neon_vfmahf"
kono
parents: 67
diff changeset
1370 [(match_operand:HF 0 "s_register_operand")
kono
parents: 67
diff changeset
1371 (match_operand:HF 1 "s_register_operand")
kono
parents: 67
diff changeset
1372 (match_operand:HF 2 "s_register_operand")
kono
parents: 67
diff changeset
1373 (match_operand:HF 3 "s_register_operand")]
kono
parents: 67
diff changeset
1374 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1375 {
kono
parents: 67
diff changeset
1376 emit_insn (gen_fmahf4 (operands[0], operands[2], operands[3],
kono
parents: 67
diff changeset
1377 operands[1]));
kono
parents: 67
diff changeset
1378 DONE;
kono
parents: 67
diff changeset
1379 })
kono
parents: 67
diff changeset
1380
kono
parents: 67
diff changeset
1381 (define_insn "fma<SDF:mode>4"
kono
parents: 67
diff changeset
1382 [(set (match_operand:SDF 0 "register_operand" "=<F_constraint>")
kono
parents: 67
diff changeset
1383 (fma:SDF (match_operand:SDF 1 "register_operand" "<F_constraint>")
kono
parents: 67
diff changeset
1384 (match_operand:SDF 2 "register_operand" "<F_constraint>")
kono
parents: 67
diff changeset
1385 (match_operand:SDF 3 "register_operand" "0")))]
kono
parents: 67
diff changeset
1386 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_FMA"
kono
parents: 67
diff changeset
1387 "vfma%?.<V_if_elem>\\t%<V_reg>0, %<V_reg>1, %<V_reg>2"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1388 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1389 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1390 (set_attr "type" "ffma<vfp_type>")]
kono
parents: 67
diff changeset
1391 )
kono
parents: 67
diff changeset
1392
kono
parents: 67
diff changeset
1393 (define_insn "fmsubhf4_fp16"
kono
parents: 67
diff changeset
1394 [(set (match_operand:HF 0 "register_operand" "=w")
kono
parents: 67
diff changeset
1395 (fma:HF
kono
parents: 67
diff changeset
1396 (neg:HF (match_operand:HF 1 "register_operand" "w"))
kono
parents: 67
diff changeset
1397 (match_operand:HF 2 "register_operand" "w")
kono
parents: 67
diff changeset
1398 (match_operand:HF 3 "register_operand" "0")))]
kono
parents: 67
diff changeset
1399 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1400 "vfms.f16\\t%0, %1, %2"
kono
parents: 67
diff changeset
1401 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
1402 (set_attr "type" "ffmas")]
kono
parents: 67
diff changeset
1403 )
kono
parents: 67
diff changeset
1404
kono
parents: 67
diff changeset
1405 (define_expand "neon_vfmshf"
kono
parents: 67
diff changeset
1406 [(match_operand:HF 0 "s_register_operand")
kono
parents: 67
diff changeset
1407 (match_operand:HF 1 "s_register_operand")
kono
parents: 67
diff changeset
1408 (match_operand:HF 2 "s_register_operand")
kono
parents: 67
diff changeset
1409 (match_operand:HF 3 "s_register_operand")]
kono
parents: 67
diff changeset
1410 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1411 {
kono
parents: 67
diff changeset
1412 emit_insn (gen_fmsubhf4_fp16 (operands[0], operands[2], operands[3],
kono
parents: 67
diff changeset
1413 operands[1]));
kono
parents: 67
diff changeset
1414 DONE;
kono
parents: 67
diff changeset
1415 })
kono
parents: 67
diff changeset
1416
kono
parents: 67
diff changeset
1417 (define_insn "*fmsub<SDF:mode>4"
kono
parents: 67
diff changeset
1418 [(set (match_operand:SDF 0 "register_operand" "=<F_constraint>")
kono
parents: 67
diff changeset
1419 (fma:SDF (neg:SDF (match_operand:SDF 1 "register_operand"
kono
parents: 67
diff changeset
1420 "<F_constraint>"))
kono
parents: 67
diff changeset
1421 (match_operand:SDF 2 "register_operand" "<F_constraint>")
kono
parents: 67
diff changeset
1422 (match_operand:SDF 3 "register_operand" "0")))]
kono
parents: 67
diff changeset
1423 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_FMA"
kono
parents: 67
diff changeset
1424 "vfms%?.<V_if_elem>\\t%<V_reg>0, %<V_reg>1, %<V_reg>2"
kono
parents: 67
diff changeset
1425 [(set_attr "predicable" "yes")
kono
parents: 67
diff changeset
1426 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1427 (set_attr "type" "ffma<vfp_type>")]
kono
parents: 67
diff changeset
1428 )
kono
parents: 67
diff changeset
1429
kono
parents: 67
diff changeset
1430 (define_insn "*fnmsubhf4"
kono
parents: 67
diff changeset
1431 [(set (match_operand:HF 0 "register_operand" "=w")
kono
parents: 67
diff changeset
1432 (fma:HF (match_operand:HF 1 "register_operand" "w")
kono
parents: 67
diff changeset
1433 (match_operand:HF 2 "register_operand" "w")
kono
parents: 67
diff changeset
1434 (neg:HF (match_operand:HF 3 "register_operand" "0"))))]
kono
parents: 67
diff changeset
1435 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1436 "vfnms.f16\\t%0, %1, %2"
kono
parents: 67
diff changeset
1437 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
1438 (set_attr "type" "ffmas")]
kono
parents: 67
diff changeset
1439 )
kono
parents: 67
diff changeset
1440
kono
parents: 67
diff changeset
1441 (define_insn "*fnmsub<SDF:mode>4"
kono
parents: 67
diff changeset
1442 [(set (match_operand:SDF 0 "register_operand" "=<F_constraint>")
kono
parents: 67
diff changeset
1443 (fma:SDF (match_operand:SDF 1 "register_operand" "<F_constraint>")
kono
parents: 67
diff changeset
1444 (match_operand:SDF 2 "register_operand" "<F_constraint>")
kono
parents: 67
diff changeset
1445 (neg:SDF (match_operand:SDF 3 "register_operand" "0"))))]
kono
parents: 67
diff changeset
1446 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_FMA"
kono
parents: 67
diff changeset
1447 "vfnms%?.<V_if_elem>\\t%<V_reg>0, %<V_reg>1, %<V_reg>2"
kono
parents: 67
diff changeset
1448 [(set_attr "predicable" "yes")
kono
parents: 67
diff changeset
1449 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1450 (set_attr "type" "ffma<vfp_type>")]
kono
parents: 67
diff changeset
1451 )
kono
parents: 67
diff changeset
1452
kono
parents: 67
diff changeset
1453 (define_insn "*fnmaddhf4"
kono
parents: 67
diff changeset
1454 [(set (match_operand:HF 0 "register_operand" "=w")
kono
parents: 67
diff changeset
1455 (fma:HF (neg:HF (match_operand:HF 1 "register_operand" "w"))
kono
parents: 67
diff changeset
1456 (match_operand:HF 2 "register_operand" "w")
kono
parents: 67
diff changeset
1457 (neg:HF (match_operand:HF 3 "register_operand" "0"))))]
kono
parents: 67
diff changeset
1458 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1459 "vfnma.f16\\t%0, %1, %2"
kono
parents: 67
diff changeset
1460 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
1461 (set_attr "type" "ffmas")]
kono
parents: 67
diff changeset
1462 )
kono
parents: 67
diff changeset
1463
kono
parents: 67
diff changeset
1464 (define_insn "*fnmadd<SDF:mode>4"
kono
parents: 67
diff changeset
1465 [(set (match_operand:SDF 0 "register_operand" "=<F_constraint>")
kono
parents: 67
diff changeset
1466 (fma:SDF (neg:SDF (match_operand:SDF 1 "register_operand"
kono
parents: 67
diff changeset
1467 "<F_constraint>"))
kono
parents: 67
diff changeset
1468 (match_operand:SDF 2 "register_operand" "<F_constraint>")
kono
parents: 67
diff changeset
1469 (neg:SDF (match_operand:SDF 3 "register_operand" "0"))))]
kono
parents: 67
diff changeset
1470 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_FMA"
kono
parents: 67
diff changeset
1471 "vfnma%?.<V_if_elem>\\t%<V_reg>0, %<V_reg>1, %<V_reg>2"
kono
parents: 67
diff changeset
1472 [(set_attr "predicable" "yes")
kono
parents: 67
diff changeset
1473 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1474 (set_attr "type" "ffma<vfp_type>")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1475 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1476
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1477
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1478 ;; Conversion routines
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1479
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1480 (define_insn "*extendsfdf2_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1481 [(set (match_operand:DF 0 "s_register_operand" "=w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1482 (float_extend:DF (match_operand:SF 1 "s_register_operand" "t")))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1483 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
111
kono
parents: 67
diff changeset
1484 "vcvt%?.f64.f32\\t%P0, %1"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1485 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1486 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1487 (set_attr "type" "f_cvt")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1488 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1489
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1490 (define_insn "*truncdfsf2_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1491 [(set (match_operand:SF 0 "s_register_operand" "=t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1492 (float_truncate:SF (match_operand:DF 1 "s_register_operand" "w")))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1493 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
111
kono
parents: 67
diff changeset
1494 "vcvt%?.f32.f64\\t%0, %P1"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1495 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1496 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1497 (set_attr "type" "f_cvt")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1498 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1499
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1500 (define_insn "extendhfsf2"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1501 [(set (match_operand:SF 0 "s_register_operand" "=t")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1502 (float_extend:SF (match_operand:HF 1 "s_register_operand" "t")))]
111
kono
parents: 67
diff changeset
1503 "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FP16 || TARGET_VFP_FP16INST)"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1504 "vcvtb%?.f32.f16\\t%0, %1"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1505 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1506 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1507 (set_attr "type" "f_cvt")]
kono
parents: 67
diff changeset
1508 )
kono
parents: 67
diff changeset
1509
kono
parents: 67
diff changeset
1510 (define_insn "*truncdfhf2"
kono
parents: 67
diff changeset
1511 [(set (match_operand:HF 0 "s_register_operand" "=t")
kono
parents: 67
diff changeset
1512 (float_truncate:HF (match_operand:DF 1 "s_register_operand" "w")))]
kono
parents: 67
diff changeset
1513 "TARGET_32BIT && TARGET_FP16_TO_DOUBLE"
kono
parents: 67
diff changeset
1514 "vcvtb%?.f16.f64\\t%0, %P1"
kono
parents: 67
diff changeset
1515 [(set_attr "predicable" "yes")
kono
parents: 67
diff changeset
1516 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1517 (set_attr "type" "f_cvt")]
kono
parents: 67
diff changeset
1518 )
kono
parents: 67
diff changeset
1519
kono
parents: 67
diff changeset
1520 (define_insn "*extendhfdf2"
kono
parents: 67
diff changeset
1521 [(set (match_operand:DF 0 "s_register_operand" "=w")
kono
parents: 67
diff changeset
1522 (float_extend:DF (match_operand:HF 1 "s_register_operand" "t")))]
kono
parents: 67
diff changeset
1523 "TARGET_32BIT && TARGET_FP16_TO_DOUBLE"
kono
parents: 67
diff changeset
1524 "vcvtb%?.f64.f16\\t%P0, %1"
kono
parents: 67
diff changeset
1525 [(set_attr "predicable" "yes")
kono
parents: 67
diff changeset
1526 (set_attr "predicable_short_it" "no")
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1527 (set_attr "type" "f_cvt")]
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1528 )
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1529
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1530 (define_insn "truncsfhf2"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1531 [(set (match_operand:HF 0 "s_register_operand" "=t")
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1532 (float_truncate:HF (match_operand:SF 1 "s_register_operand" "t")))]
111
kono
parents: 67
diff changeset
1533 "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FP16 || TARGET_VFP_FP16INST)"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1534 "vcvtb%?.f16.f32\\t%0, %1"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1535 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1536 (set_attr "predicable_short_it" "no")
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1537 (set_attr "type" "f_cvt")]
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1538 )
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1539
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1540 (define_insn "*truncsisf2_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1541 [(set (match_operand:SI 0 "s_register_operand" "=t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1542 (fix:SI (fix:SF (match_operand:SF 1 "s_register_operand" "t"))))]
111
kono
parents: 67
diff changeset
1543 "TARGET_32BIT && TARGET_HARD_FLOAT"
kono
parents: 67
diff changeset
1544 "vcvt%?.s32.f32\\t%0, %1"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1545 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1546 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1547 (set_attr "type" "f_cvtf2i")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1548 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1549
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1550 (define_insn "*truncsidf2_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1551 [(set (match_operand:SI 0 "s_register_operand" "=t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1552 (fix:SI (fix:DF (match_operand:DF 1 "s_register_operand" "w"))))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1553 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
111
kono
parents: 67
diff changeset
1554 "vcvt%?.s32.f64\\t%0, %P1"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1555 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1556 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1557 (set_attr "type" "f_cvtf2i")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1558 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1559
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1560
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1561 (define_insn "fixuns_truncsfsi2"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1562 [(set (match_operand:SI 0 "s_register_operand" "=t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1563 (unsigned_fix:SI (fix:SF (match_operand:SF 1 "s_register_operand" "t"))))]
111
kono
parents: 67
diff changeset
1564 "TARGET_32BIT && TARGET_HARD_FLOAT"
kono
parents: 67
diff changeset
1565 "vcvt%?.u32.f32\\t%0, %1"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1566 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1567 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1568 (set_attr "type" "f_cvtf2i")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1569 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1570
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1571 (define_insn "fixuns_truncdfsi2"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1572 [(set (match_operand:SI 0 "s_register_operand" "=t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1573 (unsigned_fix:SI (fix:DF (match_operand:DF 1 "s_register_operand" "t"))))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1574 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
111
kono
parents: 67
diff changeset
1575 "vcvt%?.u32.f64\\t%0, %P1"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1576 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1577 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1578 (set_attr "type" "f_cvtf2i")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1579 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1580
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1581
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1582 (define_insn "*floatsisf2_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1583 [(set (match_operand:SF 0 "s_register_operand" "=t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1584 (float:SF (match_operand:SI 1 "s_register_operand" "t")))]
111
kono
parents: 67
diff changeset
1585 "TARGET_32BIT && TARGET_HARD_FLOAT"
kono
parents: 67
diff changeset
1586 "vcvt%?.f32.s32\\t%0, %1"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1587 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1588 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1589 (set_attr "type" "f_cvti2f")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1590 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1591
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1592 (define_insn "*floatsidf2_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1593 [(set (match_operand:DF 0 "s_register_operand" "=w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1594 (float:DF (match_operand:SI 1 "s_register_operand" "t")))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1595 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
111
kono
parents: 67
diff changeset
1596 "vcvt%?.f64.s32\\t%P0, %1"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1597 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1598 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1599 (set_attr "type" "f_cvti2f")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1600 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1601
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1602
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1603 (define_insn "floatunssisf2"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1604 [(set (match_operand:SF 0 "s_register_operand" "=t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1605 (unsigned_float:SF (match_operand:SI 1 "s_register_operand" "t")))]
111
kono
parents: 67
diff changeset
1606 "TARGET_32BIT && TARGET_HARD_FLOAT"
kono
parents: 67
diff changeset
1607 "vcvt%?.f32.u32\\t%0, %1"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1608 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1609 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1610 (set_attr "type" "f_cvti2f")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1611 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1612
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1613 (define_insn "floatunssidf2"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1614 [(set (match_operand:DF 0 "s_register_operand" "=w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1615 (unsigned_float:DF (match_operand:SI 1 "s_register_operand" "t")))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1616 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
111
kono
parents: 67
diff changeset
1617 "vcvt%?.f64.u32\\t%P0, %1"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1618 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1619 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1620 (set_attr "type" "f_cvti2f")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1621 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1622
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1623
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1624 ;; Sqrt insns.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1625
111
kono
parents: 67
diff changeset
1626 (define_insn "neon_vsqrthf"
kono
parents: 67
diff changeset
1627 [(set (match_operand:HF 0 "s_register_operand" "=w")
kono
parents: 67
diff changeset
1628 (sqrt:HF (match_operand:HF 1 "s_register_operand" "w")))]
kono
parents: 67
diff changeset
1629 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1630 "vsqrt.f16\t%0, %1"
kono
parents: 67
diff changeset
1631 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
1632 (set_attr "type" "fsqrts")]
kono
parents: 67
diff changeset
1633 )
kono
parents: 67
diff changeset
1634
kono
parents: 67
diff changeset
1635 (define_insn "neon_vrsqrtshf"
kono
parents: 67
diff changeset
1636 [(set
kono
parents: 67
diff changeset
1637 (match_operand:HF 0 "s_register_operand" "=w")
kono
parents: 67
diff changeset
1638 (unspec:HF [(match_operand:HF 1 "s_register_operand" "w")
kono
parents: 67
diff changeset
1639 (match_operand:HF 2 "s_register_operand" "w")]
kono
parents: 67
diff changeset
1640 UNSPEC_VRSQRTS))]
kono
parents: 67
diff changeset
1641 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1642 "vrsqrts.f16\t%0, %1, %2"
kono
parents: 67
diff changeset
1643 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
1644 (set_attr "type" "fsqrts")]
kono
parents: 67
diff changeset
1645 )
kono
parents: 67
diff changeset
1646
kono
parents: 67
diff changeset
1647 ; VFP9 Erratum 760019: It's potentially unsafe to overwrite the input
kono
parents: 67
diff changeset
1648 ; operands, so mark the output as early clobber for VFPv2 on ARMv5 or
kono
parents: 67
diff changeset
1649 ; earlier.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1650 (define_insn "*sqrtsf2_vfp"
111
kono
parents: 67
diff changeset
1651 [(set (match_operand:SF 0 "s_register_operand" "=&t,t")
kono
parents: 67
diff changeset
1652 (sqrt:SF (match_operand:SF 1 "s_register_operand" "t,t")))]
kono
parents: 67
diff changeset
1653 "TARGET_32BIT && TARGET_HARD_FLOAT"
kono
parents: 67
diff changeset
1654 "vsqrt%?.f32\\t%0, %1"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1655 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1656 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1657 (set_attr "arch" "*,armv6_or_vfpv3")
kono
parents: 67
diff changeset
1658 (set_attr "type" "fsqrts")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1659 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1660
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1661 (define_insn "*sqrtdf2_vfp"
111
kono
parents: 67
diff changeset
1662 [(set (match_operand:DF 0 "s_register_operand" "=&w,w")
kono
parents: 67
diff changeset
1663 (sqrt:DF (match_operand:DF 1 "s_register_operand" "w,w")))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1664 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
111
kono
parents: 67
diff changeset
1665 "vsqrt%?.f64\\t%P0, %P1"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1666 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1667 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1668 (set_attr "arch" "*,armv6_or_vfpv3")
kono
parents: 67
diff changeset
1669 (set_attr "type" "fsqrtd")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1670 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1671
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1672
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1673 ;; Patterns to split/copy vfp condition flags.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1674
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1675 (define_insn "*movcc_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1676 [(set (reg CC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1677 (reg VFPCC_REGNUM))]
111
kono
parents: 67
diff changeset
1678 "TARGET_32BIT && TARGET_HARD_FLOAT"
kono
parents: 67
diff changeset
1679 "vmrs%?\\tAPSR_nzcv, FPSCR"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1680 [(set_attr "conds" "set")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1681 (set_attr "type" "f_flag")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1682 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1683
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1684 (define_insn_and_split "*cmpsf_split_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1685 [(set (reg:CCFP CC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1686 (compare:CCFP (match_operand:SF 0 "s_register_operand" "t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1687 (match_operand:SF 1 "vfp_compare_operand" "tG")))]
111
kono
parents: 67
diff changeset
1688 "TARGET_32BIT && TARGET_HARD_FLOAT"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1689 "#"
111
kono
parents: 67
diff changeset
1690 "TARGET_32BIT && TARGET_HARD_FLOAT"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1691 [(set (reg:CCFP VFPCC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1692 (compare:CCFP (match_dup 0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1693 (match_dup 1)))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1694 (set (reg:CCFP CC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1695 (reg:CCFP VFPCC_REGNUM))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1696 ""
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1697 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1698
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1699 (define_insn_and_split "*cmpsf_trap_split_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1700 [(set (reg:CCFPE CC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1701 (compare:CCFPE (match_operand:SF 0 "s_register_operand" "t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1702 (match_operand:SF 1 "vfp_compare_operand" "tG")))]
111
kono
parents: 67
diff changeset
1703 "TARGET_32BIT && TARGET_HARD_FLOAT"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1704 "#"
111
kono
parents: 67
diff changeset
1705 "TARGET_32BIT && TARGET_HARD_FLOAT"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1706 [(set (reg:CCFPE VFPCC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1707 (compare:CCFPE (match_dup 0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1708 (match_dup 1)))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1709 (set (reg:CCFPE CC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1710 (reg:CCFPE VFPCC_REGNUM))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1711 ""
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1712 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1713
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1714 (define_insn_and_split "*cmpdf_split_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1715 [(set (reg:CCFP CC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1716 (compare:CCFP (match_operand:DF 0 "s_register_operand" "w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1717 (match_operand:DF 1 "vfp_compare_operand" "wG")))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1718 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1719 "#"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1720 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1721 [(set (reg:CCFP VFPCC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1722 (compare:CCFP (match_dup 0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1723 (match_dup 1)))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1724 (set (reg:CCFP CC_REGNUM)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1725 (reg:CCFP VFPCC_REGNUM))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1726 ""
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1727 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1728
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1729 (define_insn_and_split "*cmpdf_trap_split_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1730 [(set (reg:CCFPE CC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1731 (compare:CCFPE (match_operand:DF 0 "s_register_operand" "w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1732 (match_operand:DF 1 "vfp_compare_operand" "wG")))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1733 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1734 "#"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1735 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1736 [(set (reg:CCFPE VFPCC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1737 (compare:CCFPE (match_dup 0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1738 (match_dup 1)))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1739 (set (reg:CCFPE CC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1740 (reg:CCFPE VFPCC_REGNUM))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1741 ""
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1742 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1743
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1744
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1745 ;; Comparison patterns
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1746
111
kono
parents: 67
diff changeset
1747 ;; In the compare with FP zero case the ARM Architecture Reference Manual
kono
parents: 67
diff changeset
1748 ;; specifies the immediate to be #0.0. However, some buggy assemblers only
kono
parents: 67
diff changeset
1749 ;; accept #0. We don't want to autodetect broken assemblers, so output #0.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1750 (define_insn "*cmpsf_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1751 [(set (reg:CCFP VFPCC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1752 (compare:CCFP (match_operand:SF 0 "s_register_operand" "t,t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1753 (match_operand:SF 1 "vfp_compare_operand" "t,G")))]
111
kono
parents: 67
diff changeset
1754 "TARGET_32BIT && TARGET_HARD_FLOAT"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1755 "@
111
kono
parents: 67
diff changeset
1756 vcmp%?.f32\\t%0, %1
kono
parents: 67
diff changeset
1757 vcmp%?.f32\\t%0, #0"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1758 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1759 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1760 (set_attr "type" "fcmps")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1761 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1762
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1763 (define_insn "*cmpsf_trap_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1764 [(set (reg:CCFPE VFPCC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1765 (compare:CCFPE (match_operand:SF 0 "s_register_operand" "t,t")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1766 (match_operand:SF 1 "vfp_compare_operand" "t,G")))]
111
kono
parents: 67
diff changeset
1767 "TARGET_32BIT && TARGET_HARD_FLOAT"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1768 "@
111
kono
parents: 67
diff changeset
1769 vcmpe%?.f32\\t%0, %1
kono
parents: 67
diff changeset
1770 vcmpe%?.f32\\t%0, #0"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1771 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1772 (set_attr "predicable_short_it" "no")
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1773 (set_attr "type" "fcmps")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1774 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1775
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1776 (define_insn "*cmpdf_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1777 [(set (reg:CCFP VFPCC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1778 (compare:CCFP (match_operand:DF 0 "s_register_operand" "w,w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1779 (match_operand:DF 1 "vfp_compare_operand" "w,G")))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1780 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1781 "@
111
kono
parents: 67
diff changeset
1782 vcmp%?.f64\\t%P0, %P1
kono
parents: 67
diff changeset
1783 vcmp%?.f64\\t%P0, #0"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1784 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1785 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1786 (set_attr "type" "fcmpd")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1787 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1788
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1789 (define_insn "*cmpdf_trap_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1790 [(set (reg:CCFPE VFPCC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1791 (compare:CCFPE (match_operand:DF 0 "s_register_operand" "w,w")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1792 (match_operand:DF 1 "vfp_compare_operand" "w,G")))]
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1793 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1794 "@
111
kono
parents: 67
diff changeset
1795 vcmpe%?.f64\\t%P0, %P1
kono
parents: 67
diff changeset
1796 vcmpe%?.f64\\t%P0, #0"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1797 [(set_attr "predicable" "yes")
111
kono
parents: 67
diff changeset
1798 (set_attr "predicable_short_it" "no")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1799 (set_attr "type" "fcmpd")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1800 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1801
111
kono
parents: 67
diff changeset
1802 ;; Fixed point to floating point conversions.
kono
parents: 67
diff changeset
1803 (define_insn "*combine_vcvt_f32_<FCVTI32typename>"
kono
parents: 67
diff changeset
1804 [(set (match_operand:SF 0 "s_register_operand" "=t")
kono
parents: 67
diff changeset
1805 (mult:SF (FCVT:SF (match_operand:SI 1 "s_register_operand" "0"))
kono
parents: 67
diff changeset
1806 (match_operand 2
kono
parents: 67
diff changeset
1807 "const_double_vcvt_power_of_two_reciprocal" "Dt")))]
kono
parents: 67
diff changeset
1808 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP3 && !flag_rounding_math"
kono
parents: 67
diff changeset
1809 "vcvt%?.f32.<FCVTI32typename>\\t%0, %1, %v2"
kono
parents: 67
diff changeset
1810 [(set_attr "predicable" "yes")
kono
parents: 67
diff changeset
1811 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1812 (set_attr "type" "f_cvti2f")]
kono
parents: 67
diff changeset
1813 )
kono
parents: 67
diff changeset
1814
kono
parents: 67
diff changeset
1815 ;; Not the ideal way of implementing this. Ideally we would be able to split
kono
parents: 67
diff changeset
1816 ;; this into a move to a DP register and then a vcvt.f64.i32
kono
parents: 67
diff changeset
1817 (define_insn "*combine_vcvt_f64_<FCVTI32typename>"
kono
parents: 67
diff changeset
1818 [(set (match_operand:DF 0 "s_register_operand" "=x,x,w")
kono
parents: 67
diff changeset
1819 (mult:DF (FCVT:DF (match_operand:SI 1 "s_register_operand" "r,t,r"))
kono
parents: 67
diff changeset
1820 (match_operand 2
kono
parents: 67
diff changeset
1821 "const_double_vcvt_power_of_two_reciprocal" "Dt,Dt,Dt")))]
kono
parents: 67
diff changeset
1822 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP3 && !flag_rounding_math
kono
parents: 67
diff changeset
1823 && !TARGET_VFP_SINGLE"
kono
parents: 67
diff changeset
1824 "@
kono
parents: 67
diff changeset
1825 vmov%?.f32\\t%0, %1\;vcvt%?.f64.<FCVTI32typename>\\t%P0, %P0, %v2
kono
parents: 67
diff changeset
1826 vmov%?.f32\\t%0, %1\;vcvt%?.f64.<FCVTI32typename>\\t%P0, %P0, %v2
kono
parents: 67
diff changeset
1827 vmov%?.f64\\t%P0, %1, %1\;vcvt%?.f64.<FCVTI32typename>\\t%P0, %P0, %v2"
kono
parents: 67
diff changeset
1828 [(set_attr "predicable" "yes")
kono
parents: 67
diff changeset
1829 (set_attr "ce_count" "2")
kono
parents: 67
diff changeset
1830 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1831 (set_attr "type" "f_cvti2f")
kono
parents: 67
diff changeset
1832 (set_attr "length" "8")]
kono
parents: 67
diff changeset
1833 )
kono
parents: 67
diff changeset
1834
kono
parents: 67
diff changeset
1835 (define_insn "*combine_vcvtf2i"
kono
parents: 67
diff changeset
1836 [(set (match_operand:SI 0 "s_register_operand" "=t")
kono
parents: 67
diff changeset
1837 (fix:SI (fix:SF (mult:SF (match_operand:SF 1 "s_register_operand" "0")
kono
parents: 67
diff changeset
1838 (match_operand 2
kono
parents: 67
diff changeset
1839 "const_double_vcvt_power_of_two" "Dp")))))]
kono
parents: 67
diff changeset
1840 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP3 && !flag_rounding_math"
kono
parents: 67
diff changeset
1841 "vcvt%?.s32.f32\\t%0, %1, %v2"
kono
parents: 67
diff changeset
1842 [(set_attr "predicable" "yes")
kono
parents: 67
diff changeset
1843 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1844 (set_attr "type" "f_cvtf2i")]
kono
parents: 67
diff changeset
1845 )
kono
parents: 67
diff changeset
1846
kono
parents: 67
diff changeset
1847 ;; FP16 conversions.
kono
parents: 67
diff changeset
1848 (define_insn "neon_vcvth<sup>hf"
kono
parents: 67
diff changeset
1849 [(set (match_operand:HF 0 "s_register_operand" "=w")
kono
parents: 67
diff changeset
1850 (unspec:HF
kono
parents: 67
diff changeset
1851 [(match_operand:SI 1 "s_register_operand" "w")]
kono
parents: 67
diff changeset
1852 VCVTH_US))]
kono
parents: 67
diff changeset
1853 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1854 "vcvt.f16.<sup>%#32\t%0, %1"
kono
parents: 67
diff changeset
1855 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
1856 (set_attr "type" "f_cvti2f")]
kono
parents: 67
diff changeset
1857 )
kono
parents: 67
diff changeset
1858
kono
parents: 67
diff changeset
1859 (define_insn "neon_vcvth<sup>si"
kono
parents: 67
diff changeset
1860 [(set (match_operand:SI 0 "s_register_operand" "=w")
kono
parents: 67
diff changeset
1861 (unspec:SI
kono
parents: 67
diff changeset
1862 [(match_operand:HF 1 "s_register_operand" "w")]
kono
parents: 67
diff changeset
1863 VCVTH_US))]
kono
parents: 67
diff changeset
1864 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1865 "vcvt.<sup>%#32.f16\t%0, %1"
kono
parents: 67
diff changeset
1866 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
1867 (set_attr "type" "f_cvtf2i")]
kono
parents: 67
diff changeset
1868 )
kono
parents: 67
diff changeset
1869
kono
parents: 67
diff changeset
1870 ;; The neon_vcvth<sup>_nhf patterns are used to generate the instruction for the
kono
parents: 67
diff changeset
1871 ;; vcvth_n_f16_<sup>32 arm_fp16 intrinsics. They are complicated by the
kono
parents: 67
diff changeset
1872 ;; hardware requirement that the source and destination registers are the same
kono
parents: 67
diff changeset
1873 ;; despite having different machine modes. The approach is to use a temporary
kono
parents: 67
diff changeset
1874 ;; register for the conversion and move that to the correct destination.
kono
parents: 67
diff changeset
1875
kono
parents: 67
diff changeset
1876 ;; Generate an unspec pattern for the intrinsic.
kono
parents: 67
diff changeset
1877 (define_insn "neon_vcvth<sup>_nhf_unspec"
kono
parents: 67
diff changeset
1878 [(set
kono
parents: 67
diff changeset
1879 (match_operand:SI 0 "s_register_operand" "=w")
kono
parents: 67
diff changeset
1880 (unspec:SI
kono
parents: 67
diff changeset
1881 [(match_operand:SI 1 "s_register_operand" "0")
kono
parents: 67
diff changeset
1882 (match_operand:SI 2 "immediate_operand" "i")]
kono
parents: 67
diff changeset
1883 VCVT_HF_US_N))
kono
parents: 67
diff changeset
1884 (set
kono
parents: 67
diff changeset
1885 (match_operand:HF 3 "s_register_operand" "=w")
kono
parents: 67
diff changeset
1886 (float_truncate:HF (float:SF (match_dup 0))))]
kono
parents: 67
diff changeset
1887 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1888 {
kono
parents: 67
diff changeset
1889 arm_const_bounds (operands[2], 1, 33);
kono
parents: 67
diff changeset
1890 return "vcvt.f16.<sup>32\t%0, %0, %2\;vmov.f32\t%3, %0";
kono
parents: 67
diff changeset
1891 }
kono
parents: 67
diff changeset
1892 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
1893 (set_attr "type" "f_cvti2f")]
kono
parents: 67
diff changeset
1894 )
kono
parents: 67
diff changeset
1895
kono
parents: 67
diff changeset
1896 ;; Generate the instruction patterns needed for vcvth_n_f16_s32 neon intrinsics.
kono
parents: 67
diff changeset
1897 (define_expand "neon_vcvth<sup>_nhf"
kono
parents: 67
diff changeset
1898 [(match_operand:HF 0 "s_register_operand")
kono
parents: 67
diff changeset
1899 (unspec:HF [(match_operand:SI 1 "s_register_operand")
kono
parents: 67
diff changeset
1900 (match_operand:SI 2 "immediate_operand")]
kono
parents: 67
diff changeset
1901 VCVT_HF_US_N)]
kono
parents: 67
diff changeset
1902 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1903 {
kono
parents: 67
diff changeset
1904 rtx op1 = gen_reg_rtx (SImode);
kono
parents: 67
diff changeset
1905
kono
parents: 67
diff changeset
1906 arm_const_bounds (operands[2], 1, 33);
kono
parents: 67
diff changeset
1907
kono
parents: 67
diff changeset
1908 emit_move_insn (op1, operands[1]);
kono
parents: 67
diff changeset
1909 emit_insn (gen_neon_vcvth<sup>_nhf_unspec (op1, op1, operands[2],
kono
parents: 67
diff changeset
1910 operands[0]));
kono
parents: 67
diff changeset
1911 DONE;
kono
parents: 67
diff changeset
1912 })
kono
parents: 67
diff changeset
1913
kono
parents: 67
diff changeset
1914 ;; The neon_vcvth<sup>_nsi patterns are used to generate the instruction for the
kono
parents: 67
diff changeset
1915 ;; vcvth_n_<sup>32_f16 arm_fp16 intrinsics. They have the same restrictions and
kono
parents: 67
diff changeset
1916 ;; are implemented in the same way as the neon_vcvth<sup>_nhf patterns.
kono
parents: 67
diff changeset
1917
kono
parents: 67
diff changeset
1918 ;; Generate an unspec pattern, constraining the registers.
kono
parents: 67
diff changeset
1919 (define_insn "neon_vcvth<sup>_nsi_unspec"
kono
parents: 67
diff changeset
1920 [(set (match_operand:SI 0 "s_register_operand" "=w")
kono
parents: 67
diff changeset
1921 (unspec:SI
kono
parents: 67
diff changeset
1922 [(fix:SI
kono
parents: 67
diff changeset
1923 (fix:SF
kono
parents: 67
diff changeset
1924 (float_extend:SF
kono
parents: 67
diff changeset
1925 (match_operand:HF 1 "s_register_operand" "w"))))
kono
parents: 67
diff changeset
1926 (match_operand:SI 2 "immediate_operand" "i")]
kono
parents: 67
diff changeset
1927 VCVT_SI_US_N))]
kono
parents: 67
diff changeset
1928 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1929 {
kono
parents: 67
diff changeset
1930 arm_const_bounds (operands[2], 1, 33);
kono
parents: 67
diff changeset
1931 return "vmov.f32\t%0, %1\;vcvt.<sup>%#32.f16\t%0, %0, %2";
kono
parents: 67
diff changeset
1932 }
kono
parents: 67
diff changeset
1933 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
1934 (set_attr "type" "f_cvtf2i")]
kono
parents: 67
diff changeset
1935 )
kono
parents: 67
diff changeset
1936
kono
parents: 67
diff changeset
1937 ;; Generate the instruction patterns needed for vcvth_n_f16_s32 neon intrinsics.
kono
parents: 67
diff changeset
1938 (define_expand "neon_vcvth<sup>_nsi"
kono
parents: 67
diff changeset
1939 [(match_operand:SI 0 "s_register_operand")
kono
parents: 67
diff changeset
1940 (unspec:SI
kono
parents: 67
diff changeset
1941 [(match_operand:HF 1 "s_register_operand")
kono
parents: 67
diff changeset
1942 (match_operand:SI 2 "immediate_operand")]
kono
parents: 67
diff changeset
1943 VCVT_SI_US_N)]
kono
parents: 67
diff changeset
1944 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1945 {
kono
parents: 67
diff changeset
1946 rtx op1 = gen_reg_rtx (SImode);
kono
parents: 67
diff changeset
1947
kono
parents: 67
diff changeset
1948 arm_const_bounds (operands[2], 1, 33);
kono
parents: 67
diff changeset
1949 emit_insn (gen_neon_vcvth<sup>_nsi_unspec (op1, operands[1], operands[2]));
kono
parents: 67
diff changeset
1950 emit_move_insn (operands[0], op1);
kono
parents: 67
diff changeset
1951 DONE;
kono
parents: 67
diff changeset
1952 })
kono
parents: 67
diff changeset
1953
kono
parents: 67
diff changeset
1954 (define_insn "neon_vcvt<vcvth_op>h<sup>si"
kono
parents: 67
diff changeset
1955 [(set
kono
parents: 67
diff changeset
1956 (match_operand:SI 0 "s_register_operand" "=w")
kono
parents: 67
diff changeset
1957 (unspec:SI
kono
parents: 67
diff changeset
1958 [(match_operand:HF 1 "s_register_operand" "w")]
kono
parents: 67
diff changeset
1959 VCVT_HF_US))]
kono
parents: 67
diff changeset
1960 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
1961 "vcvt<vcvth_op>.<sup>%#32.f16\t%0, %1"
kono
parents: 67
diff changeset
1962 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
1963 (set_attr "type" "f_cvtf2i")]
kono
parents: 67
diff changeset
1964 )
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1965
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1966 ;; Store multiple insn used in function prologue.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1967 (define_insn "*push_multi_vfp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1968 [(match_parallel 2 "multi_register_push"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1969 [(set (match_operand:BLK 0 "memory_operand" "=m")
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1970 (unspec:BLK [(match_operand:DF 1 "vfp_register_operand" "")]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1971 UNSPEC_PUSH_MULT))])]
111
kono
parents: 67
diff changeset
1972 "TARGET_32BIT && TARGET_HARD_FLOAT"
kono
parents: 67
diff changeset
1973 "* return vfp_output_vstmd (operands);"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1974 [(set_attr "type" "f_stored")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1975 )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1976
111
kono
parents: 67
diff changeset
1977 ;; VRINT round to integral instructions.
kono
parents: 67
diff changeset
1978 ;; Invoked for the patterns: btruncsf2, btruncdf2, ceilsf2, ceildf2,
kono
parents: 67
diff changeset
1979 ;; roundsf2, rounddf2, floorsf2, floordf2, nearbyintsf2, nearbyintdf2,
kono
parents: 67
diff changeset
1980 ;; rintsf2, rintdf2.
kono
parents: 67
diff changeset
1981 (define_insn "<vrint_pattern><SDF:mode>2"
kono
parents: 67
diff changeset
1982 [(set (match_operand:SDF 0 "register_operand" "=<F_constraint>")
kono
parents: 67
diff changeset
1983 (unspec:SDF [(match_operand:SDF 1
kono
parents: 67
diff changeset
1984 "register_operand" "<F_constraint>")]
kono
parents: 67
diff changeset
1985 VRINT))]
kono
parents: 67
diff changeset
1986 "TARGET_HARD_FLOAT && TARGET_VFP5 <vfp_double_cond>"
kono
parents: 67
diff changeset
1987 "vrint<vrint_variant>%?.<V_if_elem>\\t%<V_reg>0, %<V_reg>1"
kono
parents: 67
diff changeset
1988 [(set_attr "predicable" "<vrint_predicable>")
kono
parents: 67
diff changeset
1989 (set_attr "predicable_short_it" "no")
kono
parents: 67
diff changeset
1990 (set_attr "type" "f_rint<vfp_type>")
kono
parents: 67
diff changeset
1991 (set_attr "conds" "<vrint_conds>")]
kono
parents: 67
diff changeset
1992 )
kono
parents: 67
diff changeset
1993
kono
parents: 67
diff changeset
1994 ;; Implements the lround, lfloor and lceil optabs.
kono
parents: 67
diff changeset
1995 (define_insn "l<vrint_pattern><su_optab><mode>si2"
kono
parents: 67
diff changeset
1996 [(set (match_operand:SI 0 "register_operand" "=t")
kono
parents: 67
diff changeset
1997 (FIXUORS:SI (unspec:SDF
kono
parents: 67
diff changeset
1998 [(match_operand:SDF 1
kono
parents: 67
diff changeset
1999 "register_operand" "<F_constraint>")] VCVT)))]
kono
parents: 67
diff changeset
2000 "TARGET_HARD_FLOAT && TARGET_VFP5 <vfp_double_cond>"
kono
parents: 67
diff changeset
2001 "vcvt<vrint_variant>.<su>32.<V_if_elem>\\t%0, %<V_reg>1"
kono
parents: 67
diff changeset
2002 [(set_attr "predicable" "no")
kono
parents: 67
diff changeset
2003 (set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
2004 (set_attr "type" "f_cvtf2i")]
kono
parents: 67
diff changeset
2005 )
kono
parents: 67
diff changeset
2006
kono
parents: 67
diff changeset
2007 ;; MIN_EXPR and MAX_EXPR eventually map to 'smin' and 'smax' in RTL.
kono
parents: 67
diff changeset
2008 ;; The 'smax' and 'smin' RTL standard pattern names do not specify which
kono
parents: 67
diff changeset
2009 ;; operand will be returned when both operands are zero (i.e. they may not
kono
parents: 67
diff changeset
2010 ;; honour signed zeroes), or when either operand is NaN. Therefore GCC
kono
parents: 67
diff changeset
2011 ;; only introduces MIN_EXPR/MAX_EXPR in fast math mode or when not honouring
kono
parents: 67
diff changeset
2012 ;; NaNs.
kono
parents: 67
diff changeset
2013
kono
parents: 67
diff changeset
2014 (define_insn "smax<mode>3"
kono
parents: 67
diff changeset
2015 [(set (match_operand:SDF 0 "register_operand" "=<F_constraint>")
kono
parents: 67
diff changeset
2016 (smax:SDF (match_operand:SDF 1 "register_operand" "<F_constraint>")
kono
parents: 67
diff changeset
2017 (match_operand:SDF 2 "register_operand" "<F_constraint>")))]
kono
parents: 67
diff changeset
2018 "TARGET_HARD_FLOAT && TARGET_VFP5 <vfp_double_cond>"
kono
parents: 67
diff changeset
2019 "vmaxnm.<V_if_elem>\\t%<V_reg>0, %<V_reg>1, %<V_reg>2"
kono
parents: 67
diff changeset
2020 [(set_attr "type" "f_minmax<vfp_type>")
kono
parents: 67
diff changeset
2021 (set_attr "conds" "unconditional")]
kono
parents: 67
diff changeset
2022 )
kono
parents: 67
diff changeset
2023
kono
parents: 67
diff changeset
2024 (define_insn "smin<mode>3"
kono
parents: 67
diff changeset
2025 [(set (match_operand:SDF 0 "register_operand" "=<F_constraint>")
kono
parents: 67
diff changeset
2026 (smin:SDF (match_operand:SDF 1 "register_operand" "<F_constraint>")
kono
parents: 67
diff changeset
2027 (match_operand:SDF 2 "register_operand" "<F_constraint>")))]
kono
parents: 67
diff changeset
2028 "TARGET_HARD_FLOAT && TARGET_VFP5 <vfp_double_cond>"
kono
parents: 67
diff changeset
2029 "vminnm.<V_if_elem>\\t%<V_reg>0, %<V_reg>1, %<V_reg>2"
kono
parents: 67
diff changeset
2030 [(set_attr "type" "f_minmax<vfp_type>")
kono
parents: 67
diff changeset
2031 (set_attr "conds" "unconditional")]
kono
parents: 67
diff changeset
2032 )
kono
parents: 67
diff changeset
2033
kono
parents: 67
diff changeset
2034 ;; Scalar forms for the IEEE-754 fmax()/fmin() functions
kono
parents: 67
diff changeset
2035
kono
parents: 67
diff changeset
2036 (define_insn "neon_<fmaxmin_op>hf"
kono
parents: 67
diff changeset
2037 [(set
kono
parents: 67
diff changeset
2038 (match_operand:HF 0 "s_register_operand" "=w")
kono
parents: 67
diff changeset
2039 (unspec:HF
kono
parents: 67
diff changeset
2040 [(match_operand:HF 1 "s_register_operand" "w")
kono
parents: 67
diff changeset
2041 (match_operand:HF 2 "s_register_operand" "w")]
kono
parents: 67
diff changeset
2042 VMAXMINFNM))]
kono
parents: 67
diff changeset
2043 "TARGET_VFP_FP16INST"
kono
parents: 67
diff changeset
2044 "<fmaxmin_op>.f16\t%0, %1, %2"
kono
parents: 67
diff changeset
2045 [(set_attr "conds" "unconditional")
kono
parents: 67
diff changeset
2046 (set_attr "type" "f_minmaxs")]
kono
parents: 67
diff changeset
2047 )
kono
parents: 67
diff changeset
2048
kono
parents: 67
diff changeset
2049 (define_insn "<fmaxmin><mode>3"
kono
parents: 67
diff changeset
2050 [(set (match_operand:SDF 0 "s_register_operand" "=<F_constraint>")
kono
parents: 67
diff changeset
2051 (unspec:SDF [(match_operand:SDF 1 "s_register_operand" "<F_constraint>")
kono
parents: 67
diff changeset
2052 (match_operand:SDF 2 "s_register_operand" "<F_constraint>")]
kono
parents: 67
diff changeset
2053 VMAXMINFNM))]
kono
parents: 67
diff changeset
2054 "TARGET_HARD_FLOAT && TARGET_VFP5 <vfp_double_cond>"
kono
parents: 67
diff changeset
2055 "<fmaxmin_op>.<V_if_elem>\\t%<V_reg>0, %<V_reg>1, %<V_reg>2"
kono
parents: 67
diff changeset
2056 [(set_attr "type" "f_minmax<vfp_type>")
kono
parents: 67
diff changeset
2057 (set_attr "conds" "unconditional")]
kono
parents: 67
diff changeset
2058 )
kono
parents: 67
diff changeset
2059
kono
parents: 67
diff changeset
2060 ;; Write Floating-point Status and Control Register.
kono
parents: 67
diff changeset
2061 (define_insn "set_fpscr"
kono
parents: 67
diff changeset
2062 [(unspec_volatile [(match_operand:SI 0 "register_operand" "r")] VUNSPEC_SET_FPSCR)]
kono
parents: 67
diff changeset
2063 "TARGET_HARD_FLOAT"
kono
parents: 67
diff changeset
2064 "mcr\\tp10, 7, %0, cr1, cr0, 0\\t @SET_FPSCR"
kono
parents: 67
diff changeset
2065 [(set_attr "type" "mrs")])
kono
parents: 67
diff changeset
2066
kono
parents: 67
diff changeset
2067 ;; Read Floating-point Status and Control Register.
kono
parents: 67
diff changeset
2068 (define_insn "get_fpscr"
kono
parents: 67
diff changeset
2069 [(set (match_operand:SI 0 "register_operand" "=r")
kono
parents: 67
diff changeset
2070 (unspec_volatile:SI [(const_int 0)] VUNSPEC_GET_FPSCR))]
kono
parents: 67
diff changeset
2071 "TARGET_HARD_FLOAT"
kono
parents: 67
diff changeset
2072 "mrc\\tp10, 7, %0, cr1, cr0, 0\\t @GET_FPSCR"
kono
parents: 67
diff changeset
2073 [(set_attr "type" "mrs")])
kono
parents: 67
diff changeset
2074
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2075
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2076 ;; Unimplemented insns:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2077 ;; fldm*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2078 ;; fstm*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2079 ;; fmdhr et al (VFPv1)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2080 ;; Support for xD (single precision only) variants.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2081 ;; fmrrs, fmsrr
111
kono
parents: 67
diff changeset
2082
kono
parents: 67
diff changeset
2083 ;; Split an immediate DF move to two immediate SI moves.
kono
parents: 67
diff changeset
2084 (define_insn_and_split "no_literal_pool_df_immediate"
kono
parents: 67
diff changeset
2085 [(set (match_operand:DF 0 "s_register_operand" "")
kono
parents: 67
diff changeset
2086 (match_operand:DF 1 "const_double_operand" ""))]
kono
parents: 67
diff changeset
2087 "TARGET_THUMB2 && arm_disable_literal_pool
kono
parents: 67
diff changeset
2088 && !(TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE
kono
parents: 67
diff changeset
2089 && vfp3_const_double_rtx (operands[1]))"
kono
parents: 67
diff changeset
2090 "#"
kono
parents: 67
diff changeset
2091 "&& !reload_completed"
kono
parents: 67
diff changeset
2092 [(set (subreg:SI (match_dup 1) 0) (match_dup 2))
kono
parents: 67
diff changeset
2093 (set (subreg:SI (match_dup 1) 4) (match_dup 3))
kono
parents: 67
diff changeset
2094 (set (match_dup 0) (match_dup 1))]
kono
parents: 67
diff changeset
2095 "
kono
parents: 67
diff changeset
2096 long buf[2];
kono
parents: 67
diff changeset
2097 real_to_target (buf, CONST_DOUBLE_REAL_VALUE (operands[1]), DFmode);
kono
parents: 67
diff changeset
2098 operands[2] = GEN_INT ((int) buf[0]);
kono
parents: 67
diff changeset
2099 operands[3] = GEN_INT ((int) buf[1]);
kono
parents: 67
diff changeset
2100 operands[1] = gen_reg_rtx (DFmode);
kono
parents: 67
diff changeset
2101 ")
kono
parents: 67
diff changeset
2102
kono
parents: 67
diff changeset
2103 ;; Split an immediate SF move to one immediate SI move.
kono
parents: 67
diff changeset
2104 (define_insn_and_split "no_literal_pool_sf_immediate"
kono
parents: 67
diff changeset
2105 [(set (match_operand:SF 0 "s_register_operand" "")
kono
parents: 67
diff changeset
2106 (match_operand:SF 1 "const_double_operand" ""))]
kono
parents: 67
diff changeset
2107 "TARGET_THUMB2 && arm_disable_literal_pool
kono
parents: 67
diff changeset
2108 && !(TARGET_HARD_FLOAT && vfp3_const_double_rtx (operands[1]))"
kono
parents: 67
diff changeset
2109 "#"
kono
parents: 67
diff changeset
2110 "&& !reload_completed"
kono
parents: 67
diff changeset
2111 [(set (subreg:SI (match_dup 1) 0) (match_dup 2))
kono
parents: 67
diff changeset
2112 (set (match_dup 0) (match_dup 1))]
kono
parents: 67
diff changeset
2113 "
kono
parents: 67
diff changeset
2114 long buf;
kono
parents: 67
diff changeset
2115 real_to_target (&buf, CONST_DOUBLE_REAL_VALUE (operands[1]), SFmode);
kono
parents: 67
diff changeset
2116 operands[2] = GEN_INT ((int) buf);
kono
parents: 67
diff changeset
2117 operands[1] = gen_reg_rtx (SFmode);
kono
parents: 67
diff changeset
2118 ")