diff options
| author | Chih-Min Chao <chihmin.chao@sifive.com> | 2026-04-02 08:52:15 +0800 |
|---|---|---|
| committer | Chih-Min Chao <chihmin.chao@sifive.com> | 2026-04-20 00:30:15 -0700 |
| commit | 91a0debd84b16054dfa38ab38fbbcbfd1e52d9ec (patch) | |
| tree | 9ebd2298197a00167a917be26b7ffb378f78b0ad /.github/workflows | |
| parent | 9983d2049fd297c1683fa8bdd7f7eeaebcaafea7 (diff) | |
| download | riscv-isa-sim-91a0debd84b16054dfa38ab38fbbcbfd1e52d9ec.tar.gz riscv-isa-sim-91a0debd84b16054dfa38ab38fbbcbfd1e52d9ec.tar.bz2 riscv-isa-sim-91a0debd84b16054dfa38ab38fbbcbfd1e52d9ec.zip | |
rvp: add missing vxsat CSR writes for 70 saturating instructions
Per the P-extension spec, any instruction that performs saturation must
set the vxsat CSR to 1 when the result is clamped. 70 instructions were
missing this write, addressed here in two ways:
1. Convert P_SAT, P_USAT, and P_USAT_FULL macros from pure expression
macros to GCC statement expressions that detect when saturation
occurs and write P.VU.vxsat. This automatically fixes ~42
instructions that use these macros (nclip/nclipi/nclipr/nclipri
families, psati, psslai, pssh1sadd, pusati, sati, usati, ssh1sadd,
sslai, and their packed/double-wide variants).
2. Add explicit vxsat writes to 22 instructions with inline saturation
logic that bypasses the macros:
- mulq/mulqr/pmulq/pmulqr: set vxsat on INT_MIN * INT_MIN overflow
- psas/pssa cross variants: set vxsat from sat_add/sat_sub sat flag
- pssha/psshar DW variants: set vxsat from ov overflow flag
- pssha/psshar/ssha/sshar: set vxsat in sshamt >= BIT overflow path
- pusati_dh/pusati_dw: set vxsat on unsigned range clamping
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
Diffstat (limited to '.github/workflows')
0 files changed, 0 insertions, 0 deletions
