qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 5/6] simply cpu_exec further


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH 5/6] simply cpu_exec further
Date: Wed, 28 May 2008 21:03:59 +0300

On 5/28/08, Glauber Costa <address@hidden> wrote:
> We change interrupt functions so they have the same
>  signature, getting only an env parameter. When necessary,
>  some more attributed were added to the relevant CPUState to
>  make it possible.

>  -#elif defined(TARGET_SPARC)
>  -                    if ((interrupt_request & CPU_INTERRUPT_HARD) &&
>  -                       (env->psret != 0)) {
>  -                       int pil = env->interrupt_index & 15;
>  -                       int type = env->interrupt_index & 0xf0;
>  -
>  -                       if (((type == TT_EXTINT) &&
>  -                            (pil == 15 || pil > env->psrpil)) ||
>  -                           type != TT_EXTINT) {
>  -                           env->interrupt_request &= ~CPU_INTERRUPT_HARD;
>  -                            env->exception_index = env->interrupt_index;

The above line, which I added in the previous commit is missing below.

>  -                            do_interrupt(env);

>  +/* implemented by the targets */
>  +void cpu_handle_interrupt_request(CPUState *env);
>  +/* implemented by cpu-exec.c */
>  +void handle_interrupt_common(CPUState *env);
>  +void reset_tb(void);

Maybe also do_interrupt(CPUState *env) prototype could be better
defined here to save space and to discourage making different
versions.

>  diff --git a/target-sparc/helper.c b/target-sparc/helper.c
>  index 78a3fe5..68cf78c 100644
>  --- a/target-sparc/helper.c
>  +++ b/target-sparc/helper.c
>  @@ -866,6 +866,29 @@ void do_interrupt(CPUState *env)
>   }
>   #endif
>
>  +void cpu_handle_interrupt_request(CPUState *env)
>  +{
>  +    handle_interrupt_common(env);
>  +    if ((env->interrupt_request & CPU_INTERRUPT_HARD) && (env->psret != 0)) 
> {
>  +        int pil = env->interrupt_index & 15;
>  +        int type = env->interrupt_index & 0xf0;
>  +
>  +        if (((type == TT_EXTINT) &&
>  +            (pil == 15 || pil > env->psrpil)) || type != TT_EXTINT) {
>  +            env->interrupt_request &= ~CPU_INTERRUPT_HARD;

One line missing here.

>  +            do_interrupt(env);




reply via email to

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