xref: /openbmc/qemu/target/mips/tcg/msa.decode (revision adcff99a6b41c029841aee30582606e6ae196507)
1f5c6ee0cSPhilippe Mathieu-Daudé# MIPS SIMD Architecture Module instruction set
2f5c6ee0cSPhilippe Mathieu-Daudé#
3f5c6ee0cSPhilippe Mathieu-Daudé# Copyright (C) 2020  Philippe Mathieu-Daudé
4f5c6ee0cSPhilippe Mathieu-Daudé#
5f5c6ee0cSPhilippe Mathieu-Daudé# SPDX-License-Identifier: LGPL-2.1-or-later
6f5c6ee0cSPhilippe Mathieu-Daudé#
7f5c6ee0cSPhilippe Mathieu-Daudé# Reference:
8f5c6ee0cSPhilippe Mathieu-Daudé#       MIPS Architecture for Programmers Volume IV-j
9f5c6ee0cSPhilippe Mathieu-Daudé#       - The MIPS32 SIMD Architecture Module, Revision 1.12
10f5c6ee0cSPhilippe Mathieu-Daudé#         (Document Number: MD00866-2B-MSA32-AFP-01.12)
11f5c6ee0cSPhilippe Mathieu-Daudé#       - The MIPS64 SIMD Architecture Module, Revision 1.12
12f5c6ee0cSPhilippe Mathieu-Daudé#         (Document Number: MD00868-1D-MSA64-AFP-01.12)
13f5c6ee0cSPhilippe Mathieu-Daudé
1434fe9fa3SPhilippe Mathieu-Daudé&r                  rs rt rd sa
15f5c6ee0cSPhilippe Mathieu-Daudé
165c5b6400SPhilippe Mathieu-Daudé&msa_r              df  wd ws wt
17d61566cfSPhilippe Mathieu-Daudé&msa_bz             df        wt sa
1875094c33SPhilippe Mathieu-Daudé&msa_ldi            df  wd       sa
19b8e74816SPhilippe Mathieu-Daudé&msa_i              df  wd ws    sa
204701d23aSPhilippe Mathieu-Daudé&msa_bit            df  wd ws       m
214701d23aSPhilippe Mathieu-Daudé
224701d23aSPhilippe Mathieu-Daudé%bit_df             16:7 !function=bit_df
234701d23aSPhilippe Mathieu-Daudé%bit_m              16:7 !function=bit_m
245c5b6400SPhilippe Mathieu-Daudé%2r_df_w            16:1 !function=plus_2
25f5c6ee0cSPhilippe Mathieu-Daudé
2634fe9fa3SPhilippe Mathieu-Daudé@lsa                ...... rs:5 rt:5 rd:5 ... sa:2 ......   &r
27ce121fe2SPhilippe Mathieu-Daudé@ldst               ...... sa:s10 ws:5 wd:5 .... df:2       &msa_i
28d61566cfSPhilippe Mathieu-Daudé@bz_v               ...... ... ..    wt:5 sa:16             &msa_bz df=3
29d61566cfSPhilippe Mathieu-Daudé@bz                 ...... ...  df:2 wt:5 sa:16             &msa_bz
30675bf34aSPhilippe Mathieu-Daudé@2r                 ...... ........  df:2 ws:5 wd:5 ......  &msa_r wt=0
315c5b6400SPhilippe Mathieu-Daudé@2rf                ...... ......... .    ws:5 wd:5 ......  &msa_r wt=0 df=%2r_df_w
32b8e74816SPhilippe Mathieu-Daudé@u5                 ...... ... df:2 sa:5  ws:5 wd:5 ......  &msa_i
33b8e74816SPhilippe Mathieu-Daudé@s5                 ...... ... df:2 sa:s5 ws:5 wd:5 ......  &msa_i
34a9e17958SPhilippe Mathieu-Daudé@i8_df              ......     df:2 sa:s8 ws:5 wd:5 ......  &msa_i
357cc351ffSPhilippe Mathieu-Daudé@i8                 ...... ..       sa:s8 ws:5 wd:5 ......  &msa_i df=0
3675094c33SPhilippe Mathieu-Daudé@ldi                ...... ... df:2 sa:s10     wd:5 ......  &msa_ldi
374701d23aSPhilippe Mathieu-Daudé@bit                ...... ... .......    ws:5 wd:5 ......  &msa_bit df=%bit_df m=%bit_m
38f5c6ee0cSPhilippe Mathieu-Daudé
39f5c6ee0cSPhilippe Mathieu-DaudéLSA                 000000 ..... ..... ..... 000 .. 000101  @lsa
40f5c6ee0cSPhilippe Mathieu-DaudéDLSA                000000 ..... ..... ..... 000 .. 010101  @lsa
41f5c6ee0cSPhilippe Mathieu-Daudé
42d61566cfSPhilippe Mathieu-DaudéBZ_V                010001 01011  ..... ................    @bz_v
43d61566cfSPhilippe Mathieu-DaudéBNZ_V               010001 01111  ..... ................    @bz_v
44d61566cfSPhilippe Mathieu-DaudéBZ                  010001 110 .. ..... ................    @bz
45d61566cfSPhilippe Mathieu-DaudéBNZ                 010001 111 .. ..... ................    @bz
46f5c6ee0cSPhilippe Mathieu-Daudé
4775094c33SPhilippe Mathieu-Daudé{
487cc351ffSPhilippe Mathieu-Daudé  ANDI              011110 00 ........ ..... .....  000000  @i8
497cc351ffSPhilippe Mathieu-Daudé  ORI               011110 01 ........ ..... .....  000000  @i8
507cc351ffSPhilippe Mathieu-Daudé  NORI              011110 10 ........ ..... .....  000000  @i8
517cc351ffSPhilippe Mathieu-Daudé  XORI              011110 11 ........ ..... .....  000000  @i8
527cc351ffSPhilippe Mathieu-Daudé  BMNZI             011110 00 ........ ..... .....  000001  @i8
537cc351ffSPhilippe Mathieu-Daudé  BMZI              011110 01 ........ ..... .....  000001  @i8
547cc351ffSPhilippe Mathieu-Daudé  BSELI             011110 10 ........ ..... .....  000001  @i8
55a9e17958SPhilippe Mathieu-Daudé  SHF               011110 .. ........ ..... .....  000010  @i8_df
56a9e17958SPhilippe Mathieu-Daudé
57b8e74816SPhilippe Mathieu-Daudé  ADDVI             011110 000 .. ..... ..... ..... 000110  @u5
58b8e74816SPhilippe Mathieu-Daudé  SUBVI             011110 001 .. ..... ..... ..... 000110  @u5
59b8e74816SPhilippe Mathieu-Daudé  MAXI_S            011110 010 .. ..... ..... ..... 000110  @s5
60b8e74816SPhilippe Mathieu-Daudé  MAXI_U            011110 011 .. ..... ..... ..... 000110  @u5
61b8e74816SPhilippe Mathieu-Daudé  MINI_S            011110 100 .. ..... ..... ..... 000110  @s5
62b8e74816SPhilippe Mathieu-Daudé  MINI_U            011110 101 .. ..... ..... ..... 000110  @u5
63b8e74816SPhilippe Mathieu-Daudé
64b8e74816SPhilippe Mathieu-Daudé  CEQI              011110 000 .. ..... ..... ..... 000111  @s5
65b8e74816SPhilippe Mathieu-Daudé  CLTI_S            011110 010 .. ..... ..... ..... 000111  @s5
66b8e74816SPhilippe Mathieu-Daudé  CLTI_U            011110 011 .. ..... ..... ..... 000111  @u5
67b8e74816SPhilippe Mathieu-Daudé  CLEI_S            011110 100 .. ..... ..... ..... 000111  @s5
68b8e74816SPhilippe Mathieu-Daudé  CLEI_U            011110 101 .. ..... ..... ..... 000111  @u5
69b8e74816SPhilippe Mathieu-Daudé
7075094c33SPhilippe Mathieu-Daudé  LDI               011110 110 .. ..........  ..... 000111  @ldi
7175094c33SPhilippe Mathieu-Daudé
724701d23aSPhilippe Mathieu-Daudé  SLLI              011110 000 ....... ..... .....  001001  @bit
734701d23aSPhilippe Mathieu-Daudé  SRAI              011110 001 ....... ..... .....  001001  @bit
744701d23aSPhilippe Mathieu-Daudé  SRLI              011110 010 ....... ..... .....  001001  @bit
754701d23aSPhilippe Mathieu-Daudé  BCLRI             011110 011 ....... ..... .....  001001  @bit
764701d23aSPhilippe Mathieu-Daudé  BSETI             011110 100 ....... ..... .....  001001  @bit
774701d23aSPhilippe Mathieu-Daudé  BNEGI             011110 101 ....... ..... .....  001001  @bit
784701d23aSPhilippe Mathieu-Daudé  BINSLI            011110 110 ....... ..... .....  001001  @bit
794701d23aSPhilippe Mathieu-Daudé  BINSRI            011110 111 ....... ..... .....  001001  @bit
804701d23aSPhilippe Mathieu-Daudé
814701d23aSPhilippe Mathieu-Daudé  SAT_S             011110 000 ....... ..... .....  001010  @bit
824701d23aSPhilippe Mathieu-Daudé  SAT_U             011110 001 ....... ..... .....  001010  @bit
834701d23aSPhilippe Mathieu-Daudé  SRARI             011110 010 ....... ..... .....  001010  @bit
844701d23aSPhilippe Mathieu-Daudé  SRLRI             011110 011 ....... ..... .....  001010  @bit
854701d23aSPhilippe Mathieu-Daudé
86675bf34aSPhilippe Mathieu-Daudé  FILL              011110 11000000 .. ..... .....  011110  @2r
87*adcff99aSPhilippe Mathieu-Daudé  PCNT              011110 11000001 .. ..... .....  011110  @2r
88*adcff99aSPhilippe Mathieu-Daudé  NLOC              011110 11000010 .. ..... .....  011110  @2r
89*adcff99aSPhilippe Mathieu-Daudé  NLZC              011110 11000011 .. ..... .....  011110  @2r
905c5b6400SPhilippe Mathieu-Daudé  FCLASS            011110 110010000 . ..... .....  011110  @2rf
915c5b6400SPhilippe Mathieu-Daudé  FTRUNC_S          011110 110010001 . ..... .....  011110  @2rf
925c5b6400SPhilippe Mathieu-Daudé  FTRUNC_U          011110 110010010 . ..... .....  011110  @2rf
935c5b6400SPhilippe Mathieu-Daudé  FSQRT             011110 110010011 . ..... .....  011110  @2rf
945c5b6400SPhilippe Mathieu-Daudé  FRSQRT            011110 110010100 . ..... .....  011110  @2rf
955c5b6400SPhilippe Mathieu-Daudé  FRCP              011110 110010101 . ..... .....  011110  @2rf
965c5b6400SPhilippe Mathieu-Daudé  FRINT             011110 110010110 . ..... .....  011110  @2rf
975c5b6400SPhilippe Mathieu-Daudé  FLOG2             011110 110010111 . ..... .....  011110  @2rf
985c5b6400SPhilippe Mathieu-Daudé  FEXUPL            011110 110011000 . ..... .....  011110  @2rf
995c5b6400SPhilippe Mathieu-Daudé  FEXUPR            011110 110011001 . ..... .....  011110  @2rf
1005c5b6400SPhilippe Mathieu-Daudé  FFQL              011110 110011010 . ..... .....  011110  @2rf
1015c5b6400SPhilippe Mathieu-Daudé  FFQR              011110 110011011 . ..... .....  011110  @2rf
1025c5b6400SPhilippe Mathieu-Daudé  FTINT_S           011110 110011100 . ..... .....  011110  @2rf
1035c5b6400SPhilippe Mathieu-Daudé  FTINT_U           011110 110011101 . ..... .....  011110  @2rf
1045c5b6400SPhilippe Mathieu-Daudé  FFINT_S           011110 110011110 . ..... .....  011110  @2rf
1055c5b6400SPhilippe Mathieu-Daudé  FFINT_U           011110 110011111 . ..... .....  011110  @2rf
1065c5b6400SPhilippe Mathieu-Daudé
107ce121fe2SPhilippe Mathieu-Daudé  LD                011110 .......... ..... .....   1000 .. @ldst
108ce121fe2SPhilippe Mathieu-Daudé  ST                011110 .......... ..... .....   1001 .. @ldst
109ce121fe2SPhilippe Mathieu-Daudé
110f5c6ee0cSPhilippe Mathieu-Daudé  MSA               011110 --------------------------
11175094c33SPhilippe Mathieu-Daudé}
112