qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v5 52/76] target/mips: Fix ERET/ERETNC behavior


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v5 52/76] target/mips: Fix ERET/ERETNC behavior related to ADEL exception
Date: Tue, 31 Jul 2018 15:26:06 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 07/30/2018 12:12 PM, Aleksandar Markovic wrote:
> diff --git a/target/mips/op_helper.c b/target/mips/op_helper.c
> index c55a1e6..e6749c5 100644
> --- a/target/mips/op_helper.c
> +++ b/target/mips/op_helper.c
> @@ -2430,6 +2430,13 @@ static void set_pc(CPUMIPSState *env, target_ulong 
> error_pc)
>      env->active_tc.PC = error_pc & ~(target_ulong)1;
>      if (env->insn_flags & ISA_NANOMIPS32) {
>          /* Don't clear MIPS_HFLAG_M16 */
> +        if (error_pc & 1) {
> +            if (!(env->hflags & MIPS_HFLAG_DM)) {
> +                env->CP0_BadVAddr = error_pc;
> +            }
> +            env->active_tc.PC = error_pc;
> +            do_raise_exception(env, EXCP_AdEL, 0);
> +        }

Isn't this taken care of by decode_nanomips_opc?
What do you gain by checking twice?


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]