target/loongarch: Add floating point load/store instruction translation

This includes:
- FLD.{S/D}, FST.{S/D}
- FLDX.{S/D}, FSTX.{S/D}
- FLD{GT/LE}.{S/D}, FST{GT/LE}.{S/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-15-yangxiaojuan@loongson.cn>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Song Gao 2022-06-06 20:43:04 +08:00 committed by Richard Henderson
parent b7dabd5624
commit e616bdfd01
3 changed files with 178 additions and 0 deletions

View file

@ -36,6 +36,8 @@
&fc fd cj
&cr cd rj
&rc rd cj
&frr fd rj rk
&fr_i fd rj imm
#
# Formats
@ -70,6 +72,8 @@
@fc .... ........ ..... ..... .. cj:3 fd:5 &fc
@cr .... ........ ..... ..... rj:5 .. cd:3 &cr
@rc .... ........ ..... ..... .. cj:3 rd:5 &rc
@frr .... ........ ..... rk:5 rj:5 fd:5 &frr
@fr_i12 .... ...... imm:s12 rj:5 fd:5 &fr_i
#
# Fixed point arithmetic operation instruction
@ -385,3 +389,23 @@ movfr2cf 0000 00010001 01001 10100 ..... 00 ... @cf
movcf2fr 0000 00010001 01001 10101 00 ... ..... @fc
movgr2cf 0000 00010001 01001 10110 ..... 00 ... @cr
movcf2gr 0000 00010001 01001 10111 00 ... ..... @rc
#
# Floating point load/store instruction
#
fld_s 0010 101100 ............ ..... ..... @fr_i12
fst_s 0010 101101 ............ ..... ..... @fr_i12
fld_d 0010 101110 ............ ..... ..... @fr_i12
fst_d 0010 101111 ............ ..... ..... @fr_i12
fldx_s 0011 10000011 00000 ..... ..... ..... @frr
fldx_d 0011 10000011 01000 ..... ..... ..... @frr
fstx_s 0011 10000011 10000 ..... ..... ..... @frr
fstx_d 0011 10000011 11000 ..... ..... ..... @frr
fldgt_s 0011 10000111 01000 ..... ..... ..... @frr
fldgt_d 0011 10000111 01001 ..... ..... ..... @frr
fldle_s 0011 10000111 01010 ..... ..... ..... @frr
fldle_d 0011 10000111 01011 ..... ..... ..... @frr
fstgt_s 0011 10000111 01100 ..... ..... ..... @frr
fstgt_d 0011 10000111 01101 ..... ..... ..... @frr
fstle_s 0011 10000111 01110 ..... ..... ..... @frr
fstle_d 0011 10000111 01111 ..... ..... ..... @frr