Révision | 13dbc826fd086dd40b7a4d3f1cb3f1bc8454b586 (tree) |
---|---|
l'heure | 2022-01-21 14:52:56 |
Auteur | Frank Chang <frank.chang@sifi...> |
Commiter | Alistair Francis |
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>
@@ -2123,8 +2123,31 @@ GEN_OPIVX_TRANS(vasub_vx, opivx_check) | ||
2123 | 2123 | GEN_OPIVX_TRANS(vasubu_vx, opivx_check) |
2124 | 2124 | |
2125 | 2125 | /* 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) | |
2128 | 2151 | |
2129 | 2152 | /* Vector Single-Width Scaling Shift Instructions */ |
2130 | 2153 | GEN_OPIVV_TRANS(vssrl_vv, opivv_check) |