On 5/28/08, Glauber Costa <[EMAIL PROTECTED]> 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);
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to