mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
target/loongarch: Separate the hardware flags into MMU index and PLV
Regarding the patchset v3 has been merged into main line, and not
approved, this patch updates to patchset v4.
Fixes: b4bda200
("target/loongarch: Adjust the layout of hardware flags bit fields")
Link: https://lists.nongnu.org/archive/html/qemu-devel/2022-11/msg00808.html
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Rui Wang <wangrui@loongson.cn>
Message-Id: <20221107024526.702297-2-wangrui@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
This commit is contained in:
parent
466e81ff12
commit
c8885b8839
5 changed files with 18 additions and 16 deletions
|
@ -159,7 +159,7 @@ static const CSRInfo csr_info[] = {
|
|||
|
||||
static bool check_plv(DisasContext *ctx)
|
||||
{
|
||||
if (ctx->mem_idx == MMU_USER_IDX) {
|
||||
if (ctx->plv == MMU_PLV_USER) {
|
||||
generate_exception(ctx, EXCCODE_IPE);
|
||||
return true;
|
||||
}
|
||||
|
@ -335,7 +335,7 @@ TRANS(iocsrwr_d, gen_iocsrwr, gen_helper_iocsrwr_d)
|
|||
|
||||
static void check_mmu_idx(DisasContext *ctx)
|
||||
{
|
||||
if (ctx->mem_idx != MMU_DA_IDX) {
|
||||
if (ctx->mem_idx != MMU_IDX_DA) {
|
||||
tcg_gen_movi_tl(cpu_pc, ctx->base.pc_next + 4);
|
||||
ctx->base.is_jmp = DISAS_EXIT;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue