restore_fpu_state(CPUSPARCState *env, qemu_siginfo_fpu_t *fpu)

{

        int err;

#if 0

#ifdef CONFIG_SMP

        if (current->flags & PF_USEDFPU)

                regs->psr &= ~PSR_EF;

#else

        if (current == last_task_used_math) {

                last_task_used_math = 0;

                regs->psr &= ~PSR_EF;

        }

#endif

        current->used_math = 1;

        current->flags &= ~PF_USEDFPU;

#endif

#if 0

        if (verify_area (VERIFY_READ, fpu, sizeof(*fpu)))

                return -EFAULT;

#endif



#if 0

        /* XXX: incorrect */

        err = __copy_from_user(&env->fpr[0], &fpu->si_float_regs[0],

	                             (sizeof(unsigned long) * 32));

#endif

        err |= __get_user(env->fsr, &fpu->si_fsr);

#if 0

        err |= __get_user(current->thread.fpqdepth, &fpu->si_fpqdepth);

        if (current->thread.fpqdepth != 0)

                err |= __copy_from_user(&current->thread.fpqueue[0],

                                        &fpu->si_fpqueue[0],

                                        ((sizeof(unsigned long) +

                                        (sizeof(unsigned long *)))*16));

#endif

        return err;

}

restore_fpu_state(CPUSPARCState *env, qemu_siginfo_fpu_t *fpu)

{

        int err;

#if 0

#ifdef CONFIG_SMP

        if (current->flags & PF_USEDFPU)

                regs->psr &= ~PSR_EF;

#else

        if (current == last_task_used_math) {

                last_task_used_math = 0;

                regs->psr &= ~PSR_EF;

        }

#endif

        current->used_math = 1;

        current->flags &= ~PF_USEDFPU;

#endif

#if 0

        if (verify_area (VERIFY_READ, fpu, sizeof(*fpu)))

                return -EFAULT;

#endif



#if 0

        

        err = __copy_from_user(&env->fpr[0], &fpu->si_float_regs[0],

	                             (sizeof(unsigned long) * 32));

#endif

        err |= __get_user(env->fsr, &fpu->si_fsr);

#if 0

        err |= __get_user(current->thread.fpqdepth, &fpu->si_fpqdepth);

        if (current->thread.fpqdepth != 0)

                err |= __copy_from_user(&current->thread.fpqueue[0],

                                        &fpu->si_fpqueue[0],

                                        ((sizeof(unsigned long) +

                                        (sizeof(unsigned long *)))*16));

#endif

        return err;

}

#if 0         err = __copy_from_user(&env->fpr[0], &fpu->si_float_regs[0], 	                             (sizeof(unsigned long) * 32)); #endif
FUNC_0(CPUSPARCState *VAR_0, qemu_siginfo_fpu_t *VAR_1)

{

        int VAR_2;

#if 0

#ifdef CONFIG_SMP

        if (current->flags & PF_USEDFPU)

                regs->psr &= ~PSR_EF;

#else

        if (current == last_task_used_math) {

                last_task_used_math = 0;

                regs->psr &= ~PSR_EF;

        }

#endif

        current->used_math = 1;

        current->flags &= ~PF_USEDFPU;

#endif

#if 0

        if (verify_area (VERIFY_READ, VAR_1, sizeof(*VAR_1)))

                return -EFAULT;

#endif



#if 0

        

        VAR_2 = __copy_from_user(&VAR_0->fpr[0], &VAR_1->si_float_regs[0],

	                             (sizeof(unsigned long) * 32));

#endif

        VAR_2 |= __get_user(VAR_0->fsr, &VAR_1->si_fsr);

#if 0

        VAR_2 |= __get_user(current->thread.fpqdepth, &VAR_1->si_fpqdepth);

        if (current->thread.fpqdepth != 0)

                VAR_2 |= __copy_from_user(&current->thread.fpqueue[0],

                                        &VAR_1->si_fpqueue[0],

                                        ((sizeof(unsigned long) +

                                        (sizeof(unsigned long *)))*16));

#endif

        return VAR_2;

}

FUNC_0(CPUSPARCState *VAR_0, qemu_siginfo_fpu_t *VAR_1)
{ int VAR_2; #if 0
#ifdef CONFIG_SMP
if (current->flags & PF_USEDFPU)
regs->psr &= ~PSR_EF; #else
if (current == last_task_used_math) { last_task_used_math = 0; regs->psr &= ~PSR_EF; } #endif
current->used_math = 1; current->flags &= ~PF_USEDFPU; #endif
#if 0
if (verify_area (VERIFY_READ, VAR_1, sizeof(*VAR_1)))
return -EFAULT; #endif
#if 0
VAR_2 = __copy_from_user(&VAR_0->fpr[0], &VAR_1->si_float_regs[0],
(sizeof(unsigned long) * 32)); #endif
VAR_2 |= __get_user(VAR_0->fsr, &VAR_1->si_fsr); #if 0
VAR_2 |= __get_user(current->thread.fpqdepth, &VAR_1->si_fpqdepth); if (current->thread.fpqdepth != 0)
VAR_2 |= __copy_from_user(&current->thread.fpqueue[0],
&VAR_1->si_fpqueue[0],
((sizeof(unsigned long) +
(sizeof(unsigned long *)))*16)); #endif
return VAR_2; }