Browse Source

Make sure VS is set on fault-only-first loads in all cases

We weren't setting it in the case that an exception was detected on
element 0, which is technically OK since no state changed, but is
inconsistent with how we handle regular vector loads.
pull/2207/head
Andrew Waterman 1 month ago
parent
commit
ea29ce276c
Failed to extract signature
  1. 6
      riscv/v_ext_macros.h

6
riscv/v_ext_macros.h

@ -1328,8 +1328,10 @@ VI_VX_ULOOP({ \
val = MMU.load<elt_width##_t>( \
baseAddr + (i * nf + fn) * sizeof(elt_width##_t)); \
} catch (trap_t& t) { \
if (i == 0) \
if (i == 0) { \
P.VU.vstart->write(0); /* dirty VS */ \
throw; /* Only take exception on zeroth element */ \
} \
/* Reduce VL if an exception occurs on a later element */ \
early_stop = true; \
P.VU.vl->write_raw(i); \
@ -1342,7 +1344,7 @@ VI_VX_ULOOP({ \
break; \
} \
} \
p->VU.vstart->write(0);
VECTOR_END;
#define VI_LD_WHOLE(elt_width) \
require_vector_novtype(true); \

Loading…
Cancel
Save