1 #include <linux/types.h>
2 #include <linux/errno.h>
3 #include <asm/uaccess.h>
5 #include <asm/sfp-machine.h>
6 #include <math-emu/soft-fp.h>
9 mtfsf(unsigned int FM
, u32
*frB
)
39 __FPU_FPSCR
&= ~(mask
);
40 __FPU_FPSCR
|= (frB
[1] & mask
);
42 __FPU_FPSCR
&= ~(FPSCR_VX
);
43 if (__FPU_FPSCR
& (FPSCR_VXSNAN
| FPSCR_VXISI
| FPSCR_VXIDI
|
44 FPSCR_VXZDZ
| FPSCR_VXIMZ
| FPSCR_VXVC
|
45 FPSCR_VXSOFT
| FPSCR_VXSQRT
| FPSCR_VXCVI
))
46 __FPU_FPSCR
|= FPSCR_VX
;
49 fpscr
&= ~(FPSCR_FEX
);
50 if (((fpscr
& FPSCR_VX
) && (fpscr
& FPSCR_VE
)) ||
51 ((fpscr
& FPSCR_OX
) && (fpscr
& FPSCR_OE
)) ||
52 ((fpscr
& FPSCR_UX
) && (fpscr
& FPSCR_UE
)) ||
53 ((fpscr
& FPSCR_ZX
) && (fpscr
& FPSCR_ZE
)) ||
54 ((fpscr
& FPSCR_XX
) && (fpscr
& FPSCR_XE
)))
59 printk("%s: %02x %p: %08lx\n", __func__
, FM
, frB
, __FPU_FPSCR
);