target/riscv: Relax UXL field for debugging
Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20220120122050.41546-24-zhiwei_liu@c-sky.com Signed-off-by: Alistair Francis <alistair.francis@wdc.com>staging
parent
f310df58bd
commit
f297245f6a
|
@ -584,7 +584,7 @@ static RISCVException write_mstatus(CPURISCVState *env, int csrno,
|
||||||
MSTATUS_MPP | MSTATUS_MXR | MSTATUS_TVM | MSTATUS_TSR |
|
MSTATUS_MPP | MSTATUS_MXR | MSTATUS_TVM | MSTATUS_TSR |
|
||||||
MSTATUS_TW | MSTATUS_VS;
|
MSTATUS_TW | MSTATUS_VS;
|
||||||
|
|
||||||
if (xl != MXL_RV32) {
|
if (xl != MXL_RV32 || env->debugger) {
|
||||||
/*
|
/*
|
||||||
* RV32: MPV and GVA are not in mstatus. The current plan is to
|
* RV32: MPV and GVA are not in mstatus. The current plan is to
|
||||||
* add them to mstatush. For now, we just don't support it.
|
* add them to mstatush. For now, we just don't support it.
|
||||||
|
@ -900,7 +900,7 @@ static RISCVException read_sstatus_i128(CPURISCVState *env, int csrno,
|
||||||
{
|
{
|
||||||
uint64_t mask = sstatus_v1_10_mask;
|
uint64_t mask = sstatus_v1_10_mask;
|
||||||
uint64_t sstatus = env->mstatus & mask;
|
uint64_t sstatus = env->mstatus & mask;
|
||||||
if (env->xl != MXL_RV32) {
|
if (env->xl != MXL_RV32 || env->debugger) {
|
||||||
mask |= SSTATUS64_UXL;
|
mask |= SSTATUS64_UXL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -912,7 +912,7 @@ static RISCVException read_sstatus(CPURISCVState *env, int csrno,
|
||||||
target_ulong *val)
|
target_ulong *val)
|
||||||
{
|
{
|
||||||
target_ulong mask = (sstatus_v1_10_mask);
|
target_ulong mask = (sstatus_v1_10_mask);
|
||||||
if (env->xl != MXL_RV32) {
|
if (env->xl != MXL_RV32 || env->debugger) {
|
||||||
mask |= SSTATUS64_UXL;
|
mask |= SSTATUS64_UXL;
|
||||||
}
|
}
|
||||||
/* TODO: Use SXL not MXL. */
|
/* TODO: Use SXL not MXL. */
|
||||||
|
@ -925,7 +925,7 @@ static RISCVException write_sstatus(CPURISCVState *env, int csrno,
|
||||||
{
|
{
|
||||||
target_ulong mask = (sstatus_v1_10_mask);
|
target_ulong mask = (sstatus_v1_10_mask);
|
||||||
|
|
||||||
if (env->xl != MXL_RV32) {
|
if (env->xl != MXL_RV32 || env->debugger) {
|
||||||
if ((val & SSTATUS64_UXL) != 0) {
|
if ((val & SSTATUS64_UXL) != 0) {
|
||||||
mask |= SSTATUS64_UXL;
|
mask |= SSTATUS64_UXL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue