]> git.proxmox.com Git - mirror_qemu.git/blame - target/microblaze/insns.decode
target/microblaze: Fix cpu unwind for stackprot
[mirror_qemu.git] / target / microblaze / insns.decode
CommitLineData
44d1432b
RH
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#
20800179 19
39cf3864 20&typea0 rd ra
20800179
RH
21&typea rd ra rb
22&typeb rd ra imm
23
24# Include any IMM prefix in the value reported.
25%extimm 0:s16 !function=typeb_imm
26
27@typea ...... rd:5 ra:5 rb:5 ... .... .... &typea
28@typeb ...... rd:5 ra:5 ................ &typeb imm=%extimm
29
39cf3864
RH
30# Officially typea, but with rb==0, which is not used.
31@typea0 ...... rd:5 ra:5 ................ &typea0
32
081d8e02
RH
33# Officially typeb, but any immediate extension is unused.
34@typeb_bs ...... rd:5 ra:5 ..... ...... imm:5 &typeb
35
36# For convenience, extract the two imm_w/imm_s fields, then pack
37# them back together as "imm". Doing this makes it easiest to
38# match the required zero at bit 5.
39%ieimm 6:5 0:5
40@typeb_ie ...... rd:5 ra:5 ..... ..... . ..... &typeb imm=%ieimm
41
20800179
RH
42###
43
44{
45 zero 000000 00000 00000 00000 000 0000 0000
46 add 000000 ..... ..... ..... 000 0000 0000 @typea
47}
48addc 000010 ..... ..... ..... 000 0000 0000 @typea
49addk 000100 ..... ..... ..... 000 0000 0000 @typea
50addkc 000110 ..... ..... ..... 000 0000 0000 @typea
51
52addi 001000 ..... ..... ................ @typeb
53addic 001010 ..... ..... ................ @typeb
54addik 001100 ..... ..... ................ @typeb
55addikc 001110 ..... ..... ................ @typeb
a2b0b90e 56
cb0a0a4c
RH
57and 100001 ..... ..... ..... 000 0000 0000 @typea
58andi 101001 ..... ..... ................ @typeb
59
60andn 100011 ..... ..... ..... 000 0000 0000 @typea
61andni 101011 ..... ..... ................ @typeb
62
081d8e02
RH
63bsrl 010001 ..... ..... ..... 000 0000 0000 @typea
64bsra 010001 ..... ..... ..... 010 0000 0000 @typea
65bsll 010001 ..... ..... ..... 100 0000 0000 @typea
66
67bsrli 011001 ..... ..... 00000 000000 ..... @typeb_bs
68bsrai 011001 ..... ..... 00000 010000 ..... @typeb_bs
69bslli 011001 ..... ..... 00000 100000 ..... @typeb_bs
70
71bsefi 011001 ..... ..... 01000 .....0 ..... @typeb_ie
72bsifi 011001 ..... ..... 10000 .....0 ..... @typeb_ie
73
39cf3864
RH
74clz 100100 ..... ..... 00000 000 1110 0000 @typea0
75
a2b0b90e
RH
76cmp 000101 ..... ..... ..... 000 0000 0001 @typea
77cmpu 000101 ..... ..... ..... 000 0000 0011 @typea
78
d5aead3d
RH
79fadd 010110 ..... ..... ..... 0000 000 0000 @typea
80frsub 010110 ..... ..... ..... 0001 000 0000 @typea
81fmul 010110 ..... ..... ..... 0010 000 0000 @typea
82fdiv 010110 ..... ..... ..... 0011 000 0000 @typea
83fcmp_un 010110 ..... ..... ..... 0100 000 0000 @typea
84fcmp_lt 010110 ..... ..... ..... 0100 001 0000 @typea
85fcmp_eq 010110 ..... ..... ..... 0100 010 0000 @typea
86fcmp_le 010110 ..... ..... ..... 0100 011 0000 @typea
87fcmp_gt 010110 ..... ..... ..... 0100 100 0000 @typea
88fcmp_ne 010110 ..... ..... ..... 0100 101 0000 @typea
89fcmp_ge 010110 ..... ..... ..... 0100 110 0000 @typea
90
91# Note that flt and fint, unlike fsqrt, are documented as having the RB
92# operand which is unused. So allow the field to be non-zero but discard
93# the value and treat as 2-operand insns.
94flt 010110 ..... ..... ----- 0101 000 0000 @typea0
95fint 010110 ..... ..... ----- 0110 000 0000 @typea0
96fsqrt 010110 ..... ..... 00000 0111 000 0000 @typea0
97
b1354342
RH
98idiv 010010 ..... ..... ..... 000 0000 0000 @typea
99idivu 010010 ..... ..... ..... 000 0000 0010 @typea
100
e64b2e5c
RH
101imm 101100 00000 00000 imm:16
102
97955ceb
RH
103mul 010000 ..... ..... ..... 000 0000 0000 @typea
104mulh 010000 ..... ..... ..... 000 0000 0001 @typea
105mulhu 010000 ..... ..... ..... 000 0000 0011 @typea
106mulhsu 010000 ..... ..... ..... 000 0000 0010 @typea
107muli 011000 ..... ..... ................ @typeb
108
cb0a0a4c
RH
109or 100000 ..... ..... ..... 000 0000 0000 @typea
110ori 101000 ..... ..... ................ @typeb
111
607f5767
RH
112pcmpbf 100000 ..... ..... ..... 100 0000 0000 @typea
113pcmpeq 100010 ..... ..... ..... 100 0000 0000 @typea
114pcmpne 100011 ..... ..... ..... 100 0000 0000 @typea
115
a2b0b90e
RH
116rsub 000001 ..... ..... ..... 000 0000 0000 @typea
117rsubc 000011 ..... ..... ..... 000 0000 0000 @typea
118rsubk 000101 ..... ..... ..... 000 0000 0000 @typea
119rsubkc 000111 ..... ..... ..... 000 0000 0000 @typea
120
121rsubi 001001 ..... ..... ................ @typeb
122rsubic 001011 ..... ..... ................ @typeb
123rsubik 001101 ..... ..... ................ @typeb
124rsubikc 001111 ..... ..... ................ @typeb
cb0a0a4c 125
39cf3864
RH
126sext8 100100 ..... ..... 00000 000 0110 0000 @typea0
127sext16 100100 ..... ..... 00000 000 0110 0001 @typea0
128
129sra 100100 ..... ..... 00000 000 0000 0001 @typea0
130src 100100 ..... ..... 00000 000 0010 0001 @typea0
131srl 100100 ..... ..... 00000 000 0100 0001 @typea0
132
133swapb 100100 ..... ..... 00000 001 1110 0000 @typea0
134swaph 100100 ..... ..... 00000 001 1110 0010 @typea0
135
136# Cache operations have no effect in qemu: discard the arguments.
137wdic 100100 00000 ----- ----- -00 -11- 01-0 # wdc
138wdic 100100 00000 ----- ----- 000 0110 1000 # wic
139
cb0a0a4c
RH
140xor 100010 ..... ..... ..... 000 0000 0000 @typea
141xori 101010 ..... ..... ................ @typeb