OSDN Git Service

target/riscv: Backup/restore mstatus.SD bit when virtual register swapped
authorFrank Chang <frank.chang@sifive.com>
Tue, 14 Sep 2021 01:37:15 +0000 (09:37 +0800)
committerAlistair Francis <alistair.francis@wdc.com>
Tue, 21 Sep 2021 02:10:22 +0000 (12:10 +1000)
commitc6013547560c33068dca3368ca7cd74b13f1a780
tree7dfffc33d202017b38b518f74fb16a143c83c93a
parent758c07c9fca1ad9716820feb346cec0553968011
target/riscv: Backup/restore mstatus.SD bit when virtual register swapped

When virtual registers are swapped, mstatus.SD bit should also be
backed up/restored. Otherwise, mstatus.SD bit will be incorrectly kept
across the world switches.

Signed-off-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Vincent Chen <vincent.chen@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20210914013717.881430-1-frank.chang@sifive.com
[ Changes by AF:
 - Convert variable to a uint64_t to fix clang error
]
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/cpu_helper.c