1 ;; ARM VFP instruction patterns
2 ;; Copyright (C) 2003, 2005, 2006, 2007, 2008, 2010
3 ;; Free Software Foundation, Inc.
4 ;; Written by CodeSourcery.
6 ;; This file is part of GCC.
8 ;; GCC is free software; you can redistribute it and/or modify it
9 ;; under the terms of the GNU General Public License as published by
10 ;; the Free Software Foundation; either version 3, or (at your option)
13 ;; GCC is distributed in the hope that it will be useful, but
14 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 ;; General Public License for more details.
18 ;; You should have received a copy of the GNU General Public License
19 ;; along with GCC; see the file COPYING3. If not see
20 ;; <http://www.gnu.org/licenses/>. */
22 ;; Additional register numbers
27 ;; The VFP "type" attributes differ from those used in the FPA model.
28 ;; fcpys Single precision cpy.
29 ;; ffariths Single precision abs, neg.
30 ;; ffarithd Double precision abs, neg, cpy.
31 ;; fadds Single precision add/sub.
32 ;; faddd Double precision add/sub.
33 ;; fconsts Single precision load immediate.
34 ;; fconstd Double precision load immediate.
35 ;; fcmps Single precision comparison.
36 ;; fcmpd Double precision comparison.
37 ;; fmuls Single precision multiply.
38 ;; fmuld Double precision multiply.
39 ;; fmacs Single precision multiply-accumulate.
40 ;; fmacd Double precision multiply-accumulate.
41 ;; fdivs Single precision sqrt or division.
42 ;; fdivd Double precision sqrt or division.
43 ;; f_flag fmstat operation
44 ;; f_load[sd] Floating point load from memory.
45 ;; f_store[sd] Floating point store to memory.
46 ;; f_2_r Transfer vfp to arm reg.
47 ;; r_2_f Transfer arm to vfp reg.
48 ;; f_cvt Convert floating<->integral
51 ;; ??? For now do not allow loading constants into vfp regs. This causes
52 ;; problems because small constants get converted into adds.
53 (define_insn "*arm_movsi_vfp"
54 [(set (match_operand:SI 0 "nonimmediate_operand" "=rk,r,r,r,rk,m ,*t,r,*t,*t, *Uv")
55 (match_operand:SI 1 "general_operand" "rk, I,K,j,mi,rk,r,*t,*t,*Uvi,*t"))]
56 "TARGET_ARM && TARGET_VFP && TARGET_HARD_FLOAT
57 && ( s_register_operand (operands[0], SImode)
58 || s_register_operand (operands[1], SImode))"
60 switch (which_alternative)
63 return \"mov%?\\t%0, %1\";
65 return \"mvn%?\\t%0, #%B1\";
67 return \"movw%?\\t%0, %1\";
69 return \"ldr%?\\t%0, %1\";
71 return \"str%?\\t%1, %0\";
73 return \"fmsr%?\\t%0, %1\\t%@ int\";
75 return \"fmrs%?\\t%0, %1\\t%@ int\";
77 return \"fcpys%?\\t%0, %1\\t%@ int\";
79 return output_move_vfp (operands);
84 [(set_attr "predicable" "yes")
85 (set_attr "type" "*,*,*,*,load1,store1,r_2_f,f_2_r,fcpys,f_loads,f_stores")
86 (set_attr "insn" "mov,mov,mvn,mov,*,*,*,*,*,*,*")
87 (set_attr "pool_range" "*,*,*,*,4096,*,*,*,*,1020,*")
88 (set_attr "neg_pool_range" "*,*,*,*,4084,*,*,*,*,1008,*")]
91 ;; See thumb2.md:thumb2_movsi_insn for an explanation of the split
92 ;; high/low register alternatives for loads and stores here.
93 (define_insn "*thumb2_movsi_vfp"
94 [(set (match_operand:SI 0 "nonimmediate_operand" "=rk,r,r,r, l,*hk,m, *m,*t, r,*t,*t, *Uv")
95 (match_operand:SI 1 "general_operand" "rk, I,K,j,mi,*mi,l,*hk, r,*t,*t,*Uvi,*t"))]
96 "TARGET_THUMB2 && TARGET_VFP && TARGET_HARD_FLOAT
97 && ( s_register_operand (operands[0], SImode)
98 || s_register_operand (operands[1], SImode))"
100 switch (which_alternative)
103 return \"mov%?\\t%0, %1\";
105 return \"mvn%?\\t%0, #%B1\";
107 return \"movw%?\\t%0, %1\";
110 return \"ldr%?\\t%0, %1\";
113 return \"str%?\\t%1, %0\";
115 return \"fmsr%?\\t%0, %1\\t%@ int\";
117 return \"fmrs%?\\t%0, %1\\t%@ int\";
119 return \"fcpys%?\\t%0, %1\\t%@ int\";
121 return output_move_vfp (operands);
126 [(set_attr "predicable" "yes")
127 (set_attr "type" "*,*,*,*,load1,load1,store1,store1,r_2_f,f_2_r,fcpys,f_loads,f_stores")
128 (set_attr "insn" "mov,mov,mvn,mov,*,*,*,*,*,*,*,*,*")
129 (set_attr "pool_range" "*,*,*,*,1020,4096,*,*,*,*,*,1020,*")
130 (set_attr "neg_pool_range" "*,*,*,*, 0, 0,*,*,*,*,*,1008,*")]
136 (define_insn "*movdi_vfp"
137 [(set (match_operand:DI 0 "nonimmediate_di_operand" "=r,r,r,r,r,r,m,w,r,w,w, Uv")
138 (match_operand:DI 1 "di_operand" "r,rDa,Db,Dc,mi,mi,r,r,w,w,Uvi,w"))]
139 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP && arm_tune != cortexa8
140 && ( register_operand (operands[0], DImode)
141 || register_operand (operands[1], DImode))
142 && !(TARGET_NEON && CONST_INT_P (operands[1])
143 && neon_immediate_valid_for_move (operands[1], DImode, NULL, NULL))"
145 switch (which_alternative)
155 return output_move_double (operands, true, NULL);
157 return \"fmdrr%?\\t%P0, %Q1, %R1\\t%@ int\";
159 return \"fmrrd%?\\t%Q0, %R0, %P1\\t%@ int\";
161 if (TARGET_VFP_SINGLE)
162 return \"fcpys%?\\t%0, %1\\t%@ int\;fcpys%?\\t%p0, %p1\\t%@ int\";
164 return \"fcpyd%?\\t%P0, %P1\\t%@ int\";
166 return output_move_vfp (operands);
171 [(set_attr "type" "*,*,*,*,load2,load2,store2,r_2_f,f_2_r,ffarithd,f_loadd,f_stored")
172 (set_attr "neon_type" "*,*,*,*,*,*,*,neon_mcr_2_mcrr,neon_mrrc,neon_vmov,*,*")
173 (set (attr "length") (cond [(eq_attr "alternative" "1,4,5,6") (const_int 8)
174 (eq_attr "alternative" "2") (const_int 12)
175 (eq_attr "alternative" "3") (const_int 16)
176 (eq_attr "alternative" "9")
178 (match_test "TARGET_VFP_SINGLE")
182 (set_attr "pool_range" "*,*,*,*,1020,4096,*,*,*,*,1020,*")
183 (set_attr "neg_pool_range" "*,*,*,*,1004,0,*,*,*,*,1004,*")
184 (set_attr "arch" "t2,any,any,any,a,t2,any,any,any,any,any,any")]
187 (define_insn "*movdi_vfp_cortexa8"
188 [(set (match_operand:DI 0 "nonimmediate_di_operand" "=r,r,r,r,r,r,m,w,!r,w,w, Uv")
189 (match_operand:DI 1 "di_operand" "r,rDa,Db,Dc,mi,mi,r,r,w,w,Uvi,w"))]
190 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP && arm_tune == cortexa8
191 && ( register_operand (operands[0], DImode)
192 || register_operand (operands[1], DImode))
193 && !(TARGET_NEON && CONST_INT_P (operands[1])
194 && neon_immediate_valid_for_move (operands[1], DImode, NULL, NULL))"
196 switch (which_alternative)
206 return output_move_double (operands, true, NULL);
208 return \"fmdrr%?\\t%P0, %Q1, %R1\\t%@ int\";
210 return \"fmrrd%?\\t%Q0, %R0, %P1\\t%@ int\";
212 return \"fcpyd%?\\t%P0, %P1\\t%@ int\";
214 return output_move_vfp (operands);
219 [(set_attr "type" "*,*,*,*,load2,load2,store2,r_2_f,f_2_r,ffarithd,f_loadd,f_stored")
220 (set (attr "length") (cond [(eq_attr "alternative" "1") (const_int 8)
221 (eq_attr "alternative" "2") (const_int 12)
222 (eq_attr "alternative" "3") (const_int 16)
223 (eq_attr "alternative" "4,5,6")
225 "arm_count_output_move_double_insns (operands) \
228 (set_attr "predicable" "yes")
229 (set_attr "pool_range" "*,*,*,*,1020,4096,*,*,*,*,1020,*")
230 (set_attr "neg_pool_range" "*,*,*,*,1004,0,*,*,*,*,1004,*")
231 (set (attr "ce_count")
232 (symbol_ref "get_attr_length (insn) / 4"))
233 (set_attr "arch" "t2,any,any,any,a,t2,any,any,any,any,any,any")]
237 (define_insn "*movhf_vfp_neon"
238 [(set (match_operand:HF 0 "nonimmediate_operand" "= t,Um,r,m,t,r,t,r,r")
239 (match_operand:HF 1 "general_operand" " Um, t,m,r,t,r,r,t,F"))]
240 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_NEON_FP16
241 && ( s_register_operand (operands[0], HFmode)
242 || s_register_operand (operands[1], HFmode))"
244 switch (which_alternative)
246 case 0: /* S register from memory */
247 return \"vld1.16\\t{%z0}, %A1\";
248 case 1: /* memory from S register */
249 return \"vst1.16\\t{%z1}, %A0\";
250 case 2: /* ARM register from memory */
251 return \"ldrh\\t%0, %1\\t%@ __fp16\";
252 case 3: /* memory from ARM register */
253 return \"strh\\t%1, %0\\t%@ __fp16\";
254 case 4: /* S register from S register */
255 return \"fcpys\\t%0, %1\";
256 case 5: /* ARM register from ARM register */
257 return \"mov\\t%0, %1\\t%@ __fp16\";
258 case 6: /* S register from ARM register */
259 return \"fmsr\\t%0, %1\";
260 case 7: /* ARM register from S register */
261 return \"fmrs\\t%0, %1\";
262 case 8: /* ARM register from constant */
268 REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]);
269 bits = real_to_target (NULL, &r, HFmode);
270 ops[0] = operands[0];
271 ops[1] = GEN_INT (bits);
272 ops[2] = GEN_INT (bits & 0xff00);
273 ops[3] = GEN_INT (bits & 0x00ff);
276 output_asm_insn (\"movw\\t%0, %1\", ops);
278 output_asm_insn (\"mov\\t%0, %2\;orr\\t%0, %0, %3\", ops);
285 [(set_attr "conds" "unconditional")
286 (set_attr "type" "*,*,load1,store1,fcpys,*,r_2_f,f_2_r,*")
287 (set_attr "neon_type" "neon_vld1_1_2_regs,neon_vst1_1_2_regs_vst2_2_regs,*,*,*,*,*,*,*")
288 (set_attr "length" "4,4,4,4,4,4,4,4,8")]
291 ;; FP16 without element load/store instructions.
292 (define_insn "*movhf_vfp"
293 [(set (match_operand:HF 0 "nonimmediate_operand" "=r,m,t,r,t,r,r")
294 (match_operand:HF 1 "general_operand" " m,r,t,r,r,t,F"))]
295 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_FP16 && !TARGET_NEON_FP16
296 && ( s_register_operand (operands[0], HFmode)
297 || s_register_operand (operands[1], HFmode))"
299 switch (which_alternative)
301 case 0: /* ARM register from memory */
302 return \"ldrh\\t%0, %1\\t%@ __fp16\";
303 case 1: /* memory from ARM register */
304 return \"strh\\t%1, %0\\t%@ __fp16\";
305 case 2: /* S register from S register */
306 return \"fcpys\\t%0, %1\";
307 case 3: /* ARM register from ARM register */
308 return \"mov\\t%0, %1\\t%@ __fp16\";
309 case 4: /* S register from ARM register */
310 return \"fmsr\\t%0, %1\";
311 case 5: /* ARM register from S register */
312 return \"fmrs\\t%0, %1\";
313 case 6: /* ARM register from constant */
319 REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]);
320 bits = real_to_target (NULL, &r, HFmode);
321 ops[0] = operands[0];
322 ops[1] = GEN_INT (bits);
323 ops[2] = GEN_INT (bits & 0xff00);
324 ops[3] = GEN_INT (bits & 0x00ff);
327 output_asm_insn (\"movw\\t%0, %1\", ops);
329 output_asm_insn (\"mov\\t%0, %2\;orr\\t%0, %0, %3\", ops);
336 [(set_attr "conds" "unconditional")
337 (set_attr "type" "load1,store1,fcpys,*,r_2_f,f_2_r,*")
338 (set_attr "length" "4,4,4,4,4,4,8")]
343 ;; Disparage the w<->r cases because reloading an invalid address is
344 ;; preferable to loading the value via integer registers.
346 (define_insn "*movsf_vfp"
347 [(set (match_operand:SF 0 "nonimmediate_operand" "=t,?r,t ,t ,Uv,r ,m,t,r")
348 (match_operand:SF 1 "general_operand" " ?r,t,Dv,UvE,t, mE,r,t,r"))]
349 "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_VFP
350 && ( s_register_operand (operands[0], SFmode)
351 || s_register_operand (operands[1], SFmode))"
353 switch (which_alternative)
356 return \"fmsr%?\\t%0, %1\";
358 return \"fmrs%?\\t%0, %1\";
360 return \"fconsts%?\\t%0, #%G1\";
362 return output_move_vfp (operands);
364 return \"ldr%?\\t%0, %1\\t%@ float\";
366 return \"str%?\\t%1, %0\\t%@ float\";
368 return \"fcpys%?\\t%0, %1\";
370 return \"mov%?\\t%0, %1\\t%@ float\";
375 [(set_attr "predicable" "yes")
377 "r_2_f,f_2_r,fconsts,f_loads,f_stores,load1,store1,fcpys,*")
378 (set_attr "insn" "*,*,*,*,*,*,*,*,mov")
379 (set_attr "pool_range" "*,*,*,1020,*,4096,*,*,*")
380 (set_attr "neg_pool_range" "*,*,*,1008,*,4080,*,*,*")]
383 (define_insn "*thumb2_movsf_vfp"
384 [(set (match_operand:SF 0 "nonimmediate_operand" "=t,?r,t, t ,Uv,r ,m,t,r")
385 (match_operand:SF 1 "general_operand" " ?r,t,Dv,UvE,t, mE,r,t,r"))]
386 "TARGET_THUMB2 && TARGET_HARD_FLOAT && TARGET_VFP
387 && ( s_register_operand (operands[0], SFmode)
388 || s_register_operand (operands[1], SFmode))"
390 switch (which_alternative)
393 return \"fmsr%?\\t%0, %1\";
395 return \"fmrs%?\\t%0, %1\";
397 return \"fconsts%?\\t%0, #%G1\";
399 return output_move_vfp (operands);
401 return \"ldr%?\\t%0, %1\\t%@ float\";
403 return \"str%?\\t%1, %0\\t%@ float\";
405 return \"fcpys%?\\t%0, %1\";
407 return \"mov%?\\t%0, %1\\t%@ float\";
412 [(set_attr "predicable" "yes")
414 "r_2_f,f_2_r,fconsts,f_loads,f_stores,load1,store1,fcpys,*")
415 (set_attr "insn" "*,*,*,*,*,*,*,*,mov")
416 (set_attr "pool_range" "*,*,*,1020,*,4092,*,*,*")
417 (set_attr "neg_pool_range" "*,*,*,1008,*,0,*,*,*")]
423 (define_insn "*movdf_vfp"
424 [(set (match_operand:DF 0 "nonimmediate_soft_df_operand" "=w,?r,w ,w ,Uv,r, m,w,r")
425 (match_operand:DF 1 "soft_df_operand" " ?r,w,Dy,UvF,w ,mF,r,w,r"))]
426 "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_VFP
427 && ( register_operand (operands[0], DFmode)
428 || register_operand (operands[1], DFmode))"
431 switch (which_alternative)
434 return \"fmdrr%?\\t%P0, %Q1, %R1\";
436 return \"fmrrd%?\\t%Q0, %R0, %P1\";
438 gcc_assert (TARGET_VFP_DOUBLE);
439 return \"fconstd%?\\t%P0, #%G1\";
441 return output_move_vfp (operands);
443 return output_move_double (operands, true, NULL);
445 if (TARGET_VFP_SINGLE)
446 return \"fcpys%?\\t%0, %1\;fcpys%?\\t%p0, %p1\";
448 return \"fcpyd%?\\t%P0, %P1\";
457 "r_2_f,f_2_r,fconstd,f_loadd,f_stored,load2,store2,ffarithd,*")
458 (set (attr "length") (cond [(eq_attr "alternative" "5,6,8") (const_int 8)
459 (eq_attr "alternative" "7")
461 (match_test "TARGET_VFP_SINGLE")
465 (set_attr "predicable" "yes")
466 (set_attr "pool_range" "*,*,*,1020,*,1020,*,*,*")
467 (set_attr "neg_pool_range" "*,*,*,1004,*,1004,*,*,*")]
470 (define_insn "*thumb2_movdf_vfp"
471 [(set (match_operand:DF 0 "nonimmediate_soft_df_operand" "=w,?r,w ,w ,Uv,r ,m,w,r")
472 (match_operand:DF 1 "soft_df_operand" " ?r,w,Dy,UvF,w, mF,r, w,r"))]
473 "TARGET_THUMB2 && TARGET_HARD_FLOAT && TARGET_VFP"
476 switch (which_alternative)
479 return \"fmdrr%?\\t%P0, %Q1, %R1\";
481 return \"fmrrd%?\\t%Q0, %R0, %P1\";
483 gcc_assert (TARGET_VFP_DOUBLE);
484 return \"fconstd%?\\t%P0, #%G1\";
486 return output_move_vfp (operands);
487 case 5: case 6: case 8:
488 return output_move_double (operands, true, NULL);
490 if (TARGET_VFP_SINGLE)
491 return \"fcpys%?\\t%0, %1\;fcpys%?\\t%p0, %p1\";
493 return \"fcpyd%?\\t%P0, %P1\";
500 "r_2_f,f_2_r,fconstd,f_loadd,f_stored,load2,store2,ffarithd,*")
501 (set (attr "length") (cond [(eq_attr "alternative" "5,6,8") (const_int 8)
502 (eq_attr "alternative" "7")
504 (match_test "TARGET_VFP_SINGLE")
508 (set_attr "pool_range" "*,*,*,1020,*,4096,*,*,*")
509 (set_attr "neg_pool_range" "*,*,*,1008,*,0,*,*,*")]
513 ;; Conditional move patterns
515 (define_insn "*movsfcc_vfp"
516 [(set (match_operand:SF 0 "s_register_operand" "=t,t,t,t,t,t,?r,?r,?r")
518 (match_operator 3 "arm_comparison_operator"
519 [(match_operand 4 "cc_register" "") (const_int 0)])
520 (match_operand:SF 1 "s_register_operand" "0,t,t,0,?r,?r,0,t,t")
521 (match_operand:SF 2 "s_register_operand" "t,0,t,?r,0,?r,t,0,t")))]
522 "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_VFP"
526 fcpys%D3\\t%0, %2\;fcpys%d3\\t%0, %1
529 fmsr%D3\\t%0, %2\;fmsr%d3\\t%0, %1
532 fmrs%D3\\t%0, %2\;fmrs%d3\\t%0, %1"
533 [(set_attr "conds" "use")
534 (set_attr "length" "4,4,8,4,4,8,4,4,8")
535 (set_attr "type" "fcpys,fcpys,fcpys,r_2_f,r_2_f,r_2_f,f_2_r,f_2_r,f_2_r")]
538 (define_insn "*thumb2_movsfcc_vfp"
539 [(set (match_operand:SF 0 "s_register_operand" "=t,t,t,t,t,t,?r,?r,?r")
541 (match_operator 3 "arm_comparison_operator"
542 [(match_operand 4 "cc_register" "") (const_int 0)])
543 (match_operand:SF 1 "s_register_operand" "0,t,t,0,?r,?r,0,t,t")
544 (match_operand:SF 2 "s_register_operand" "t,0,t,?r,0,?r,t,0,t")))]
545 "TARGET_THUMB2 && TARGET_HARD_FLOAT && TARGET_VFP"
547 it\\t%D3\;fcpys%D3\\t%0, %2
548 it\\t%d3\;fcpys%d3\\t%0, %1
549 ite\\t%D3\;fcpys%D3\\t%0, %2\;fcpys%d3\\t%0, %1
550 it\\t%D3\;fmsr%D3\\t%0, %2
551 it\\t%d3\;fmsr%d3\\t%0, %1
552 ite\\t%D3\;fmsr%D3\\t%0, %2\;fmsr%d3\\t%0, %1
553 it\\t%D3\;fmrs%D3\\t%0, %2
554 it\\t%d3\;fmrs%d3\\t%0, %1
555 ite\\t%D3\;fmrs%D3\\t%0, %2\;fmrs%d3\\t%0, %1"
556 [(set_attr "conds" "use")
557 (set_attr "length" "6,6,10,6,6,10,6,6,10")
558 (set_attr "type" "fcpys,fcpys,fcpys,r_2_f,r_2_f,r_2_f,f_2_r,f_2_r,f_2_r")]
561 (define_insn "*movdfcc_vfp"
562 [(set (match_operand:DF 0 "s_register_operand" "=w,w,w,w,w,w,?r,?r,?r")
564 (match_operator 3 "arm_comparison_operator"
565 [(match_operand 4 "cc_register" "") (const_int 0)])
566 (match_operand:DF 1 "s_register_operand" "0,w,w,0,?r,?r,0,w,w")
567 (match_operand:DF 2 "s_register_operand" "w,0,w,?r,0,?r,w,0,w")))]
568 "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
572 fcpyd%D3\\t%P0, %P2\;fcpyd%d3\\t%P0, %P1
573 fmdrr%D3\\t%P0, %Q2, %R2
574 fmdrr%d3\\t%P0, %Q1, %R1
575 fmdrr%D3\\t%P0, %Q2, %R2\;fmdrr%d3\\t%P0, %Q1, %R1
576 fmrrd%D3\\t%Q0, %R0, %P2
577 fmrrd%d3\\t%Q0, %R0, %P1
578 fmrrd%D3\\t%Q0, %R0, %P2\;fmrrd%d3\\t%Q0, %R0, %P1"
579 [(set_attr "conds" "use")
580 (set_attr "length" "4,4,8,4,4,8,4,4,8")
581 (set_attr "type" "ffarithd,ffarithd,ffarithd,r_2_f,r_2_f,r_2_f,f_2_r,f_2_r,f_2_r")]
584 (define_insn "*thumb2_movdfcc_vfp"
585 [(set (match_operand:DF 0 "s_register_operand" "=w,w,w,w,w,w,?r,?r,?r")
587 (match_operator 3 "arm_comparison_operator"
588 [(match_operand 4 "cc_register" "") (const_int 0)])
589 (match_operand:DF 1 "s_register_operand" "0,w,w,0,?r,?r,0,w,w")
590 (match_operand:DF 2 "s_register_operand" "w,0,w,?r,0,?r,w,0,w")))]
591 "TARGET_THUMB2 && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
593 it\\t%D3\;fcpyd%D3\\t%P0, %P2
594 it\\t%d3\;fcpyd%d3\\t%P0, %P1
595 ite\\t%D3\;fcpyd%D3\\t%P0, %P2\;fcpyd%d3\\t%P0, %P1
596 it\t%D3\;fmdrr%D3\\t%P0, %Q2, %R2
597 it\t%d3\;fmdrr%d3\\t%P0, %Q1, %R1
598 ite\\t%D3\;fmdrr%D3\\t%P0, %Q2, %R2\;fmdrr%d3\\t%P0, %Q1, %R1
599 it\t%D3\;fmrrd%D3\\t%Q0, %R0, %P2
600 it\t%d3\;fmrrd%d3\\t%Q0, %R0, %P1
601 ite\\t%D3\;fmrrd%D3\\t%Q0, %R0, %P2\;fmrrd%d3\\t%Q0, %R0, %P1"
602 [(set_attr "conds" "use")
603 (set_attr "length" "6,6,10,6,6,10,6,6,10")
604 (set_attr "type" "ffarithd,ffarithd,ffarithd,r_2_f,r_2_f,r_2_f,f_2_r,f_2_r,f_2_r")]
608 ;; Sign manipulation functions
610 (define_insn "*abssf2_vfp"
611 [(set (match_operand:SF 0 "s_register_operand" "=t")
612 (abs:SF (match_operand:SF 1 "s_register_operand" "t")))]
613 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
615 [(set_attr "predicable" "yes")
616 (set_attr "type" "ffariths")]
619 (define_insn "*absdf2_vfp"
620 [(set (match_operand:DF 0 "s_register_operand" "=w")
621 (abs:DF (match_operand:DF 1 "s_register_operand" "w")))]
622 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
624 [(set_attr "predicable" "yes")
625 (set_attr "type" "ffarithd")]
628 (define_insn "*negsf2_vfp"
629 [(set (match_operand:SF 0 "s_register_operand" "=t,?r")
630 (neg:SF (match_operand:SF 1 "s_register_operand" "t,r")))]
631 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
634 eor%?\\t%0, %1, #-2147483648"
635 [(set_attr "predicable" "yes")
636 (set_attr "type" "ffariths")]
639 (define_insn_and_split "*negdf2_vfp"
640 [(set (match_operand:DF 0 "s_register_operand" "=w,?r,?r")
641 (neg:DF (match_operand:DF 1 "s_register_operand" "w,0,r")))]
642 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
647 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE && reload_completed
648 && arm_general_register_operand (operands[0], DFmode)"
649 [(set (match_dup 0) (match_dup 1))]
651 if (REGNO (operands[0]) == REGNO (operands[1]))
653 operands[0] = gen_highpart (SImode, operands[0]);
654 operands[1] = gen_rtx_XOR (SImode, operands[0], GEN_INT (0x80000000));
658 rtx in_hi, in_lo, out_hi, out_lo;
660 in_hi = gen_rtx_XOR (SImode, gen_highpart (SImode, operands[1]),
661 GEN_INT (0x80000000));
662 in_lo = gen_lowpart (SImode, operands[1]);
663 out_hi = gen_highpart (SImode, operands[0]);
664 out_lo = gen_lowpart (SImode, operands[0]);
666 if (REGNO (in_lo) == REGNO (out_hi))
668 emit_insn (gen_rtx_SET (SImode, out_lo, in_lo));
669 operands[0] = out_hi;
674 emit_insn (gen_rtx_SET (SImode, out_hi, in_hi));
675 operands[0] = out_lo;
680 [(set_attr "predicable" "yes")
681 (set_attr "length" "4,4,8")
682 (set_attr "type" "ffarithd")]
688 (define_insn "*addsf3_vfp"
689 [(set (match_operand:SF 0 "s_register_operand" "=t")
690 (plus:SF (match_operand:SF 1 "s_register_operand" "t")
691 (match_operand:SF 2 "s_register_operand" "t")))]
692 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
693 "fadds%?\\t%0, %1, %2"
694 [(set_attr "predicable" "yes")
695 (set_attr "type" "fadds")]
698 (define_insn "*adddf3_vfp"
699 [(set (match_operand:DF 0 "s_register_operand" "=w")
700 (plus:DF (match_operand:DF 1 "s_register_operand" "w")
701 (match_operand:DF 2 "s_register_operand" "w")))]
702 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
703 "faddd%?\\t%P0, %P1, %P2"
704 [(set_attr "predicable" "yes")
705 (set_attr "type" "faddd")]
709 (define_insn "*subsf3_vfp"
710 [(set (match_operand:SF 0 "s_register_operand" "=t")
711 (minus:SF (match_operand:SF 1 "s_register_operand" "t")
712 (match_operand:SF 2 "s_register_operand" "t")))]
713 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
714 "fsubs%?\\t%0, %1, %2"
715 [(set_attr "predicable" "yes")
716 (set_attr "type" "fadds")]
719 (define_insn "*subdf3_vfp"
720 [(set (match_operand:DF 0 "s_register_operand" "=w")
721 (minus:DF (match_operand:DF 1 "s_register_operand" "w")
722 (match_operand:DF 2 "s_register_operand" "w")))]
723 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
724 "fsubd%?\\t%P0, %P1, %P2"
725 [(set_attr "predicable" "yes")
726 (set_attr "type" "faddd")]
732 (define_insn "*divsf3_vfp"
733 [(set (match_operand:SF 0 "s_register_operand" "=t")
734 (div:SF (match_operand:SF 1 "s_register_operand" "t")
735 (match_operand:SF 2 "s_register_operand" "t")))]
736 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
737 "fdivs%?\\t%0, %1, %2"
738 [(set_attr "predicable" "yes")
739 (set_attr "type" "fdivs")]
742 (define_insn "*divdf3_vfp"
743 [(set (match_operand:DF 0 "s_register_operand" "=w")
744 (div:DF (match_operand:DF 1 "s_register_operand" "w")
745 (match_operand:DF 2 "s_register_operand" "w")))]
746 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
747 "fdivd%?\\t%P0, %P1, %P2"
748 [(set_attr "predicable" "yes")
749 (set_attr "type" "fdivd")]
753 ;; Multiplication insns
755 (define_insn "*mulsf3_vfp"
756 [(set (match_operand:SF 0 "s_register_operand" "=t")
757 (mult:SF (match_operand:SF 1 "s_register_operand" "t")
758 (match_operand:SF 2 "s_register_operand" "t")))]
759 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
760 "fmuls%?\\t%0, %1, %2"
761 [(set_attr "predicable" "yes")
762 (set_attr "type" "fmuls")]
765 (define_insn "*muldf3_vfp"
766 [(set (match_operand:DF 0 "s_register_operand" "=w")
767 (mult:DF (match_operand:DF 1 "s_register_operand" "w")
768 (match_operand:DF 2 "s_register_operand" "w")))]
769 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
770 "fmuld%?\\t%P0, %P1, %P2"
771 [(set_attr "predicable" "yes")
772 (set_attr "type" "fmuld")]
775 (define_insn "*mulsf3negsf_vfp"
776 [(set (match_operand:SF 0 "s_register_operand" "=t")
777 (mult:SF (neg:SF (match_operand:SF 1 "s_register_operand" "t"))
778 (match_operand:SF 2 "s_register_operand" "t")))]
779 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
780 "fnmuls%?\\t%0, %1, %2"
781 [(set_attr "predicable" "yes")
782 (set_attr "type" "fmuls")]
785 (define_insn "*muldf3negdf_vfp"
786 [(set (match_operand:DF 0 "s_register_operand" "=w")
787 (mult:DF (neg:DF (match_operand:DF 1 "s_register_operand" "w"))
788 (match_operand:DF 2 "s_register_operand" "w")))]
789 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
790 "fnmuld%?\\t%P0, %P1, %P2"
791 [(set_attr "predicable" "yes")
792 (set_attr "type" "fmuld")]
796 ;; Multiply-accumulate insns
799 (define_insn "*mulsf3addsf_vfp"
800 [(set (match_operand:SF 0 "s_register_operand" "=t")
801 (plus:SF (mult:SF (match_operand:SF 2 "s_register_operand" "t")
802 (match_operand:SF 3 "s_register_operand" "t"))
803 (match_operand:SF 1 "s_register_operand" "0")))]
804 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
805 "fmacs%?\\t%0, %2, %3"
806 [(set_attr "predicable" "yes")
807 (set_attr "type" "fmacs")]
810 (define_insn "*muldf3adddf_vfp"
811 [(set (match_operand:DF 0 "s_register_operand" "=w")
812 (plus:DF (mult:DF (match_operand:DF 2 "s_register_operand" "w")
813 (match_operand:DF 3 "s_register_operand" "w"))
814 (match_operand:DF 1 "s_register_operand" "0")))]
815 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
816 "fmacd%?\\t%P0, %P2, %P3"
817 [(set_attr "predicable" "yes")
818 (set_attr "type" "fmacd")]
822 (define_insn "*mulsf3subsf_vfp"
823 [(set (match_operand:SF 0 "s_register_operand" "=t")
824 (minus:SF (mult:SF (match_operand:SF 2 "s_register_operand" "t")
825 (match_operand:SF 3 "s_register_operand" "t"))
826 (match_operand:SF 1 "s_register_operand" "0")))]
827 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
828 "fmscs%?\\t%0, %2, %3"
829 [(set_attr "predicable" "yes")
830 (set_attr "type" "fmacs")]
833 (define_insn "*muldf3subdf_vfp"
834 [(set (match_operand:DF 0 "s_register_operand" "=w")
835 (minus:DF (mult:DF (match_operand:DF 2 "s_register_operand" "w")
836 (match_operand:DF 3 "s_register_operand" "w"))
837 (match_operand:DF 1 "s_register_operand" "0")))]
838 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
839 "fmscd%?\\t%P0, %P2, %P3"
840 [(set_attr "predicable" "yes")
841 (set_attr "type" "fmacd")]
845 (define_insn "*mulsf3negsfaddsf_vfp"
846 [(set (match_operand:SF 0 "s_register_operand" "=t")
847 (minus:SF (match_operand:SF 1 "s_register_operand" "0")
848 (mult:SF (match_operand:SF 2 "s_register_operand" "t")
849 (match_operand:SF 3 "s_register_operand" "t"))))]
850 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
851 "fnmacs%?\\t%0, %2, %3"
852 [(set_attr "predicable" "yes")
853 (set_attr "type" "fmacs")]
856 (define_insn "*fmuldf3negdfadddf_vfp"
857 [(set (match_operand:DF 0 "s_register_operand" "=w")
858 (minus:DF (match_operand:DF 1 "s_register_operand" "0")
859 (mult:DF (match_operand:DF 2 "s_register_operand" "w")
860 (match_operand:DF 3 "s_register_operand" "w"))))]
861 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
862 "fnmacd%?\\t%P0, %P2, %P3"
863 [(set_attr "predicable" "yes")
864 (set_attr "type" "fmacd")]
869 (define_insn "*mulsf3negsfsubsf_vfp"
870 [(set (match_operand:SF 0 "s_register_operand" "=t")
872 (neg:SF (match_operand:SF 2 "s_register_operand" "t"))
873 (match_operand:SF 3 "s_register_operand" "t"))
874 (match_operand:SF 1 "s_register_operand" "0")))]
875 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
876 "fnmscs%?\\t%0, %2, %3"
877 [(set_attr "predicable" "yes")
878 (set_attr "type" "fmacs")]
881 (define_insn "*muldf3negdfsubdf_vfp"
882 [(set (match_operand:DF 0 "s_register_operand" "=w")
884 (neg:DF (match_operand:DF 2 "s_register_operand" "w"))
885 (match_operand:DF 3 "s_register_operand" "w"))
886 (match_operand:DF 1 "s_register_operand" "0")))]
887 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
888 "fnmscd%?\\t%P0, %P2, %P3"
889 [(set_attr "predicable" "yes")
890 (set_attr "type" "fmacd")]
894 ;; Conversion routines
896 (define_insn "*extendsfdf2_vfp"
897 [(set (match_operand:DF 0 "s_register_operand" "=w")
898 (float_extend:DF (match_operand:SF 1 "s_register_operand" "t")))]
899 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
901 [(set_attr "predicable" "yes")
902 (set_attr "type" "f_cvt")]
905 (define_insn "*truncdfsf2_vfp"
906 [(set (match_operand:SF 0 "s_register_operand" "=t")
907 (float_truncate:SF (match_operand:DF 1 "s_register_operand" "w")))]
908 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
910 [(set_attr "predicable" "yes")
911 (set_attr "type" "f_cvt")]
914 (define_insn "extendhfsf2"
915 [(set (match_operand:SF 0 "s_register_operand" "=t")
916 (float_extend:SF (match_operand:HF 1 "s_register_operand" "t")))]
917 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_FP16"
918 "vcvtb%?.f32.f16\\t%0, %1"
919 [(set_attr "predicable" "yes")
920 (set_attr "type" "f_cvt")]
923 (define_insn "truncsfhf2"
924 [(set (match_operand:HF 0 "s_register_operand" "=t")
925 (float_truncate:HF (match_operand:SF 1 "s_register_operand" "t")))]
926 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_FP16"
927 "vcvtb%?.f16.f32\\t%0, %1"
928 [(set_attr "predicable" "yes")
929 (set_attr "type" "f_cvt")]
932 (define_insn "*truncsisf2_vfp"
933 [(set (match_operand:SI 0 "s_register_operand" "=t")
934 (fix:SI (fix:SF (match_operand:SF 1 "s_register_operand" "t"))))]
935 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
937 [(set_attr "predicable" "yes")
938 (set_attr "type" "f_cvt")]
941 (define_insn "*truncsidf2_vfp"
942 [(set (match_operand:SI 0 "s_register_operand" "=t")
943 (fix:SI (fix:DF (match_operand:DF 1 "s_register_operand" "w"))))]
944 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
945 "ftosizd%?\\t%0, %P1"
946 [(set_attr "predicable" "yes")
947 (set_attr "type" "f_cvt")]
951 (define_insn "fixuns_truncsfsi2"
952 [(set (match_operand:SI 0 "s_register_operand" "=t")
953 (unsigned_fix:SI (fix:SF (match_operand:SF 1 "s_register_operand" "t"))))]
954 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
956 [(set_attr "predicable" "yes")
957 (set_attr "type" "f_cvt")]
960 (define_insn "fixuns_truncdfsi2"
961 [(set (match_operand:SI 0 "s_register_operand" "=t")
962 (unsigned_fix:SI (fix:DF (match_operand:DF 1 "s_register_operand" "t"))))]
963 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
964 "ftouizd%?\\t%0, %P1"
965 [(set_attr "predicable" "yes")
966 (set_attr "type" "f_cvt")]
970 (define_insn "*floatsisf2_vfp"
971 [(set (match_operand:SF 0 "s_register_operand" "=t")
972 (float:SF (match_operand:SI 1 "s_register_operand" "t")))]
973 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
975 [(set_attr "predicable" "yes")
976 (set_attr "type" "f_cvt")]
979 (define_insn "*floatsidf2_vfp"
980 [(set (match_operand:DF 0 "s_register_operand" "=w")
981 (float:DF (match_operand:SI 1 "s_register_operand" "t")))]
982 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
984 [(set_attr "predicable" "yes")
985 (set_attr "type" "f_cvt")]
989 (define_insn "floatunssisf2"
990 [(set (match_operand:SF 0 "s_register_operand" "=t")
991 (unsigned_float:SF (match_operand:SI 1 "s_register_operand" "t")))]
992 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
994 [(set_attr "predicable" "yes")
995 (set_attr "type" "f_cvt")]
998 (define_insn "floatunssidf2"
999 [(set (match_operand:DF 0 "s_register_operand" "=w")
1000 (unsigned_float:DF (match_operand:SI 1 "s_register_operand" "t")))]
1001 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
1002 "fuitod%?\\t%P0, %1"
1003 [(set_attr "predicable" "yes")
1004 (set_attr "type" "f_cvt")]
1010 (define_insn "*sqrtsf2_vfp"
1011 [(set (match_operand:SF 0 "s_register_operand" "=t")
1012 (sqrt:SF (match_operand:SF 1 "s_register_operand" "t")))]
1013 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
1015 [(set_attr "predicable" "yes")
1016 (set_attr "type" "fdivs")]
1019 (define_insn "*sqrtdf2_vfp"
1020 [(set (match_operand:DF 0 "s_register_operand" "=w")
1021 (sqrt:DF (match_operand:DF 1 "s_register_operand" "w")))]
1022 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
1023 "fsqrtd%?\\t%P0, %P1"
1024 [(set_attr "predicable" "yes")
1025 (set_attr "type" "fdivd")]
1029 ;; Patterns to split/copy vfp condition flags.
1031 (define_insn "*movcc_vfp"
1032 [(set (reg CC_REGNUM)
1033 (reg VFPCC_REGNUM))]
1034 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
1036 [(set_attr "conds" "set")
1037 (set_attr "type" "f_flag")]
1040 (define_insn_and_split "*cmpsf_split_vfp"
1041 [(set (reg:CCFP CC_REGNUM)
1042 (compare:CCFP (match_operand:SF 0 "s_register_operand" "t")
1043 (match_operand:SF 1 "vfp_compare_operand" "tG")))]
1044 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
1046 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
1047 [(set (reg:CCFP VFPCC_REGNUM)
1048 (compare:CCFP (match_dup 0)
1050 (set (reg:CCFP CC_REGNUM)
1051 (reg:CCFP VFPCC_REGNUM))]
1055 (define_insn_and_split "*cmpsf_trap_split_vfp"
1056 [(set (reg:CCFPE CC_REGNUM)
1057 (compare:CCFPE (match_operand:SF 0 "s_register_operand" "t")
1058 (match_operand:SF 1 "vfp_compare_operand" "tG")))]
1059 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
1061 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
1062 [(set (reg:CCFPE VFPCC_REGNUM)
1063 (compare:CCFPE (match_dup 0)
1065 (set (reg:CCFPE CC_REGNUM)
1066 (reg:CCFPE VFPCC_REGNUM))]
1070 (define_insn_and_split "*cmpdf_split_vfp"
1071 [(set (reg:CCFP CC_REGNUM)
1072 (compare:CCFP (match_operand:DF 0 "s_register_operand" "w")
1073 (match_operand:DF 1 "vfp_compare_operand" "wG")))]
1074 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
1076 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
1077 [(set (reg:CCFP VFPCC_REGNUM)
1078 (compare:CCFP (match_dup 0)
1080 (set (reg:CCFP CC_REGNUM)
1081 (reg:CCFP VFPCC_REGNUM))]
1085 (define_insn_and_split "*cmpdf_trap_split_vfp"
1086 [(set (reg:CCFPE CC_REGNUM)
1087 (compare:CCFPE (match_operand:DF 0 "s_register_operand" "w")
1088 (match_operand:DF 1 "vfp_compare_operand" "wG")))]
1089 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
1091 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
1092 [(set (reg:CCFPE VFPCC_REGNUM)
1093 (compare:CCFPE (match_dup 0)
1095 (set (reg:CCFPE CC_REGNUM)
1096 (reg:CCFPE VFPCC_REGNUM))]
1101 ;; Comparison patterns
1103 (define_insn "*cmpsf_vfp"
1104 [(set (reg:CCFP VFPCC_REGNUM)
1105 (compare:CCFP (match_operand:SF 0 "s_register_operand" "t,t")
1106 (match_operand:SF 1 "vfp_compare_operand" "t,G")))]
1107 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
1111 [(set_attr "predicable" "yes")
1112 (set_attr "type" "fcmps")]
1115 (define_insn "*cmpsf_trap_vfp"
1116 [(set (reg:CCFPE VFPCC_REGNUM)
1117 (compare:CCFPE (match_operand:SF 0 "s_register_operand" "t,t")
1118 (match_operand:SF 1 "vfp_compare_operand" "t,G")))]
1119 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
1123 [(set_attr "predicable" "yes")
1124 (set_attr "type" "fcmps")]
1127 (define_insn "*cmpdf_vfp"
1128 [(set (reg:CCFP VFPCC_REGNUM)
1129 (compare:CCFP (match_operand:DF 0 "s_register_operand" "w,w")
1130 (match_operand:DF 1 "vfp_compare_operand" "w,G")))]
1131 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
1135 [(set_attr "predicable" "yes")
1136 (set_attr "type" "fcmpd")]
1139 (define_insn "*cmpdf_trap_vfp"
1140 [(set (reg:CCFPE VFPCC_REGNUM)
1141 (compare:CCFPE (match_operand:DF 0 "s_register_operand" "w,w")
1142 (match_operand:DF 1 "vfp_compare_operand" "w,G")))]
1143 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
1147 [(set_attr "predicable" "yes")
1148 (set_attr "type" "fcmpd")]
1151 ;; Fixed point to floating point conversions.
1152 (define_code_iterator FCVT [unsigned_float float])
1153 (define_code_attr FCVTI32typename [(unsigned_float "u32") (float "s32")])
1155 (define_insn "*combine_vcvt_f32_<FCVTI32typename>"
1156 [(set (match_operand:SF 0 "s_register_operand" "=t")
1157 (mult:SF (FCVT:SF (match_operand:SI 1 "s_register_operand" "0"))
1159 "const_double_vcvt_power_of_two_reciprocal" "Dt")))]
1160 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP3 && !flag_rounding_math"
1161 "vcvt.f32.<FCVTI32typename>\\t%0, %1, %v2"
1162 [(set_attr "predicable" "no")
1163 (set_attr "type" "f_cvt")]
1166 ;; Not the ideal way of implementing this. Ideally we would be able to split
1167 ;; this into a move to a DP register and then a vcvt.f64.i32
1168 (define_insn "*combine_vcvt_f64_<FCVTI32typename>"
1169 [(set (match_operand:DF 0 "s_register_operand" "=x,x,w")
1170 (mult:DF (FCVT:DF (match_operand:SI 1 "s_register_operand" "r,t,r"))
1172 "const_double_vcvt_power_of_two_reciprocal" "Dt,Dt,Dt")))]
1173 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP3 && !flag_rounding_math
1174 && !TARGET_VFP_SINGLE"
1176 vmov.f32\\t%0, %1\;vcvt.f64.<FCVTI32typename>\\t%P0, %P0, %v2
1177 vmov.f32\\t%0, %1\;vcvt.f64.<FCVTI32typename>\\t%P0, %P0, %v2
1178 vmov.f64\\t%P0, %1, %1\;vcvt.f64.<FCVTI32typename>\\t%P0, %P0, %v2"
1179 [(set_attr "predicable" "no")
1180 (set_attr "type" "f_cvt")
1181 (set_attr "length" "8")]
1184 ;; Store multiple insn used in function prologue.
1185 (define_insn "*push_multi_vfp"
1186 [(match_parallel 2 "multi_register_push"
1187 [(set (match_operand:BLK 0 "memory_operand" "=m")
1188 (unspec:BLK [(match_operand:DF 1 "vfp_register_operand" "")]
1189 UNSPEC_PUSH_MULT))])]
1190 "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
1191 "* return vfp_output_fstmd (operands);"
1192 [(set_attr "type" "f_stored")]
1196 ;; Unimplemented insns:
1199 ;; fmdhr et al (VFPv1)
1200 ;; Support for xD (single precision only) variants.