xref: /openbmc/qemu/target/microblaze/insns.decode (revision b1354342c1c7a01ef251160725db50ee8c40511a)
1#
2# MicroBlaze instruction decode definitions.
3#
4# Copyright (c) 2020 Richard Henderson <rth@twiddle.net>
5#
6# This library is free software; you can redistribute it and/or
7# modify it under the terms of the GNU Lesser General Public
8# License as published by the Free Software Foundation; either
9# version 2.1 of the License, or (at your option) any later version.
10#
11# This library is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14# Lesser General Public License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public
17# License along with this library; if not, see <http://www.gnu.org/licenses/>.
18#
19
20&typea          rd ra rb
21&typeb          rd ra imm
22
23# Include any IMM prefix in the value reported.
24%extimm         0:s16 !function=typeb_imm
25
26@typea          ...... rd:5 ra:5 rb:5 ... .... ....     &typea
27@typeb          ...... rd:5 ra:5 ................       &typeb imm=%extimm
28
29###
30
31{
32  zero          000000 00000 00000 00000 000 0000 0000
33  add           000000 ..... ..... ..... 000 0000 0000  @typea
34}
35addc            000010 ..... ..... ..... 000 0000 0000  @typea
36addk            000100 ..... ..... ..... 000 0000 0000  @typea
37addkc           000110 ..... ..... ..... 000 0000 0000  @typea
38
39addi            001000 ..... ..... ................     @typeb
40addic           001010 ..... ..... ................     @typeb
41addik           001100 ..... ..... ................     @typeb
42addikc          001110 ..... ..... ................     @typeb
43
44and             100001 ..... ..... ..... 000 0000 0000  @typea
45andi            101001 ..... ..... ................     @typeb
46
47andn            100011 ..... ..... ..... 000 0000 0000  @typea
48andni           101011 ..... ..... ................     @typeb
49
50cmp             000101 ..... ..... ..... 000 0000 0001  @typea
51cmpu            000101 ..... ..... ..... 000 0000 0011  @typea
52
53idiv            010010 ..... ..... ..... 000 0000 0000  @typea
54idivu           010010 ..... ..... ..... 000 0000 0010  @typea
55
56mul             010000 ..... ..... ..... 000 0000 0000  @typea
57mulh            010000 ..... ..... ..... 000 0000 0001  @typea
58mulhu           010000 ..... ..... ..... 000 0000 0011  @typea
59mulhsu          010000 ..... ..... ..... 000 0000 0010  @typea
60muli            011000 ..... ..... ................     @typeb
61
62or              100000 ..... ..... ..... 000 0000 0000  @typea
63ori             101000 ..... ..... ................     @typeb
64
65pcmpbf          100000 ..... ..... ..... 100 0000 0000  @typea
66pcmpeq          100010 ..... ..... ..... 100 0000 0000  @typea
67pcmpne          100011 ..... ..... ..... 100 0000 0000  @typea
68
69rsub            000001 ..... ..... ..... 000 0000 0000  @typea
70rsubc           000011 ..... ..... ..... 000 0000 0000  @typea
71rsubk           000101 ..... ..... ..... 000 0000 0000  @typea
72rsubkc          000111 ..... ..... ..... 000 0000 0000  @typea
73
74rsubi           001001 ..... ..... ................     @typeb
75rsubic          001011 ..... ..... ................     @typeb
76rsubik          001101 ..... ..... ................     @typeb
77rsubikc         001111 ..... ..... ................     @typeb
78
79xor             100010 ..... ..... ..... 000 0000 0000  @typea
80xori            101010 ..... ..... ................     @typeb
81