From 6a973e6b6584221bed89a01e755b88e58b496652 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Wed, 1 Jul 2015 15:59:13 +0200 Subject: target-mips: fix ASID synchronisation for MIPS MT When syncing the task ASID with EntryHi, correctly or the value instead of assigning it. Reported-by: "Dr. David Alan Gilbert" Signed-off-by: Aurelien Jarno Cc: Leon Alrae Reviewed-by: Leon Alrae Signed-off-by: Leon Alrae --- target-mips/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target-mips/op_helper.c') diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index 2a9ddff70f..d457a29f3e 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -661,7 +661,7 @@ static void sync_c0_tcstatus(CPUMIPSState *cpu, int tc, /* Sync the TASID with EntryHi. */ cpu->CP0_EntryHi &= ~0xff; - cpu->CP0_EntryHi = tasid; + cpu->CP0_EntryHi |= tasid; compute_hflags(cpu); } -- cgit 1.4.1 From fe87c2b36ae9c1c9a5279f3891f3bce1b573baa0 Mon Sep 17 00:00:00 2001 From: Leon Alrae Date: Tue, 14 Jul 2015 11:08:13 +0100 Subject: target-mips: correct DERET instruction Fix Debug Mode flag clearing, and when DERET is placed between LL and SC do not make SC fail. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- target-mips/op_helper.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'target-mips/op_helper.c') diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index d457a29f3e..9c28631dc1 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -2154,10 +2154,9 @@ void helper_deret(CPUMIPSState *env) debug_pre_eret(env); set_pc(env, env->CP0_DEPC); - env->hflags &= MIPS_HFLAG_DM; + env->hflags &= ~MIPS_HFLAG_DM; compute_hflags(env); debug_post_eret(env); - env->lladdr = 1; } #endif /* !CONFIG_USER_ONLY */ -- cgit 1.4.1