aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYu-Ming Chang <yumin686@andestech.com>2024-03-08 15:48:03 +0800
committerAlistair Francis <alistair.francis@wdc.com>2024-07-18 12:08:45 +1000
commit38c83e8d3a333b8b377367756a2b6c700c7d0084 (patch)
tree40db608999be38ef578f2960d94840017240bbcb /scripts
parent6f6592d62ebaffff353bdd27ec4480972695d24b (diff)
downloadqemu-38c83e8d3a333b8b377367756a2b6c700c7d0084.zip
qemu-38c83e8d3a333b8b377367756a2b6c700c7d0084.tar.gz
qemu-38c83e8d3a333b8b377367756a2b6c700c7d0084.tar.bz2
target/riscv: raise an exception when CSRRS/CSRRC writes a read-only CSR
Both CSRRS and CSRRC always read the addressed CSR and cause any read side effects regardless of rs1 and rd fields. Note that if rs1 specifies a register holding a zero value other than x0, the instruction will still attempt to write the unmodified value back to the CSR and will cause any attendant side effects. So if CSRRS or CSRRC tries to write a read-only CSR with rs1 which specifies a register holding a zero value, an illegal instruction exception should be raised. Signed-off-by: Yu-Ming Chang <yumin686@andestech.com> Signed-off-by: Alvin Chang <alvinga@andestech.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <172100444279.18077.6893072378718059541-0@git.sr.ht> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions