]> 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)
committerAlistair Francis <alistair.francis@wdc.com>
Wed, 30 Oct 2024 01:22:07 +0000 (11:22 +1000)
commit5a60026cad4e9dba929cab4f63229e4b9110cf0a
treeefe01472102cc9f6a5daf4623228f5bb5260e114
parent58d49b5895f2e0b5cfe4b2901bf24f3320b74f29
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>
target/riscv/csr.c