• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Révision13dbc826fd086dd40b7a4d3f1cb3f1bc8454b586 (tree)
l'heure2022-01-21 14:52:56
AuteurFrank Chang <frank.chang@sifi...>
CommiterAlistair Francis

Message de Log

target/riscv: rvv-1.0: Add Zve64f support for vsmul.vv and vsmul.vx insns

All Zve* extensions support all vector fixed-point arithmetic
instructions, except that vsmul.vv and vsmul.vx are not supported
for EEW=64 in Zve64*.

Signed-off-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20220118014522.13613-6-frank.chang@sifive.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

Change Summary

Modification

--- a/target/riscv/insn_trans/trans_rvv.c.inc
+++ b/target/riscv/insn_trans/trans_rvv.c.inc
@@ -2123,8 +2123,31 @@ GEN_OPIVX_TRANS(vasub_vx, opivx_check)
21232123 GEN_OPIVX_TRANS(vasubu_vx, opivx_check)
21242124
21252125 /* Vector Single-Width Fractional Multiply with Rounding and Saturation */
2126-GEN_OPIVV_TRANS(vsmul_vv, opivv_check)
2127-GEN_OPIVX_TRANS(vsmul_vx, opivx_check)
2126+
2127+static bool vsmul_vv_check(DisasContext *s, arg_rmrr *a)
2128+{
2129+ /*
2130+ * All Zve* extensions support all vector fixed-point arithmetic
2131+ * instructions, except that vsmul.vv and vsmul.vx are not supported
2132+ * for EEW=64 in Zve64*. (Section 18.2)
2133+ */
2134+ return opivv_check(s, a) &&
2135+ (!has_ext(s, RVV) && s->ext_zve64f ? s->sew != MO_64 : true);
2136+}
2137+
2138+static bool vsmul_vx_check(DisasContext *s, arg_rmrr *a)
2139+{
2140+ /*
2141+ * All Zve* extensions support all vector fixed-point arithmetic
2142+ * instructions, except that vsmul.vv and vsmul.vx are not supported
2143+ * for EEW=64 in Zve64*. (Section 18.2)
2144+ */
2145+ return opivx_check(s, a) &&
2146+ (!has_ext(s, RVV) && s->ext_zve64f ? s->sew != MO_64 : true);
2147+}
2148+
2149+GEN_OPIVV_TRANS(vsmul_vv, vsmul_vv_check)
2150+GEN_OPIVX_TRANS(vsmul_vx, vsmul_vx_check)
21282151
21292152 /* Vector Single-Width Scaling Shift Instructions */
21302153 GEN_OPIVV_TRANS(vssrl_vv, opivv_check)