target/mips: Convert MSA BIT instruction format to decodetree

Convert instructions with an immediate bit index and
data format df/m to decodetree.

Since the 'data format' field is a constant value, use
tcg_constant_i32() instead of a TCG temporary.

Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211028210843.2120802-11-f4bug@amsat.org>
This commit is contained in:
Philippe Mathieu-Daudé 2021-10-19 08:47:29 +02:00
parent b8e74816ec
commit 4701d23aef
2 changed files with 101 additions and 97 deletions

View file

@ -16,6 +16,10 @@
&msa_bz df wt sa
&msa_ldi df wd sa
&msa_i df wd ws sa
&msa_bit df wd ws m
%bit_df 16:7 !function=bit_df
%bit_m 16:7 !function=bit_m
@lsa ...... rs:5 rt:5 rd:5 ... sa:2 ...... &r
@bz_v ...... ... .. wt:5 sa:16 &msa_bz df=3
@ -23,6 +27,7 @@
@u5 ...... ... df:2 sa:5 ws:5 wd:5 ...... &msa_i
@s5 ...... ... df:2 sa:s5 ws:5 wd:5 ...... &msa_i
@ldi ...... ... df:2 sa:s10 wd:5 ...... &msa_ldi
@bit ...... ... ....... ws:5 wd:5 ...... &msa_bit df=%bit_df m=%bit_m
LSA 000000 ..... ..... ..... 000 .. 000101 @lsa
DLSA 000000 ..... ..... ..... 000 .. 010101 @lsa
@ -48,5 +53,19 @@ BNZ 010001 111 .. ..... ................ @bz
LDI 011110 110 .. .......... ..... 000111 @ldi
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
SAT_S 011110 000 ....... ..... ..... 001010 @bit
SAT_U 011110 001 ....... ..... ..... 001010 @bit
SRARI 011110 010 ....... ..... ..... 001010 @bit
SRLRI 011110 011 ....... ..... ..... 001010 @bit
MSA 011110 --------------------------
}