target/riscv: update mstatus.SD when FS is set dirty

remove the check becuase SD bit should summarize FS and XS fields
unconditionally.

Backports commit 82f014671cf057de51c4a577c9e2ad637dcec6f9 from qemu
This commit is contained in:
ShihPo Hung 2020-03-21 12:22:44 -04:00 committed by Lioncash
parent 6bdd94bf26
commit 7fffc5208c

View file

@ -416,7 +416,7 @@ static void mark_fs_dirty(DisasContext *ctx)
tmp = tcg_temp_new(tcg_ctx);
tcg_gen_ld_tl(tcg_ctx, tmp, tcg_ctx->cpu_env, offsetof(CPURISCVState, mstatus));
tcg_gen_ori_tl(tcg_ctx, tmp, tmp, MSTATUS_FS);
tcg_gen_ori_tl(tcg_ctx, tmp, tmp, MSTATUS_FS | MSTATUS_SD);
tcg_gen_st_tl(tcg_ctx, tmp, tcg_ctx->cpu_env, offsetof(CPURISCVState, mstatus));
tcg_temp_free(tcg_ctx, tmp);
}