Browse Source

Don't write vxsat unless it's actually being set to 1

As requested by @marcfedorow:
https://github.com/riscv-software-src/riscv-isa-sim/issues/823#issuecomment-936509476

If mstatus.VS exists (i.e. Vector extension is enabled), it will no
longer be set to Dirty unless the instruction actually sets vxsat.

The mstatus.VS change only affects instructions in the P extension,
since Vector instructions will write other vector state and therefore
still set mstatus.VS=Dirty.

This also affects the commit log. Instructions that don't saturate
will no longer show a write to vxsat.
pull/826/head
Scott Johnson 5 years ago
parent
commit
2e873ce98e
No known key found for this signature in database GPG Key ID: 61C1F01D3D1410C9
  1. 2
      riscv/decode.h

2
riscv/decode.h

@ -2343,7 +2343,7 @@ reg_t index[P.VU.vlmax]; \
}
#define P_SET_OV(ov) \
P.VU.vxsat->write(P.VU.vxsat->read() | ov);
if (ov) P.VU.vxsat->write(1);
#define P_SAT(R, BIT) \
if (R > INT##BIT##_MAX) { \

Loading…
Cancel
Save