]>
Commit | Line | Data |
---|---|---|
625e3dd4 PM |
1 | # AArch32 Neon data-processing instruction descriptions |
2 | # | |
3 | # Copyright (c) 2020 Linaro, Ltd | |
4 | # | |
5 | # This library is free software; you can redistribute it and/or | |
6 | # modify it under the terms of the GNU Lesser General Public | |
7 | # License as published by the Free Software Foundation; either | |
8 | # version 2 of the License, or (at your option) any later version. | |
9 | # | |
10 | # This library is distributed in the hope that it will be useful, | |
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | # Lesser General Public License for more details. | |
14 | # | |
15 | # You should have received a copy of the GNU Lesser General Public | |
16 | # License along with this library; if not, see <http://www.gnu.org/licenses/>. | |
17 | ||
18 | # | |
19 | # This file is processed by scripts/decodetree.py | |
20 | # | |
a4e143ac PM |
21 | # VFP/Neon register fields; same as vfp.decode |
22 | %vm_dp 5:1 0:4 | |
23 | %vn_dp 7:1 16:4 | |
24 | %vd_dp 22:1 12:4 | |
625e3dd4 PM |
25 | |
26 | # Encodings for Neon data processing instructions where the T32 encoding | |
27 | # is a simple transformation of the A32 encoding. | |
28 | # More specifically, this file covers instructions where the A32 encoding is | |
29 | # 0b1111_001p_qqqq_qqqq_qqqq_qqqq_qqqq_qqqq | |
30 | # and the T32 encoding is | |
31 | # 0b111p_1111_qqqq_qqqq_qqqq_qqqq_qqqq_qqqq | |
32 | # This file works on the A32 encoding only; calling code for T32 has to | |
33 | # transform the insn into the A32 version first. | |
a4e143ac PM |
34 | |
35 | ###################################################################### | |
36 | # 3-reg-same grouping: | |
37 | # 1111 001 U 0 D sz:2 Vn:4 Vd:4 opc:4 N Q M op Vm:4 | |
38 | ###################################################################### | |
39 | ||
40 | &3same vm vn vd q size | |
41 | ||
42 | @3same .... ... . . . size:2 .... .... .... . q:1 . . .... \ | |
43 | &3same vm=%vm_dp vn=%vn_dp vd=%vd_dp | |
44 | ||
059c2398 PM |
45 | @3same_q0 .... ... . . . size:2 .... .... .... . 0 . . .... \ |
46 | &3same vm=%vm_dp vn=%vn_dp vd=%vd_dp q=0 | |
47 | ||
cb294bca PM |
48 | VHADD_S_3s 1111 001 0 0 . .. .... .... 0000 . . . 0 .... @3same |
49 | VHADD_U_3s 1111 001 1 0 . .. .... .... 0000 . . . 0 .... @3same | |
7a9497f1 PM |
50 | VQADD_S_3s 1111 001 0 0 . .. .... .... 0000 . . . 1 .... @3same |
51 | VQADD_U_3s 1111 001 1 0 . .. .... .... 0000 . . . 1 .... @3same | |
52 | ||
8e44d03f PM |
53 | VRHADD_S_3s 1111 001 0 0 . .. .... .... 0001 . . . 0 .... @3same |
54 | VRHADD_U_3s 1111 001 1 0 . .. .... .... 0001 . . . 0 .... @3same | |
55 | ||
35a548ed PM |
56 | @3same_logic .... ... . . . .. .... .... .... . q:1 .. .... \ |
57 | &3same vm=%vm_dp vn=%vn_dp vd=%vd_dp size=0 | |
58 | ||
59 | VAND_3s 1111 001 0 0 . 00 .... .... 0001 ... 1 .... @3same_logic | |
60 | VBIC_3s 1111 001 0 0 . 01 .... .... 0001 ... 1 .... @3same_logic | |
61 | VORR_3s 1111 001 0 0 . 10 .... .... 0001 ... 1 .... @3same_logic | |
62 | VORN_3s 1111 001 0 0 . 11 .... .... 0001 ... 1 .... @3same_logic | |
63 | VEOR_3s 1111 001 1 0 . 00 .... .... 0001 ... 1 .... @3same_logic | |
64 | VBSL_3s 1111 001 1 0 . 01 .... .... 0001 ... 1 .... @3same_logic | |
65 | VBIT_3s 1111 001 1 0 . 10 .... .... 0001 ... 1 .... @3same_logic | |
66 | VBIF_3s 1111 001 1 0 . 11 .... .... 0001 ... 1 .... @3same_logic | |
67 | ||
8e44d03f PM |
68 | VHSUB_S_3s 1111 001 0 0 . .. .... .... 0010 . . . 0 .... @3same |
69 | VHSUB_U_3s 1111 001 1 0 . .. .... .... 0010 . . . 0 .... @3same | |
70 | ||
7a9497f1 PM |
71 | VQSUB_S_3s 1111 001 0 0 . .. .... .... 0010 . . . 1 .... @3same |
72 | VQSUB_U_3s 1111 001 1 0 . .. .... .... 0010 . . . 1 .... @3same | |
73 | ||
02bd0cdb PM |
74 | VCGT_S_3s 1111 001 0 0 . .. .... .... 0011 . . . 0 .... @3same |
75 | VCGT_U_3s 1111 001 1 0 . .. .... .... 0011 . . . 0 .... @3same | |
76 | VCGE_S_3s 1111 001 0 0 . .. .... .... 0011 . . . 1 .... @3same | |
77 | VCGE_U_3s 1111 001 1 0 . .. .... .... 0011 . . . 1 .... @3same | |
78 | ||
e9eee531 RH |
79 | # The _rev suffix indicates that Vn and Vm are reversed. This is |
80 | # the case for shifts. In the Arm ARM these insns are documented | |
81 | # with the Vm and Vn fields in their usual places, but in the | |
82 | # assembly the operands are listed "backwards", ie in the order | |
83 | # Dd, Dm, Dn where other insns use Dd, Dn, Dm. For QEMU we choose | |
84 | # to consider Vm and Vn as being in different fields in the insn, | |
85 | # which allows us to avoid special-casing shifts in the trans_ | |
86 | # function code. We would otherwise need to manually swap the operands | |
87 | # over to call Neon helper functions that are shared with AArch64, | |
88 | # which does not have this odd reversed-operand situation. | |
89 | @3same_rev .... ... . . . size:2 .... .... .... . q:1 . . .... \ | |
90 | &3same vn=%vm_dp vm=%vn_dp vd=%vd_dp | |
91 | ||
92 | VSHL_S_3s 1111 001 0 0 . .. .... .... 0100 . . . 0 .... @3same_rev | |
93 | VSHL_U_3s 1111 001 1 0 . .. .... .... 0100 . . . 0 .... @3same_rev | |
0de34fd4 | 94 | |
35d4352f PM |
95 | # Insns operating on 64-bit elements (size!=0b11 handled elsewhere) |
96 | # The _rev suffix indicates that Vn and Vm are reversed (as explained | |
97 | # by the comment for the @3same_rev format). | |
98 | @3same_64_rev .... ... . . . 11 .... .... .... . q:1 . . .... \ | |
99 | &3same vm=%vn_dp vn=%vm_dp vd=%vd_dp size=3 | |
100 | ||
6812dfdc PM |
101 | { |
102 | VQSHL_S64_3s 1111 001 0 0 . .. .... .... 0100 . . . 1 .... @3same_64_rev | |
103 | VQSHL_S_3s 1111 001 0 0 . .. .... .... 0100 . . . 1 .... @3same_rev | |
104 | } | |
105 | { | |
106 | VQSHL_U64_3s 1111 001 1 0 . .. .... .... 0100 . . . 1 .... @3same_64_rev | |
107 | VQSHL_U_3s 1111 001 1 0 . .. .... .... 0100 . . . 1 .... @3same_rev | |
108 | } | |
109 | { | |
110 | VRSHL_S64_3s 1111 001 0 0 . .. .... .... 0101 . . . 0 .... @3same_64_rev | |
111 | VRSHL_S_3s 1111 001 0 0 . .. .... .... 0101 . . . 0 .... @3same_rev | |
112 | } | |
113 | { | |
114 | VRSHL_U64_3s 1111 001 1 0 . .. .... .... 0101 . . . 0 .... @3same_64_rev | |
115 | VRSHL_U_3s 1111 001 1 0 . .. .... .... 0101 . . . 0 .... @3same_rev | |
116 | } | |
117 | { | |
118 | VQRSHL_S64_3s 1111 001 0 0 . .. .... .... 0101 . . . 1 .... @3same_64_rev | |
119 | VQRSHL_S_3s 1111 001 0 0 . .. .... .... 0101 . . . 1 .... @3same_rev | |
120 | } | |
121 | { | |
122 | VQRSHL_U64_3s 1111 001 1 0 . .. .... .... 0101 . . . 1 .... @3same_64_rev | |
123 | VQRSHL_U_3s 1111 001 1 0 . .. .... .... 0101 . . . 1 .... @3same_rev | |
124 | } | |
35d4352f | 125 | |
36b59310 PM |
126 | VMAX_S_3s 1111 001 0 0 . .. .... .... 0110 . . . 0 .... @3same |
127 | VMAX_U_3s 1111 001 1 0 . .. .... .... 0110 . . . 0 .... @3same | |
128 | VMIN_S_3s 1111 001 0 0 . .. .... .... 0110 . . . 1 .... @3same | |
129 | VMIN_U_3s 1111 001 1 0 . .. .... .... 0110 . . . 1 .... @3same | |
130 | ||
7715098f PM |
131 | VABD_S_3s 1111 001 0 0 . .. .... .... 0111 . . . 0 .... @3same |
132 | VABD_U_3s 1111 001 1 0 . .. .... .... 0111 . . . 0 .... @3same | |
133 | ||
134 | VABA_S_3s 1111 001 0 0 . .. .... .... 0111 . . . 1 .... @3same | |
135 | VABA_U_3s 1111 001 1 0 . .. .... .... 0111 . . . 1 .... @3same | |
136 | ||
a4e143ac PM |
137 | VADD_3s 1111 001 0 0 . .. .... .... 1000 . . . 0 .... @3same |
138 | VSUB_3s 1111 001 1 0 . .. .... .... 1000 . . . 0 .... @3same | |
02bd0cdb PM |
139 | |
140 | VTST_3s 1111 001 0 0 . .. .... .... 1000 . . . 1 .... @3same | |
141 | VCEQ_3s 1111 001 1 0 . .. .... .... 1000 . . . 1 .... @3same | |
0de34fd4 PM |
142 | |
143 | VMLA_3s 1111 001 0 0 . .. .... .... 1001 . . . 0 .... @3same | |
144 | VMLS_3s 1111 001 1 0 . .. .... .... 1001 . . . 0 .... @3same | |
145 | ||
146 | VMUL_3s 1111 001 0 0 . .. .... .... 1001 . . . 1 .... @3same | |
147 | VMUL_p_3s 1111 001 1 0 . .. .... .... 1001 . . . 1 .... @3same | |
a0635695 | 148 | |
059c2398 PM |
149 | VPMAX_S_3s 1111 001 0 0 . .. .... .... 1010 . . . 0 .... @3same_q0 |
150 | VPMAX_U_3s 1111 001 1 0 . .. .... .... 1010 . . . 0 .... @3same_q0 | |
151 | ||
152 | VPMIN_S_3s 1111 001 0 0 . .. .... .... 1010 . . . 1 .... @3same_q0 | |
153 | VPMIN_U_3s 1111 001 1 0 . .. .... .... 1010 . . . 1 .... @3same_q0 | |
154 | ||
a0635695 | 155 | VQRDMLAH_3s 1111 001 1 0 . .. .... .... 1011 ... 1 .... @3same |
21290edf PM |
156 | |
157 | SHA1_3s 1111 001 0 0 . optype:2 .... .... 1100 . 1 . 0 .... \ | |
158 | vm=%vm_dp vn=%vn_dp vd=%vd_dp | |
159 | SHA256H_3s 1111 001 1 0 . 00 .... .... 1100 . 1 . 0 .... \ | |
160 | vm=%vm_dp vn=%vn_dp vd=%vd_dp | |
161 | SHA256H2_3s 1111 001 1 0 . 01 .... .... 1100 . 1 . 0 .... \ | |
162 | vm=%vm_dp vn=%vn_dp vd=%vd_dp | |
163 | SHA256SU1_3s 1111 001 1 0 . 10 .... .... 1100 . 1 . 0 .... \ | |
164 | vm=%vm_dp vn=%vn_dp vd=%vd_dp | |
165 | ||
a0635695 | 166 | VQRDMLSH_3s 1111 001 1 0 . .. .... .... 1100 ... 1 .... @3same |