RISC-V: Clear mtval/stval on exceptions without info
authorMichael Clark <mjc@sifive.com>
Fri, 16 Mar 2018 19:12:00 +0000 (12:12 -0700)
committerMichael Clark <mjc@sifive.com>
Sat, 5 May 2018 22:39:38 +0000 (10:39 +1200)
commit67185dad16284467dba9b6159f9ec9ec53689582
tree6ee92a75ea5a597a8a33ffb6dc883679a4a57cf6
parent33e3bc8d77b6ce95e622bdc0fce622d35b7ee56c
RISC-V: Clear mtval/stval on exceptions without info

mtval/stval must be set on all exceptions but zero is
a legal value if there is no exception specific info.
Placing the instruction bytes for illegal instruction
exceptions in mtval/stval is an optional feature and
is currently not supported by QEMU RISC-V.

Cc: Sagar Karandikar <sagark@eecs.berkeley.edu>
Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Alistair Francis <Alistair.Francis@wdc.com>
Signed-off-by: Michael Clark <mjc@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/helper.c