comparison gcc/config/arm/iterators.md @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 ;; Code and mode itertator and attribute definitions for the ARM backend 1 ;; Code and mode itertator and attribute definitions for the ARM backend
2 ;; Copyright (C) 2010-2017 Free Software Foundation, Inc. 2 ;; Copyright (C) 2010-2018 Free Software Foundation, Inc.
3 ;; Contributed by ARM Ltd. 3 ;; Contributed by ARM Ltd.
4 ;; 4 ;;
5 ;; This file is part of GCC. 5 ;; This file is part of GCC.
6 ;; 6 ;;
7 ;; GCC is free software; you can redistribute it and/or modify it 7 ;; GCC is free software; you can redistribute it and/or modify it
117 (define_mode_iterator VN [V8HI V4SI V2DI]) 117 (define_mode_iterator VN [V8HI V4SI V2DI])
118 118
119 ;; All supported vector modes (except singleton DImode). 119 ;; All supported vector modes (except singleton DImode).
120 (define_mode_iterator VDQ [V8QI V16QI V4HI V8HI V2SI V4SI V4HF V8HF V2SF V4SF V2DI]) 120 (define_mode_iterator VDQ [V8QI V16QI V4HI V8HI V2SI V4SI V4HF V8HF V2SF V4SF V2DI])
121 121
122 ;; All supported floating-point vector modes (except V2DF).
123 (define_mode_iterator VF [(V4HF "TARGET_NEON_FP16INST")
124 (V8HF "TARGET_NEON_FP16INST") V2SF V4SF])
125
122 ;; All supported vector modes (except those with 64-bit integer elements). 126 ;; All supported vector modes (except those with 64-bit integer elements).
123 (define_mode_iterator VDQW [V8QI V16QI V4HI V8HI V2SI V4SI V2SF V4SF]) 127 (define_mode_iterator VDQW [V8QI V16QI V4HI V8HI V2SI V4SI V2SF V4SF])
124 128
125 ;; All supported vector modes including 16-bit float modes. 129 ;; All supported vector modes including 16-bit float modes.
126 (define_mode_iterator VDQWH [V8QI V16QI V4HI V8HI V2SI V4SI V2SF V4SF 130 (define_mode_iterator VDQWH [V8QI V16QI V4HI V8HI V2SI V4SI V2SF V4SF
244 ;; Binary operators whose second operand can be shifted. 248 ;; Binary operators whose second operand can be shifted.
245 (define_code_iterator SHIFTABLE_OPS [plus minus ior xor and]) 249 (define_code_iterator SHIFTABLE_OPS [plus minus ior xor and])
246 250
247 ;; Operations on the sign of a number. 251 ;; Operations on the sign of a number.
248 (define_code_iterator ABSNEG [abs neg]) 252 (define_code_iterator ABSNEG [abs neg])
253
254 ;; The PLUS and MINUS operators.
255 (define_code_iterator PLUSMINUS [plus minus])
249 256
250 ;; Conversions. 257 ;; Conversions.
251 (define_code_iterator FCVT [unsigned_float float]) 258 (define_code_iterator FCVT [unsigned_float float])
252 259
253 ;; plus and minus are the only SHIFTABLE_OPS for which Thumb2 allows 260 ;; plus and minus are the only SHIFTABLE_OPS for which Thumb2 allows
264 (define_code_attr cmp_op [(eq "eq") (gt "gt") (ge "ge") (lt "lt") (le "le") 271 (define_code_attr cmp_op [(eq "eq") (gt "gt") (ge "ge") (lt "lt") (le "le")
265 (gtu "gt") (geu "ge")]) 272 (gtu "gt") (geu "ge")])
266 273
267 (define_code_attr cmp_type [(eq "i") (gt "s") (ge "s") (lt "s") (le "s")]) 274 (define_code_attr cmp_type [(eq "i") (gt "s") (ge "s") (lt "s") (le "s")])
268 275
276 (define_code_attr vfml_op [(plus "a") (minus "s")])
277
269 ;;---------------------------------------------------------------------------- 278 ;;----------------------------------------------------------------------------
270 ;; Int iterators 279 ;; Int iterators
271 ;;---------------------------------------------------------------------------- 280 ;;----------------------------------------------------------------------------
272 281
273 (define_int_iterator VRINT [UNSPEC_VRINTZ UNSPEC_VRINTP UNSPEC_VRINTM 282 (define_int_iterator VRINT [UNSPEC_VRINTZ UNSPEC_VRINTP UNSPEC_VRINTM
409 (define_int_iterator VQRDMLH_AS [UNSPEC_VQRDMLAH UNSPEC_VQRDMLSH]) 418 (define_int_iterator VQRDMLH_AS [UNSPEC_VQRDMLAH UNSPEC_VQRDMLSH])
410 419
411 (define_int_iterator VFM_LANE_AS [UNSPEC_VFMA_LANE UNSPEC_VFMS_LANE]) 420 (define_int_iterator VFM_LANE_AS [UNSPEC_VFMA_LANE UNSPEC_VFMS_LANE])
412 421
413 (define_int_iterator DOTPROD [UNSPEC_DOT_S UNSPEC_DOT_U]) 422 (define_int_iterator DOTPROD [UNSPEC_DOT_S UNSPEC_DOT_U])
423
424 (define_int_iterator VFMLHALVES [UNSPEC_VFML_LO UNSPEC_VFML_HI])
414 425
415 ;;---------------------------------------------------------------------------- 426 ;;----------------------------------------------------------------------------
416 ;; Mode attributes 427 ;; Mode attributes
417 ;;---------------------------------------------------------------------------- 428 ;;----------------------------------------------------------------------------
418 429
469 (V4HF "SF") (V8HF "SF") 480 (V4HF "SF") (V8HF "SF")
470 (V2SI "V2SI") (V4SI "V2SI") 481 (V2SI "V2SI") (V4SI "V2SI")
471 (V2SF "V2SF") (V4SF "V2SF") 482 (V2SF "V2SF") (V4SF "V2SF")
472 (DI "V2DI") (V2DI "V2DI")]) 483 (DI "V2DI") (V2DI "V2DI")])
473 484
485 ;; Mode mapping for VFM[A,S]L instructions.
486 (define_mode_attr VFML [(V2SF "V4HF") (V4SF "V8HF")])
487
488 ;; Mode mapping for VFM[A,S]L instructions for the vec_select result.
489 (define_mode_attr VFMLSEL [(V2SF "V2HF") (V4SF "V4HF")])
490
491 ;; Mode mapping for VFM[A,S]L instructions for some awkward lane-wise forms.
492 (define_mode_attr VFMLSEL2 [(V2SF "V8HF") (V4SF "V4HF")])
493
494 ;; Same as the above, but lowercase.
495 (define_mode_attr vfmlsel2 [(V2SF "v8hf") (V4SF "v4hf")])
496
474 ;; Similar, for three elements. 497 ;; Similar, for three elements.
475 (define_mode_attr V_three_elem [(V8QI "BLK") (V16QI "BLK") 498 (define_mode_attr V_three_elem [(V8QI "BLK") (V16QI "BLK")
476 (V4HI "BLK") (V8HI "BLK") 499 (V4HI "BLK") (V8HI "BLK")
477 (V4HF "BLK") (V8HF "BLK") 500 (V4HF "BLK") (V8HF "BLK")
478 (V2SI "BLK") (V4SI "BLK") 501 (V2SI "BLK") (V4SI "BLK")
492 (V4HI "P") (V8HI "q") 515 (V4HI "P") (V8HI "q")
493 (V4HF "P") (V8HF "q") 516 (V4HF "P") (V8HF "q")
494 (V2SI "P") (V4SI "q") 517 (V2SI "P") (V4SI "q")
495 (V2SF "P") (V4SF "q") 518 (V2SF "P") (V4SF "q")
496 (DI "P") (V2DI "q") 519 (DI "P") (V2DI "q")
497 (SF "") (DF "P") 520 (V2HF "") (SF "")
498 (HF "")]) 521 (DF "P") (HF "")])
522
523 ;; Output template to select the high VFP register of a mult-register value.
524 (define_mode_attr V_hi [(V2SF "p") (V4SF "f")])
525
526 ;; Output template to select the low VFP register of a mult-register value.
527 (define_mode_attr V_lo [(V2SF "") (V4SF "e")])
528
529 ;; Helper attribute for printing output templates for awkward forms of
530 ;; vfmlal/vfmlsl intrinsics.
531 (define_mode_attr V_lane_reg [(V2SF "") (V4SF "P")])
499 532
500 ;; Wider modes with the same number of elements. 533 ;; Wider modes with the same number of elements.
501 (define_mode_attr V_widen [(V8QI "V8HI") (V4HI "V4SI") (V2SI "V2DI")]) 534 (define_mode_attr V_widen [(V8QI "V8HI") (V4HI "V4SI") (V2SI "V2DI")])
502 535
503 ;; Narrower modes with the same number of elements. 536 ;; Narrower modes with the same number of elements.
706 739
707 ;; Mode attributes used for VFP support. 740 ;; Mode attributes used for VFP support.
708 (define_mode_attr F_constraint [(SF "t") (DF "w")]) 741 (define_mode_attr F_constraint [(SF "t") (DF "w")])
709 (define_mode_attr vfp_type [(SF "s") (DF "d")]) 742 (define_mode_attr vfp_type [(SF "s") (DF "d")])
710 (define_mode_attr vfp_double_cond [(SF "") (DF "&& TARGET_VFP_DOUBLE")]) 743 (define_mode_attr vfp_double_cond [(SF "") (DF "&& TARGET_VFP_DOUBLE")])
744 (define_mode_attr VF_constraint [(V2SF "t") (V4SF "w")])
711 745
712 ;; Mode attribute used to build the "type" attribute. 746 ;; Mode attribute used to build the "type" attribute.
713 (define_mode_attr q [(V8QI "") (V16QI "_q") 747 (define_mode_attr q [(V8QI "") (V16QI "_q")
714 (V4HI "") (V8HI "_q") 748 (V4HI "") (V8HI "_q")
715 (V2SI "") (V4SI "_q") 749 (V2SI "") (V4SI "_q")
822 (UNSPEC_VRSRA_S_N "s") (UNSPEC_VRSRA_U_N "u") 856 (UNSPEC_VRSRA_S_N "s") (UNSPEC_VRSRA_U_N "u")
823 (UNSPEC_VCVTH_S "s") (UNSPEC_VCVTH_U "u") 857 (UNSPEC_VCVTH_S "s") (UNSPEC_VCVTH_U "u")
824 (UNSPEC_DOT_S "s") (UNSPEC_DOT_U "u") 858 (UNSPEC_DOT_S "s") (UNSPEC_DOT_U "u")
825 ]) 859 ])
826 860
861 (define_int_attr vfml_half
862 [(UNSPEC_VFML_HI "high") (UNSPEC_VFML_LO "low")])
863
864 (define_int_attr vfml_half_selector
865 [(UNSPEC_VFML_HI "true") (UNSPEC_VFML_LO "false")])
866
827 (define_int_attr vcvth_op 867 (define_int_attr vcvth_op
828 [(UNSPEC_VCVTA_S "a") (UNSPEC_VCVTA_U "a") 868 [(UNSPEC_VCVTA_S "a") (UNSPEC_VCVTA_U "a")
829 (UNSPEC_VCVTM_S "m") (UNSPEC_VCVTM_U "m") 869 (UNSPEC_VCVTM_S "m") (UNSPEC_VCVTM_U "m")
830 (UNSPEC_VCVTN_S "n") (UNSPEC_VCVTN_U "n") 870 (UNSPEC_VCVTN_S "n") (UNSPEC_VCVTN_U "n")
831 (UNSPEC_VCVTP_S "p") (UNSPEC_VCVTP_U "p")]) 871 (UNSPEC_VCVTP_S "p") (UNSPEC_VCVTP_U "p")])