]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/riscv/csr.c: Fix an access to VXSAT
authorEvgenii Prokopiev <evgenii.prokopiev@syntacore.com>
Wed, 2 Oct 2024 08:44:36 +0000 (11:44 +0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 10 Nov 2024 08:09:43 +0000 (11:09 +0300)
commit5e0f5840b9a3964a890cb84b217ecf1478a67fed
tree4593043f47539feac5e9715a0a863c7df88e0a84
parent0c826be9969433abb6045240d17eb031c755bf24
target/riscv/csr.c: Fix an access to VXSAT

The register VXSAT should be RW only to the first bit.
The remaining bits should be 0.

The RISC-V Instruction Set Manual Volume I: Unprivileged Architecture

The vxsat CSR has a single read-write least-significant bit (vxsat[0])
that indicates if a fixed-point instruction has had to saturate an output
value to fit into a destination format. Bits vxsat[XLEN-1:1]
should be written as zeros.

Signed-off-by: Evgenii Prokopiev <evgenii.prokopiev@syntacore.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20241002084436.89347-1-evgenii.prokopiev@syntacore.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
(cherry picked from commit 5a60026cad4e9dba929cab4f63229e4b9110cf0a)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/riscv/csr.c