/* Emulator context save/restore to/from a signal context presumed to be on the user stack, and therefore accessed with appropriate macros from uaccess.h  */
int fpu_emulator_save_context(struct sigcontext __user *sc)
/* Emulator context save/restore to/from a signal context presumed to be on the user stack, and therefore accessed with appropriate macros from uaccess.h  */
int fpu_emulator_save_context(struct sigcontext __user *sc)
{
	int i;
	int err = 0;
	for (i = 0; i < 32; i++) {
		err |=
		    __put_user(current->thread.fpu.fpr[i], &sc->sc_fpregs[i]);
	}
	err |= __put_user(current->thread.fpu.fcr31, &sc->sc_fpc_csr);
	return err;
}