xref: /qemu/target/ppc/insn64.decode (revision 727385c4)
1#
2# Power ISA decode for 64-bit prefixed insns (opcode space 0 and 1)
3#
4# Copyright (c) 2021 Instituto de Pesquisas Eldorado (eldorado.org.br)
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# Format MLS:D and 8LS:D
21&PLS_D          rt ra si:int64_t r:bool
22%pls_si         32:s18 0:16
23@PLS_D          ...... .. ... r:1 .. .................. \
24                ...... rt:5 ra:5 ................       \
25                &PLS_D si=%pls_si
26
27### Fixed-Point Load Instructions
28
29PLBZ            000001 10 0--.-- .................. \
30                100010 ..... ..... ................     @PLS_D
31PLHZ            000001 10 0--.-- .................. \
32                101000 ..... ..... ................     @PLS_D
33PLHA            000001 10 0--.-- .................. \
34                101010 ..... ..... ................     @PLS_D
35PLWZ            000001 10 0--.-- .................. \
36                100000 ..... ..... ................     @PLS_D
37PLWA            000001 00 0--.-- .................. \
38                101001 ..... ..... ................     @PLS_D
39PLD             000001 00 0--.-- .................. \
40                111001 ..... ..... ................     @PLS_D
41PLQ             000001 00 0--.-- .................. \
42                111000 ..... ..... ................     @PLS_D
43
44### Fixed-Point Store Instructions
45
46PSTW            000001 10 0--.-- .................. \
47                100100 ..... ..... ................     @PLS_D
48PSTB            000001 10 0--.-- .................. \
49                100110 ..... ..... ................     @PLS_D
50PSTH            000001 10 0--.-- .................. \
51                101100 ..... ..... ................     @PLS_D
52
53PSTD            000001 00 0--.-- .................. \
54                111101 ..... ..... ................     @PLS_D
55PSTQ            000001 00 0--.-- .................. \
56                111100 ..... ..... ................     @PLS_D
57
58### Fixed-Point Arithmetic Instructions
59
60PADDI           000001 10 0--.-- ..................     \
61                001110 ..... ..... ................     @PLS_D
62
63### Float-Point Load and Store Instructions
64
65PLFS            000001 10 0--.-- .................. \
66                110000 ..... ..... ................     @PLS_D
67PLFD            000001 10 0--.-- .................. \
68                110010 ..... ..... ................     @PLS_D
69PSTFS           000001 10 0--.-- .................. \
70                110100 ..... ..... ................     @PLS_D
71PSTFD           000001 10 0--.-- .................. \
72                110110 ..... ..... ................     @PLS_D
73
74### Prefixed No-operation Instruction
75
76@PNOP           000001 11 0000-- 000000000000000000     \
77                ................................
78
79{
80  [
81    ## Invalid suffixes: Branch instruction
82    # bc[l][a]
83    INVALID     ................................        \
84                010000--------------------------        @PNOP
85    # b[l][a]
86    INVALID     ................................        \
87                010010--------------------------        @PNOP
88    # bclr[l]
89    INVALID     ................................        \
90                010011---------------0000010000-        @PNOP
91    # bcctr[l]
92    INVALID     ................................        \
93                010011---------------1000010000-        @PNOP
94    # bctar[l]
95    INVALID     ................................        \
96                010011---------------1000110000-        @PNOP
97
98    ## Invalid suffixes: rfebb
99    INVALID     ................................        \
100                010011---------------0010010010-        @PNOP
101
102    ## Invalid suffixes: context synchronizing other than isync
103    # sc
104    INVALID     ................................        \
105                010001------------------------1-        @PNOP
106    # scv
107    INVALID     ................................        \
108                010001------------------------01        @PNOP
109    # rfscv
110    INVALID     ................................        \
111                010011---------------0001010010-        @PNOP
112    # rfid
113    INVALID     ................................        \
114                010011---------------0000010010-        @PNOP
115    # hrfid
116    INVALID     ................................        \
117                010011---------------0100010010-        @PNOP
118    # urfid
119    INVALID     ................................        \
120                010011---------------0100110010-        @PNOP
121    # stop
122    INVALID     ................................        \
123                010011---------------0101110010-        @PNOP
124    # mtmsr w/ L=0
125    INVALID     ................................        \
126                011111---------0-----0010010010-        @PNOP
127    # mtmsrd w/ L=0
128    INVALID     ................................        \
129                011111---------0-----0010110010-        @PNOP
130
131    ## Invalid suffixes: Service Processor Attention
132    INVALID     ................................        \
133                000000----------------100000000-        @PNOP
134  ]
135
136  ## Valid suffixes
137  PNOP          ................................        \
138                --------------------------------        @PNOP
139}
140