2 * arch/s390/kernel/s390fpu.c
5 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
6 * Author(s): Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
8 * s390fpu.h functions for saving & restoring the fpu state.
10 * I couldn't inline these as linux/sched.h included half the world
11 * & was required to at the task structure.
12 * & the functions were too complex to make macros from.
13 * ( & as usual I didn't feel like debugging inline code ).
16 #include <linux/sched.h>
18 void save_fp_regs(s390_fp_regs *fpregs)
21 * I don't think we can use STE here as this would load
22 * fp registers 0 & 2 into memory locations 0 & 1 etc.
24 asm volatile ("STFPC 0(%0)\n\t"
47 void restore_fp_regs(s390_fp_regs *fpregs)
49 /* If we don't mask with the FPC_VALID_MASK here
50 * we've got a very quick shutdown -h now command
51 * via a kernel specification exception.
53 fpregs->fpc&=FPC_VALID_MASK;
54 asm volatile ("LFPC 0(%0)\n\t"