]> Git Repo - qemu.git/blame - target/arm/neon-dp.decode
target/arm: Convert Neon VPMAX/VPMIN 3-reg-same insns to decodetree
[qemu.git] / target / arm / neon-dp.decode
CommitLineData
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
48VHADD_S_3s 1111 001 0 0 . .. .... .... 0000 . . . 0 .... @3same
49VHADD_U_3s 1111 001 1 0 . .. .... .... 0000 . . . 0 .... @3same
7a9497f1
PM
50VQADD_S_3s 1111 001 0 0 . .. .... .... 0000 . . . 1 .... @3same
51VQADD_U_3s 1111 001 1 0 . .. .... .... 0000 . . . 1 .... @3same
52
8e44d03f
PM
53VRHADD_S_3s 1111 001 0 0 . .. .... .... 0001 . . . 0 .... @3same
54VRHADD_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
59VAND_3s 1111 001 0 0 . 00 .... .... 0001 ... 1 .... @3same_logic
60VBIC_3s 1111 001 0 0 . 01 .... .... 0001 ... 1 .... @3same_logic
61VORR_3s 1111 001 0 0 . 10 .... .... 0001 ... 1 .... @3same_logic
62VORN_3s 1111 001 0 0 . 11 .... .... 0001 ... 1 .... @3same_logic
63VEOR_3s 1111 001 1 0 . 00 .... .... 0001 ... 1 .... @3same_logic
64VBSL_3s 1111 001 1 0 . 01 .... .... 0001 ... 1 .... @3same_logic
65VBIT_3s 1111 001 1 0 . 10 .... .... 0001 ... 1 .... @3same_logic
66VBIF_3s 1111 001 1 0 . 11 .... .... 0001 ... 1 .... @3same_logic
67
8e44d03f
PM
68VHSUB_S_3s 1111 001 0 0 . .. .... .... 0010 . . . 0 .... @3same
69VHSUB_U_3s 1111 001 1 0 . .. .... .... 0010 . . . 0 .... @3same
70
7a9497f1
PM
71VQSUB_S_3s 1111 001 0 0 . .. .... .... 0010 . . . 1 .... @3same
72VQSUB_U_3s 1111 001 1 0 . .. .... .... 0010 . . . 1 .... @3same
73
02bd0cdb
PM
74VCGT_S_3s 1111 001 0 0 . .. .... .... 0011 . . . 0 .... @3same
75VCGT_U_3s 1111 001 1 0 . .. .... .... 0011 . . . 0 .... @3same
76VCGE_S_3s 1111 001 0 0 . .. .... .... 0011 . . . 1 .... @3same
77VCGE_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
92VSHL_S_3s 1111 001 0 0 . .. .... .... 0100 . . . 0 .... @3same_rev
93VSHL_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
126VMAX_S_3s 1111 001 0 0 . .. .... .... 0110 . . . 0 .... @3same
127VMAX_U_3s 1111 001 1 0 . .. .... .... 0110 . . . 0 .... @3same
128VMIN_S_3s 1111 001 0 0 . .. .... .... 0110 . . . 1 .... @3same
129VMIN_U_3s 1111 001 1 0 . .. .... .... 0110 . . . 1 .... @3same
130
7715098f
PM
131VABD_S_3s 1111 001 0 0 . .. .... .... 0111 . . . 0 .... @3same
132VABD_U_3s 1111 001 1 0 . .. .... .... 0111 . . . 0 .... @3same
133
134VABA_S_3s 1111 001 0 0 . .. .... .... 0111 . . . 1 .... @3same
135VABA_U_3s 1111 001 1 0 . .. .... .... 0111 . . . 1 .... @3same
136
a4e143ac
PM
137VADD_3s 1111 001 0 0 . .. .... .... 1000 . . . 0 .... @3same
138VSUB_3s 1111 001 1 0 . .. .... .... 1000 . . . 0 .... @3same
02bd0cdb
PM
139
140VTST_3s 1111 001 0 0 . .. .... .... 1000 . . . 1 .... @3same
141VCEQ_3s 1111 001 1 0 . .. .... .... 1000 . . . 1 .... @3same
0de34fd4
PM
142
143VMLA_3s 1111 001 0 0 . .. .... .... 1001 . . . 0 .... @3same
144VMLS_3s 1111 001 1 0 . .. .... .... 1001 . . . 0 .... @3same
145
146VMUL_3s 1111 001 0 0 . .. .... .... 1001 . . . 1 .... @3same
147VMUL_p_3s 1111 001 1 0 . .. .... .... 1001 . . . 1 .... @3same
a0635695 148
059c2398
PM
149VPMAX_S_3s 1111 001 0 0 . .. .... .... 1010 . . . 0 .... @3same_q0
150VPMAX_U_3s 1111 001 1 0 . .. .... .... 1010 . . . 0 .... @3same_q0
151
152VPMIN_S_3s 1111 001 0 0 . .. .... .... 1010 . . . 1 .... @3same_q0
153VPMIN_U_3s 1111 001 1 0 . .. .... .... 1010 . . . 1 .... @3same_q0
154
a0635695 155VQRDMLAH_3s 1111 001 1 0 . .. .... .... 1011 ... 1 .... @3same
21290edf
PM
156
157SHA1_3s 1111 001 0 0 . optype:2 .... .... 1100 . 1 . 0 .... \
158 vm=%vm_dp vn=%vn_dp vd=%vd_dp
159SHA256H_3s 1111 001 1 0 . 00 .... .... 1100 . 1 . 0 .... \
160 vm=%vm_dp vn=%vn_dp vd=%vd_dp
161SHA256H2_3s 1111 001 1 0 . 01 .... .... 1100 . 1 . 0 .... \
162 vm=%vm_dp vn=%vn_dp vd=%vd_dp
163SHA256SU1_3s 1111 001 1 0 . 10 .... .... 1100 . 1 . 0 .... \
164 vm=%vm_dp vn=%vn_dp vd=%vd_dp
165
a0635695 166VQRDMLSH_3s 1111 001 1 0 . .. .... .... 1100 ... 1 .... @3same
This page took 0.044204 seconds and 4 git commands to generate.