26 #include <linux/module.h>
30 #include <linux/errno.h>
31 #include <linux/types.h>
32 #include <linux/kernel.h>
33 #include <linux/signal.h>
34 #include <linux/sched.h>
45 #ifdef CONFIG_FPE_NWFPE_XP
46 #define NWFPE_BITS "extended"
48 #define NWFPE_BITS "double"
54 #define fp_send_sig send_sig
55 #define kern_fp_enter fp_enter
64 if (cmd == THREAD_NOTIFY_FLUSH)
71 .notifier_call = nwfpe_notify,
86 static int __init fpe_init(
void)
88 if (
sizeof(FPA11) >
sizeof(
union fp_state)) {
93 if (
sizeof(FPREG) != 12) {
97 if (fpe_type[0] &&
strcmp(fpe_type,
"nwfpe"))
104 thread_register_notifier(&nwfpe_notifier_block);
113 static void __exit fpe_exit(
void)
115 thread_unregister_notifier(&nwfpe_notifier_block);
138 #ifdef CONFIG_DEBUG_USER
145 register unsigned int fpsr, cumulativeTraps;
147 #ifdef CONFIG_DEBUG_USER
150 "NWFPE: %s[%d] takes exception %08x at %pf from %08lx\n",
174 writeFPSR(fpsr | cumulativeTraps);
177 if (fpsr & (flags << 16))
188 #ifdef CONFIG_DEBUG_USER