2020-11-30 00:24:40 +03:00
|
|
|
# MIPS SIMD Architecture Module instruction set
|
|
|
|
#
|
|
|
|
# Copyright (C) 2020 Philippe Mathieu-Daudé
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
#
|
|
|
|
# Reference:
|
|
|
|
# MIPS Architecture for Programmers Volume IV-j
|
2021-05-29 21:06:13 +03:00
|
|
|
# - The MIPS32 SIMD Architecture Module, Revision 1.12
|
|
|
|
# (Document Number: MD00866-2B-MSA32-AFP-01.12)
|
|
|
|
# - The MIPS64 SIMD Architecture Module, Revision 1.12
|
|
|
|
# (Document Number: MD00868-1D-MSA64-AFP-01.12)
|
2020-11-30 00:24:40 +03:00
|
|
|
|
2021-07-27 22:13:49 +03:00
|
|
|
&r rs rt rd sa
|
2020-12-08 20:59:36 +03:00
|
|
|
|
2021-10-28 23:38:21 +03:00
|
|
|
&msa_r df wd ws wt
|
2021-10-19 09:18:25 +03:00
|
|
|
&msa_bz df wt sa
|
2021-10-19 09:22:31 +03:00
|
|
|
&msa_ldi df wd sa
|
2021-10-19 09:27:58 +03:00
|
|
|
&msa_i df wd ws sa
|
2021-10-19 09:47:29 +03:00
|
|
|
&msa_bit df wd ws m
|
2021-10-19 18:16:45 +03:00
|
|
|
&msa_elm_df df wd ws n
|
2021-10-19 19:26:03 +03:00
|
|
|
&msa_elm wd ws
|
2021-10-19 09:47:29 +03:00
|
|
|
|
2021-10-19 18:16:45 +03:00
|
|
|
%elm_df 16:6 !function=elm_df
|
|
|
|
%elm_n 16:6 !function=elm_n
|
2021-10-19 09:47:29 +03:00
|
|
|
%bit_df 16:7 !function=bit_df
|
|
|
|
%bit_m 16:7 !function=bit_m
|
2021-10-28 23:38:21 +03:00
|
|
|
%2r_df_w 16:1 !function=plus_2
|
2021-10-19 11:35:20 +03:00
|
|
|
%3r_df_h 21:1 !function=plus_1
|
2021-10-19 11:37:13 +03:00
|
|
|
%3r_df_w 21:1 !function=plus_2
|
2020-11-30 00:24:40 +03:00
|
|
|
|
2021-07-27 22:13:49 +03:00
|
|
|
@lsa ...... rs:5 rt:5 rd:5 ... sa:2 ...... &r
|
2021-10-19 11:02:55 +03:00
|
|
|
@ldst ...... sa:s10 ws:5 wd:5 .... df:2 &msa_i
|
2023-09-14 11:39:37 +03:00
|
|
|
@bz_v ...... ... .. wt:5 sa:s16 &msa_bz df=3
|
|
|
|
@bz ...... ... df:2 wt:5 sa:s16 &msa_bz
|
2021-10-19 18:16:45 +03:00
|
|
|
@elm_df ...... .... ...... ws:5 wd:5 ...... &msa_elm_df df=%elm_df n=%elm_n
|
2021-10-19 19:26:03 +03:00
|
|
|
@elm ...... .......... ws:5 wd:5 ...... &msa_elm
|
2021-10-19 11:09:42 +03:00
|
|
|
@vec ...... ..... wt:5 ws:5 wd:5 ...... &msa_r df=0
|
2021-10-19 11:20:04 +03:00
|
|
|
@2r ...... ........ df:2 ws:5 wd:5 ...... &msa_r wt=0
|
2021-10-28 23:38:21 +03:00
|
|
|
@2rf ...... ......... . ws:5 wd:5 ...... &msa_r wt=0 df=%2r_df_w
|
2021-10-19 14:27:51 +03:00
|
|
|
@3r ...... ... df:2 wt:5 ws:5 wd:5 ...... &msa_r
|
2021-10-19 11:35:20 +03:00
|
|
|
@3rf_h ...... .... . wt:5 ws:5 wd:5 ...... &msa_r df=%3r_df_h
|
2021-10-19 11:37:13 +03:00
|
|
|
@3rf_w ...... .... . wt:5 ws:5 wd:5 ...... &msa_r df=%3r_df_w
|
2021-10-19 09:27:58 +03:00
|
|
|
@u5 ...... ... df:2 sa:5 ws:5 wd:5 ...... &msa_i
|
|
|
|
@s5 ...... ... df:2 sa:s5 ws:5 wd:5 ...... &msa_i
|
2021-10-19 10:54:17 +03:00
|
|
|
@i8_df ...... df:2 sa:s8 ws:5 wd:5 ...... &msa_i
|
2021-10-19 10:56:51 +03:00
|
|
|
@i8 ...... .. sa:s8 ws:5 wd:5 ...... &msa_i df=0
|
2021-10-19 09:22:31 +03:00
|
|
|
@ldi ...... ... df:2 sa:s10 wd:5 ...... &msa_ldi
|
2021-10-19 09:47:29 +03:00
|
|
|
@bit ...... ... ....... ws:5 wd:5 ...... &msa_bit df=%bit_df m=%bit_m
|
2020-11-30 00:24:40 +03:00
|
|
|
|
2020-12-08 20:59:36 +03:00
|
|
|
LSA 000000 ..... ..... ..... 000 .. 000101 @lsa
|
2021-05-29 21:06:13 +03:00
|
|
|
DLSA 000000 ..... ..... ..... 000 .. 010101 @lsa
|
2020-12-08 20:59:36 +03:00
|
|
|
|
2021-10-19 09:18:25 +03:00
|
|
|
BZ_V 010001 01011 ..... ................ @bz_v
|
|
|
|
BNZ_V 010001 01111 ..... ................ @bz_v
|
|
|
|
BZ 010001 110 .. ..... ................ @bz
|
|
|
|
BNZ 010001 111 .. ..... ................ @bz
|
2020-11-30 00:24:40 +03:00
|
|
|
|
2021-10-19 19:39:47 +03:00
|
|
|
ANDI 011110 00 ........ ..... ..... 000000 @i8
|
|
|
|
ORI 011110 01 ........ ..... ..... 000000 @i8
|
|
|
|
NORI 011110 10 ........ ..... ..... 000000 @i8
|
|
|
|
XORI 011110 11 ........ ..... ..... 000000 @i8
|
|
|
|
BMNZI 011110 00 ........ ..... ..... 000001 @i8
|
|
|
|
BMZI 011110 01 ........ ..... ..... 000001 @i8
|
|
|
|
BSELI 011110 10 ........ ..... ..... 000001 @i8
|
|
|
|
SHF 011110 .. ........ ..... ..... 000010 @i8_df
|
2021-10-19 10:54:17 +03:00
|
|
|
|
2021-10-19 19:39:47 +03:00
|
|
|
ADDVI 011110 000 .. ..... ..... ..... 000110 @u5
|
|
|
|
SUBVI 011110 001 .. ..... ..... ..... 000110 @u5
|
|
|
|
MAXI_S 011110 010 .. ..... ..... ..... 000110 @s5
|
|
|
|
MAXI_U 011110 011 .. ..... ..... ..... 000110 @u5
|
|
|
|
MINI_S 011110 100 .. ..... ..... ..... 000110 @s5
|
|
|
|
MINI_U 011110 101 .. ..... ..... ..... 000110 @u5
|
2021-10-19 09:27:58 +03:00
|
|
|
|
2021-10-19 19:39:47 +03:00
|
|
|
CEQI 011110 000 .. ..... ..... ..... 000111 @s5
|
|
|
|
CLTI_S 011110 010 .. ..... ..... ..... 000111 @s5
|
|
|
|
CLTI_U 011110 011 .. ..... ..... ..... 000111 @u5
|
|
|
|
CLEI_S 011110 100 .. ..... ..... ..... 000111 @s5
|
|
|
|
CLEI_U 011110 101 .. ..... ..... ..... 000111 @u5
|
2021-10-19 09:27:58 +03:00
|
|
|
|
2021-10-19 19:39:47 +03:00
|
|
|
LDI 011110 110 .. .......... ..... 000111 @ldi
|
2021-10-19 09:22:31 +03:00
|
|
|
|
2021-10-19 19:39:47 +03:00
|
|
|
SLLI 011110 000 ....... ..... ..... 001001 @bit
|
|
|
|
SRAI 011110 001 ....... ..... ..... 001001 @bit
|
|
|
|
SRLI 011110 010 ....... ..... ..... 001001 @bit
|
|
|
|
BCLRI 011110 011 ....... ..... ..... 001001 @bit
|
|
|
|
BSETI 011110 100 ....... ..... ..... 001001 @bit
|
|
|
|
BNEGI 011110 101 ....... ..... ..... 001001 @bit
|
|
|
|
BINSLI 011110 110 ....... ..... ..... 001001 @bit
|
|
|
|
BINSRI 011110 111 ....... ..... ..... 001001 @bit
|
2021-10-19 09:47:29 +03:00
|
|
|
|
2021-10-19 19:39:47 +03:00
|
|
|
SAT_S 011110 000 ....... ..... ..... 001010 @bit
|
|
|
|
SAT_U 011110 001 ....... ..... ..... 001010 @bit
|
|
|
|
SRARI 011110 010 ....... ..... ..... 001010 @bit
|
|
|
|
SRLRI 011110 011 ....... ..... ..... 001010 @bit
|
2021-10-19 09:47:29 +03:00
|
|
|
|
2021-10-19 19:39:47 +03:00
|
|
|
SLL 011110 000.. ..... ..... ..... 001101 @3r
|
|
|
|
SRA 011110 001.. ..... ..... ..... 001101 @3r
|
|
|
|
SRL 011110 010.. ..... ..... ..... 001101 @3r
|
|
|
|
BCLR 011110 011.. ..... ..... ..... 001101 @3r
|
|
|
|
BSET 011110 100.. ..... ..... ..... 001101 @3r
|
|
|
|
BNEG 011110 101.. ..... ..... ..... 001101 @3r
|
|
|
|
BINSL 011110 110.. ..... ..... ..... 001101 @3r
|
|
|
|
BINSR 011110 111.. ..... ..... ..... 001101 @3r
|
2021-10-19 15:22:32 +03:00
|
|
|
|
2021-10-19 19:39:47 +03:00
|
|
|
ADDV 011110 000.. ..... ..... ..... 001110 @3r
|
|
|
|
SUBV 011110 001.. ..... ..... ..... 001110 @3r
|
|
|
|
MAX_S 011110 010.. ..... ..... ..... 001110 @3r
|
|
|
|
MAX_U 011110 011.. ..... ..... ..... 001110 @3r
|
|
|
|
MIN_S 011110 100.. ..... ..... ..... 001110 @3r
|
|
|
|
MIN_U 011110 101.. ..... ..... ..... 001110 @3r
|
|
|
|
MAX_A 011110 110.. ..... ..... ..... 001110 @3r
|
|
|
|
MIN_A 011110 111.. ..... ..... ..... 001110 @3r
|
2021-10-19 16:49:52 +03:00
|
|
|
|
2021-10-19 19:39:47 +03:00
|
|
|
CEQ 011110 000.. ..... ..... ..... 001111 @3r
|
|
|
|
CLT_S 011110 010.. ..... ..... ..... 001111 @3r
|
|
|
|
CLT_U 011110 011.. ..... ..... ..... 001111 @3r
|
|
|
|
CLE_S 011110 100.. ..... ..... ..... 001111 @3r
|
|
|
|
CLE_U 011110 101.. ..... ..... ..... 001111 @3r
|
2021-10-19 16:49:52 +03:00
|
|
|
|
2021-10-19 19:39:47 +03:00
|
|
|
ADD_A 011110 000.. ..... ..... ..... 010000 @3r
|
|
|
|
ADDS_A 011110 001.. ..... ..... ..... 010000 @3r
|
|
|
|
ADDS_S 011110 010.. ..... ..... ..... 010000 @3r
|
|
|
|
ADDS_U 011110 011.. ..... ..... ..... 010000 @3r
|
|
|
|
AVE_S 011110 100.. ..... ..... ..... 010000 @3r
|
|
|
|
AVE_U 011110 101.. ..... ..... ..... 010000 @3r
|
|
|
|
AVER_S 011110 110.. ..... ..... ..... 010000 @3r
|
|
|
|
AVER_U 011110 111.. ..... ..... ..... 010000 @3r
|
2021-10-19 16:49:52 +03:00
|
|
|
|
2021-10-19 19:39:47 +03:00
|
|
|
SUBS_S 011110 000.. ..... ..... ..... 010001 @3r
|
|
|
|
SUBS_U 011110 001.. ..... ..... ..... 010001 @3r
|
|
|
|
SUBSUS_U 011110 010.. ..... ..... ..... 010001 @3r
|
|
|
|
SUBSUU_S 011110 011.. ..... ..... ..... 010001 @3r
|
|
|
|
ASUB_S 011110 100.. ..... ..... ..... 010001 @3r
|
|
|
|
ASUB_U 011110 101.. ..... ..... ..... 010001 @3r
|
2021-10-19 16:49:52 +03:00
|
|
|
|
2021-10-19 19:39:47 +03:00
|
|
|
MULV 011110 000.. ..... ..... ..... 010010 @3r
|
|
|
|
MADDV 011110 001.. ..... ..... ..... 010010 @3r
|
|
|
|
MSUBV 011110 010.. ..... ..... ..... 010010 @3r
|
|
|
|
DIV_S 011110 100.. ..... ..... ..... 010010 @3r
|
|
|
|
DIV_U 011110 101.. ..... ..... ..... 010010 @3r
|
|
|
|
MOD_S 011110 110.. ..... ..... ..... 010010 @3r
|
|
|
|
MOD_U 011110 111.. ..... ..... ..... 010010 @3r
|
2021-10-19 16:49:52 +03:00
|
|
|
|
2021-10-19 19:39:47 +03:00
|
|
|
DOTP_S 011110 000.. ..... ..... ..... 010011 @3r
|
|
|
|
DOTP_U 011110 001.. ..... ..... ..... 010011 @3r
|
|
|
|
DPADD_S 011110 010.. ..... ..... ..... 010011 @3r
|
|
|
|
DPADD_U 011110 011.. ..... ..... ..... 010011 @3r
|
|
|
|
DPSUB_S 011110 100.. ..... ..... ..... 010011 @3r
|
|
|
|
DPSUB_U 011110 101.. ..... ..... ..... 010011 @3r
|
2021-10-19 14:51:07 +03:00
|
|
|
|
2021-10-19 19:39:47 +03:00
|
|
|
SLD 011110 000 .. ..... ..... ..... 010100 @3r
|
|
|
|
SPLAT 011110 001 .. ..... ..... ..... 010100 @3r
|
|
|
|
PCKEV 011110 010 .. ..... ..... ..... 010100 @3r
|
|
|
|
PCKOD 011110 011 .. ..... ..... ..... 010100 @3r
|
|
|
|
ILVL 011110 100 .. ..... ..... ..... 010100 @3r
|
|
|
|
ILVR 011110 101 .. ..... ..... ..... 010100 @3r
|
|
|
|
ILVEV 011110 110 .. ..... ..... ..... 010100 @3r
|
|
|
|
ILVOD 011110 111 .. ..... ..... ..... 010100 @3r
|
2021-10-19 14:27:51 +03:00
|
|
|
|
2021-10-19 19:39:47 +03:00
|
|
|
VSHF 011110 000 .. ..... ..... ..... 010101 @3r
|
|
|
|
SRAR 011110 001 .. ..... ..... ..... 010101 @3r
|
|
|
|
SRLR 011110 010 .. ..... ..... ..... 010101 @3r
|
|
|
|
HADD_S 011110 100.. ..... ..... ..... 010101 @3r
|
|
|
|
HADD_U 011110 101.. ..... ..... ..... 010101 @3r
|
|
|
|
HSUB_S 011110 110.. ..... ..... ..... 010101 @3r
|
|
|
|
HSUB_U 011110 111.. ..... ..... ..... 010101 @3r
|
2021-10-19 14:27:51 +03:00
|
|
|
|
2021-10-19 19:39:47 +03:00
|
|
|
{
|
|
|
|
CTCMSA 011110 0000111110 ..... ..... 011001 @elm
|
|
|
|
SLDI 011110 0000 ...... ..... ..... 011001 @elm_df
|
|
|
|
}
|
|
|
|
{
|
|
|
|
CFCMSA 011110 0001111110 ..... ..... 011001 @elm
|
|
|
|
SPLATI 011110 0001 ...... ..... ..... 011001 @elm_df
|
|
|
|
}
|
|
|
|
{
|
|
|
|
MOVE_V 011110 0010111110 ..... ..... 011001 @elm
|
|
|
|
COPY_S 011110 0010 ...... ..... ..... 011001 @elm_df
|
|
|
|
}
|
|
|
|
COPY_U 011110 0011 ...... ..... ..... 011001 @elm_df
|
|
|
|
INSERT 011110 0100 ...... ..... ..... 011001 @elm_df
|
|
|
|
INSVE 011110 0101 ...... ..... ..... 011001 @elm_df
|
2021-10-19 18:16:45 +03:00
|
|
|
|
2021-10-19 19:39:47 +03:00
|
|
|
FCAF 011110 0000 . ..... ..... ..... 011010 @3rf_w
|
|
|
|
FCUN 011110 0001 . ..... ..... ..... 011010 @3rf_w
|
|
|
|
FCEQ 011110 0010 . ..... ..... ..... 011010 @3rf_w
|
|
|
|
FCUEQ 011110 0011 . ..... ..... ..... 011010 @3rf_w
|
|
|
|
FCLT 011110 0100 . ..... ..... ..... 011010 @3rf_w
|
|
|
|
FCULT 011110 0101 . ..... ..... ..... 011010 @3rf_w
|
|
|
|
FCLE 011110 0110 . ..... ..... ..... 011010 @3rf_w
|
|
|
|
FCULE 011110 0111 . ..... ..... ..... 011010 @3rf_w
|
|
|
|
FSAF 011110 1000 . ..... ..... ..... 011010 @3rf_w
|
|
|
|
FSUN 011110 1001 . ..... ..... ..... 011010 @3rf_w
|
|
|
|
FSEQ 011110 1010 . ..... ..... ..... 011010 @3rf_w
|
|
|
|
FSUEQ 011110 1011 . ..... ..... ..... 011010 @3rf_w
|
|
|
|
FSLT 011110 1100 . ..... ..... ..... 011010 @3rf_w
|
|
|
|
FSULT 011110 1101 . ..... ..... ..... 011010 @3rf_w
|
|
|
|
FSLE 011110 1110 . ..... ..... ..... 011010 @3rf_w
|
|
|
|
FSULE 011110 1111 . ..... ..... ..... 011010 @3rf_w
|
2021-10-19 11:37:13 +03:00
|
|
|
|
2021-10-19 19:39:47 +03:00
|
|
|
FADD 011110 0000 . ..... ..... ..... 011011 @3rf_w
|
|
|
|
FSUB 011110 0001 . ..... ..... ..... 011011 @3rf_w
|
|
|
|
FMUL 011110 0010 . ..... ..... ..... 011011 @3rf_w
|
|
|
|
FDIV 011110 0011 . ..... ..... ..... 011011 @3rf_w
|
|
|
|
FMADD 011110 0100 . ..... ..... ..... 011011 @3rf_w
|
|
|
|
FMSUB 011110 0101 . ..... ..... ..... 011011 @3rf_w
|
|
|
|
FEXP2 011110 0111 . ..... ..... ..... 011011 @3rf_w
|
|
|
|
FEXDO 011110 1000 . ..... ..... ..... 011011 @3rf_w
|
|
|
|
FTQ 011110 1010 . ..... ..... ..... 011011 @3rf_w
|
|
|
|
FMIN 011110 1100 . ..... ..... ..... 011011 @3rf_w
|
|
|
|
FMIN_A 011110 1101 . ..... ..... ..... 011011 @3rf_w
|
|
|
|
FMAX 011110 1110 . ..... ..... ..... 011011 @3rf_w
|
|
|
|
FMAX_A 011110 1111 . ..... ..... ..... 011011 @3rf_w
|
2021-10-19 11:37:13 +03:00
|
|
|
|
2021-10-19 19:39:47 +03:00
|
|
|
FCOR 011110 0001 . ..... ..... ..... 011100 @3rf_w
|
|
|
|
FCUNE 011110 0010 . ..... ..... ..... 011100 @3rf_w
|
|
|
|
FCNE 011110 0011 . ..... ..... ..... 011100 @3rf_w
|
|
|
|
MUL_Q 011110 0100 . ..... ..... ..... 011100 @3rf_h
|
|
|
|
MADD_Q 011110 0101 . ..... ..... ..... 011100 @3rf_h
|
|
|
|
MSUB_Q 011110 0110 . ..... ..... ..... 011100 @3rf_h
|
|
|
|
FSOR 011110 1001 . ..... ..... ..... 011100 @3rf_w
|
|
|
|
FSUNE 011110 1010 . ..... ..... ..... 011100 @3rf_w
|
|
|
|
FSNE 011110 1011 . ..... ..... ..... 011100 @3rf_w
|
|
|
|
MULR_Q 011110 1100 . ..... ..... ..... 011100 @3rf_h
|
|
|
|
MADDR_Q 011110 1101 . ..... ..... ..... 011100 @3rf_h
|
|
|
|
MSUBR_Q 011110 1110 . ..... ..... ..... 011100 @3rf_h
|
2021-10-19 11:35:20 +03:00
|
|
|
|
2021-10-19 19:39:47 +03:00
|
|
|
AND_V 011110 00000 ..... ..... ..... 011110 @vec
|
|
|
|
OR_V 011110 00001 ..... ..... ..... 011110 @vec
|
|
|
|
NOR_V 011110 00010 ..... ..... ..... 011110 @vec
|
|
|
|
XOR_V 011110 00011 ..... ..... ..... 011110 @vec
|
|
|
|
BMNZ_V 011110 00100 ..... ..... ..... 011110 @vec
|
|
|
|
BMZ_V 011110 00101 ..... ..... ..... 011110 @vec
|
|
|
|
BSEL_V 011110 00110 ..... ..... ..... 011110 @vec
|
|
|
|
FILL 011110 11000000 .. ..... ..... 011110 @2r
|
|
|
|
PCNT 011110 11000001 .. ..... ..... 011110 @2r
|
|
|
|
NLOC 011110 11000010 .. ..... ..... 011110 @2r
|
|
|
|
NLZC 011110 11000011 .. ..... ..... 011110 @2r
|
|
|
|
FCLASS 011110 110010000 . ..... ..... 011110 @2rf
|
|
|
|
FTRUNC_S 011110 110010001 . ..... ..... 011110 @2rf
|
|
|
|
FTRUNC_U 011110 110010010 . ..... ..... 011110 @2rf
|
|
|
|
FSQRT 011110 110010011 . ..... ..... 011110 @2rf
|
|
|
|
FRSQRT 011110 110010100 . ..... ..... 011110 @2rf
|
|
|
|
FRCP 011110 110010101 . ..... ..... 011110 @2rf
|
|
|
|
FRINT 011110 110010110 . ..... ..... 011110 @2rf
|
|
|
|
FLOG2 011110 110010111 . ..... ..... 011110 @2rf
|
|
|
|
FEXUPL 011110 110011000 . ..... ..... 011110 @2rf
|
|
|
|
FEXUPR 011110 110011001 . ..... ..... 011110 @2rf
|
|
|
|
FFQL 011110 110011010 . ..... ..... 011110 @2rf
|
|
|
|
FFQR 011110 110011011 . ..... ..... 011110 @2rf
|
|
|
|
FTINT_S 011110 110011100 . ..... ..... 011110 @2rf
|
|
|
|
FTINT_U 011110 110011101 . ..... ..... 011110 @2rf
|
|
|
|
FFINT_S 011110 110011110 . ..... ..... 011110 @2rf
|
|
|
|
FFINT_U 011110 110011111 . ..... ..... 011110 @2rf
|
2021-10-28 23:38:21 +03:00
|
|
|
|
2021-10-19 19:39:47 +03:00
|
|
|
LD 011110 .......... ..... ..... 1000 .. @ldst
|
|
|
|
ST 011110 .......... ..... ..... 1001 .. @ldst
|