Révision | 494104093fafab12208a8f1f0cb2ab5f5c8c7035 (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 load and store insns
All Zve* extensions support all vector load and store instructions,
except Zve64* extensions do not support EEW=64 for index values when
XLEN=32.
Signed-off-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20220118014522.13613-4-frank.chang@sifive.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
@@ -263,10 +263,21 @@ static bool vext_check_st_index(DisasContext *s, int vd, int vs2, int nf, | ||
263 | 263 | uint8_t eew) |
264 | 264 | { |
265 | 265 | int8_t emul = eew - s->sew + s->lmul; |
266 | - return (emul >= -3 && emul <= 3) && | |
267 | - require_align(vs2, emul) && | |
268 | - require_align(vd, s->lmul) && | |
269 | - require_nf(vd, nf, s->lmul); | |
266 | + bool ret = (emul >= -3 && emul <= 3) && | |
267 | + require_align(vs2, emul) && | |
268 | + require_align(vd, s->lmul) && | |
269 | + require_nf(vd, nf, s->lmul); | |
270 | + | |
271 | + /* | |
272 | + * All Zve* extensions support all vector load and store instructions, | |
273 | + * except Zve64* extensions do not support EEW=64 for index values | |
274 | + * when XLEN=32. (Section 18.2) | |
275 | + */ | |
276 | + if (get_xl(s) == MXL_RV32) { | |
277 | + ret &= (!has_ext(s, RVV) && s->ext_zve64f ? eew != MO_64 : true); | |
278 | + } | |
279 | + | |
280 | + return ret; | |
270 | 281 | } |
271 | 282 | |
272 | 283 | /* |