target/loongarch: Add fixed point shift instruction translation

This includes:
- SLL.W, SRL.W, SRA.W, ROTR.W
- SLLI.W, SRLI.W, SRAI.W, ROTRI.W
- SLL.D, SRL.D, SRA.D, ROTR.D
- SLLI.D, SRLI.D, SRAI.D, ROTRI.D

Signed-off-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: Xiaojuan Yang <yangxiaojuan@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220606124333.2060567-6-yangxiaojuan@loongson.cn>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Song Gao 2022-06-06 20:42:55 +08:00 committed by Richard Henderson
parent 143d6785ef
commit 63cfcd47d7
3 changed files with 129 additions and 0 deletions

View file

@ -23,6 +23,8 @@
#
@rrr .... ........ ..... rk:5 rj:5 rd:5 &rrr
@r_i20 .... ... imm:s20 rd:5 &r_i
@rr_ui5 .... ........ ..... imm:5 rj:5 rd:5 &rr_i
@rr_ui6 .... ........ .... imm:6 rj:5 rd:5 &rr_i
@rr_i12 .... ...... imm:s12 rj:5 rd:5 &rr_i
@rr_ui12 .... ...... imm:12 rj:5 rd:5 &rr_i
@rr_i16 .... .. imm:s16 rj:5 rd:5 &rr_i
@ -77,3 +79,23 @@ addu16i_d 0001 00 ................ ..... ..... @rr_i16
andi 0000 001101 ............ ..... ..... @rr_ui12
ori 0000 001110 ............ ..... ..... @rr_ui12
xori 0000 001111 ............ ..... ..... @rr_ui12
#
# Fixed point shift operation instruction
#
sll_w 0000 00000001 01110 ..... ..... ..... @rrr
srl_w 0000 00000001 01111 ..... ..... ..... @rrr
sra_w 0000 00000001 10000 ..... ..... ..... @rrr
sll_d 0000 00000001 10001 ..... ..... ..... @rrr
srl_d 0000 00000001 10010 ..... ..... ..... @rrr
sra_d 0000 00000001 10011 ..... ..... ..... @rrr
rotr_w 0000 00000001 10110 ..... ..... ..... @rrr
rotr_d 0000 00000001 10111 ..... ..... ..... @rrr
slli_w 0000 00000100 00001 ..... ..... ..... @rr_ui5
slli_d 0000 00000100 0001 ...... ..... ..... @rr_ui6
srli_w 0000 00000100 01001 ..... ..... ..... @rr_ui5
srli_d 0000 00000100 0101 ...... ..... ..... @rr_ui6
srai_w 0000 00000100 10001 ..... ..... ..... @rr_ui5
srai_d 0000 00000100 1001 ...... ..... ..... @rr_ui6
rotri_w 0000 00000100 11001 ..... ..... ..... @rr_ui5
rotri_d 0000 00000100 1101 ...... ..... ..... @rr_ui6