qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] target-mips: fix offset calculation for Interru


From: Leon Alrae
Subject: Re: [Qemu-devel] [PATCH] target-mips: fix offset calculation for Interrupts
Date: Fri, 24 Jul 2015 16:10:31 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 10/07/2015 12:10, Yongbok Kim wrote:
> Correct computation of vector offsets for EXCP_EXT_INTERRUPT.
> For instance, if Cause.IV is 0 the vector offset should be 0x180.
> 
> Simplify the finding vector number logic for the Vectored Interrupts.

I think this message would be much better if it was more explicit about the
bugs you fixed in this patch as it's not that clear at first glance from the
diff (especially that you've rewritten the whole block).

> 
> Signed-off-by: Yongbok Kim <address@hidden>
> ---
>  target-mips/helper.c    |   47 
> ++++++++++++++++++++++-------------------------
>  target-mips/op_helper.c |    2 --
>  2 files changed, 22 insertions(+), 27 deletions(-)

> +        if (env->CP0_Cause & (1 << CP0Ca_IV)) {
> +            uint32_t spacing = (env->CP0_IntCtl >> CP0IntCtl_VS) &0x1f;

whitespace before 0x1f

> +                uint32_t pending = (env->CP0_Cause & CP0Ca_IP_mask)
> +                                   >> CP0Ca_IP;

no need to break the line

> +                    pending &= (env->CP0_Status >> CP0St_IM) &0xff;

whitespace before 0xff

Anyway, this implementation looks correct to me. Since it fixes the offset
when Cause.IV=0 on CPUs supporting Vectored Interrupts which looks like a
major issue I think we should apply it to 2.4. I'll include it in the -rc3
pull request.

Thanks,
Leon




reply via email to

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