1 ;; Instruction Classification for ARM for GNU compiler.
3 ;; Copyright (C) 1991-2013 Free Software Foundation, Inc.
4 ;; Contributed by ARM Ltd.
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
10 ;; by the Free Software Foundation; either version 3, or (at your
11 ;; option) any later version.
13 ;; GCC is distributed in the hope that it will be useful, but WITHOUT
14 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16 ;; 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 ; TYPE attribute is used to classify instructions for use in scheduling.
24 ; Instruction classification:
26 ; arlo_imm any arithmetic or logical instruction that doesn't have
27 ; a shifted operand and has an immediate operand. This
28 ; excludes MOV, MVN and RSB(S) immediate.
29 ; arlo_reg any arithmetic or logical instruction that doesn't have
30 ; a shifted or an immediate operand. This excludes
31 ; MOV and MVN but includes MOVT. This is also the default.
32 ; arlo_shift any arithmetic or logical instruction that has a source
33 ; operand shifted by a constant. This excludes
35 ; arlo_shift_reg as arlo_shift, with the shift amount specified in a
37 ; block blockage insn, this blocks all functional units.
39 ; call subroutine call.
40 ; clz count leading zeros (CLZ).
41 ; extend extend instruction (SXTB, SXTH, UXTB, UXTH).
42 ; f_cvt conversion between float and integral.
43 ; f_flag transfer of co-processor flags to the CPSR.
44 ; f_load[d,s] double/single load from memory. Used for VFP unit.
45 ; f_mcr transfer arm to vfp reg.
46 ; f_mcrr transfer two arm regs to vfp reg.
47 ; f_minmax[d,s] double/single floating point minimum/maximum.
48 ; f_mrc transfer vfp to arm reg.
49 ; f_mrrc transfer vfp to two arm regs.
50 ; f_rint[d,s] double/single floating point rount to integral.
51 ; f_sel[d,s] double/single floating byte select.
52 ; f_store[d,s] double/single store to memory. Used for VFP unit.
53 ; fadd[d,s] double/single floating-point scalar addition.
54 ; fcmp[d,s] double/single floating-point compare.
55 ; fconst[d,s] double/single load immediate.
56 ; fcpys single precision floating point cpy.
57 ; fdiv[d,s] double/single precision floating point division.
58 ; ffarith[d,s] double/single floating point abs/neg/cpy.
59 ; ffma[d,s] double/single floating point fused multiply-accumulate.
60 ; float floating point arithmetic operation.
61 ; fmac[d,s] double/single floating point multiply-accumulate.
62 ; fmul[d,s] double/single floating point multiply.
63 ; load_acq load-acquire.
64 ; load_byte load byte(s) from memory to arm registers.
65 ; load1 load 1 word from memory to arm registers.
66 ; load2 load 2 words from memory to arm registers.
67 ; load3 load 3 words from memory to arm registers.
68 ; load4 load 4 words from memory to arm registers.
69 ; mla integer multiply accumulate.
70 ; mlas integer multiply accumulate, flag setting.
71 ; mov_imm simple MOV instruction that moves an immediate to
72 ; register. This includes MOVW, but not MOVT.
73 ; mov_reg simple MOV instruction that moves a register to another
74 ; register. This includes MOVW, but not MOVT.
75 ; mov_shift simple MOV instruction, shifted operand by a constant.
76 ; mov_shift_reg simple MOV instruction, shifted operand by a register.
77 ; mul integer multiply.
78 ; muls integer multiply, flag setting.
79 ; mvn_imm inverting move instruction, immediate.
80 ; mvn_reg inverting move instruction, register.
81 ; mvn_shift inverting move instruction, shifted operand by a constant.
82 ; mvn_shift_reg inverting move instruction, shifted operand by a register.
83 ; sdiv signed division.
84 ; shift simple shift operation (LSL, LSR, ASR, ROR) with an
86 ; shift_reg simple shift by a register.
87 ; smlad signed multiply accumulate dual.
88 ; smladx signed multiply accumulate dual reverse.
89 ; smlal signed multiply accumulate long.
90 ; smlald signed multiply accumulate long dual.
91 ; smlals signed multiply accumulate long, flag setting.
92 ; smlalxy signed multiply accumulate, 16x16-bit, 64-bit accumulate.
93 ; smlawx signed multiply accumulate, 32x16-bit, 32-bit accumulate.
94 ; smlawy signed multiply accumulate wide, 32x16-bit,
96 ; smlaxy signed multiply accumulate, 16x16-bit, 32-bit accumulate.
97 ; smlsd signed multiply subtract dual.
98 ; smlsdx signed multiply subtract dual reverse.
99 ; smlsld signed multiply subtract long dual.
100 ; smmla signed most significant word multiply accumulate.
101 ; smmul signed most significant word multiply.
102 ; smmulr signed most significant word multiply, rounded.
103 ; smuad signed dual multiply add.
104 ; smuadx signed dual multiply add reverse.
105 ; smull signed multiply long.
106 ; smulls signed multiply long, flag setting.
107 ; smulwy signed multiply wide, 32x16-bit, 32-bit accumulate.
108 ; smulxy signed multiply, 16x16-bit, 32-bit accumulate.
109 ; smusd signed dual multiply subtract.
110 ; smusdx signed dual multiply subtract reverse.
111 ; store_rel store-release.
112 ; store1 store 1 word to memory from arm registers.
113 ; store2 store 2 words to memory from arm registers.
114 ; store3 store 3 words to memory from arm registers.
115 ; store4 store 4 (or more) words to memory from arm registers.
116 ; udiv unsigned division.
117 ; umaal unsigned multiply accumulate accumulate long.
118 ; umlal unsigned multiply accumulate long.
119 ; umlals unsigned multiply accumulate long, flag setting.
120 ; umull unsigned multiply long.
121 ; umulls unsigned multiply long, flag setting.
123 ; The classification below is for instructions used by the Wireless MMX
124 ; Technology. Each attribute value is used to classify an instruction of the
125 ; same name or family.
187 ; The classification below is for NEON instructions.
192 ; neon_fp_vadd_ddd_vabs_dd
193 ; neon_fp_vadd_qqq_vabs_qq
194 ; neon_fp_vmla_ddd_scalar
196 ; neon_fp_vmla_qqq_scalar
200 ; neon_fp_vrecps_vrsqrts_ddd
201 ; neon_fp_vrecps_vrsqrts_qqq
212 ; neon_mla_ddd_16_scalar_qdd_32_16_long_scalar
213 ; neon_mla_ddd_32_qqd_16_ddd_32_scalar_qdd_64_32_long_scalar_qdd_64_32_long
214 ; neon_mla_ddd_8_16_qdd_16_8_long_32_16_long
215 ; neon_mla_qqq_32_qqd_32_scalar
219 ; neon_mul_ddd_16_scalar_32_16_long_scalar
220 ; neon_mul_ddd_8_16_qdd_16_8_long_32_16_long
221 ; neon_mul_qdd_64_32_long_qqd_16_ddd_32_scalar_64_32_long_scalar
222 ; neon_mul_qqd_32_scalar
223 ; neon_mul_qqq_8_16_32_ddd_32
233 ; neon_vld1_vld2_lane
234 ; neon_vld2_2_regs_vld1_vld2_all_lanes
236 ; neon_vld3_vld4_all_lanes
237 ; neon_vld3_vld4_lane
241 ; neon_vqshl_vrshl_vqrshl_qqq
245 ; neon_vst1_1_2_regs_vst2_2_regs
247 ; neon_vst1_vst2_lane
248 ; neon_vst2_4_regs_vst3_vst4
249 ; neon_vst3_vst4_lane
413 neon_fp_vadd_ddd_vabs_dd,\
414 neon_fp_vadd_qqq_vabs_qq,\
415 neon_fp_vmla_ddd_scalar,\
417 neon_fp_vmla_qqq_scalar,\
421 neon_fp_vrecps_vrsqrts_ddd,\
422 neon_fp_vrecps_vrsqrts_qqq,\
433 neon_mla_ddd_16_scalar_qdd_32_16_long_scalar,\
434 neon_mla_ddd_32_qqd_16_ddd_32_scalar_qdd_64_32_long_scalar_qdd_64_32_long,\
435 neon_mla_ddd_8_16_qdd_16_8_long_32_16_long,\
436 neon_mla_qqq_32_qqd_32_scalar,\
440 neon_mul_ddd_16_scalar_32_16_long_scalar,\
441 neon_mul_ddd_8_16_qdd_16_8_long_32_16_long,\
442 neon_mul_qdd_64_32_long_qqd_16_ddd_32_scalar_64_32_long_scalar,\
443 neon_mul_qqd_32_scalar,\
444 neon_mul_qqq_8_16_32_ddd_32,\
454 neon_vld1_vld2_lane,\
455 neon_vld2_2_regs_vld1_vld2_all_lanes,\
457 neon_vld3_vld4_all_lanes,\
458 neon_vld3_vld4_lane,\
462 neon_vqshl_vrshl_vqrshl_qqq,\
466 neon_vst1_1_2_regs_vst2_2_regs,\
468 neon_vst1_vst2_lane,\
469 neon_vst2_4_regs_vst3_vst4,\
470 neon_vst3_vst4_lane,\
472 (const_string "arlo_reg"))
474 ; Is this an (integer side) multiply with a 32-bit (or smaller) result?
475 (define_attr "mul32" "no,yes"
478 "smulxy,smlaxy,smulwy,smlawx,mul,muls,mla,mlas,smlawy,smuad,smuadx,\
479 smlad,smladx,smusd,smusdx,smlsd,smlsdx,smmul,smmulr,smmla,smlald,smlsld")
481 (const_string "no")))
483 ; Is this an (integer side) multiply with a 64-bit result?
484 (define_attr "mul64" "no,yes"
487 "smlalxy,umull,umulls,umaal,umlal,umlals,smull,smulls,smlal,smlals")
489 (const_string "no")))