1 #ifndef _LINUX_MATH_EMU_H
2 #define _LINUX_MATH_EMU_H
3
4 struct fpu_reg {
5 char sign;
6 char tag;
7 long exp;
8 unsigned sigl;
9 unsigned sigh;
10 };
11
12 struct info {
13 long ___orig_eip;
14 long ___ret_from_system_call;
15 long ___ebx;
16 long ___ecx;
17 long ___edx;
18 long ___esi;
19 long ___edi;
20 long ___ebp;
21 long ___eax;
22 long ___ds;
23 long ___es;
24 long ___fs;
25 long ___gs;
26 long ___orig_eax;
27 long ___eip;
28 long ___cs;
29 long ___eflags;
30 long ___esp;
31 long ___ss;
32 };
33
34 #if 0
35 #define EAX (info->___eax)
36 #define EBX (info->___ebx)
37 #define ECX (info->___ecx)
38 #define EDX (info->___edx)
39 #define ESI (info->___esi)
40 #define EDI (info->___edi)
41 #define EBP (info->___ebp)
42 #define ESP (info->___esp)
43 #define EIP (info->___eip)
44 #define ORIG_EIP (info->___orig_eip)
45 #define EFLAGS (info->___eflags)
46 #define DS (*(unsigned short *) &(info->___ds))
47 #define ES (*(unsigned short *) &(info->___es))
48 #define FS (*(unsigned short *) &(info->___fs))
49 #define CS (*(unsigned short *) &(info->___cs))
50 #define SS (*(unsigned short *) &(info->___ss))
51 #endif
52
53 void __math_abort(struct info *, unsigned int);
54
55 #define math_abort(x,y) \
56 (((volatile void (*)(struct info *,unsigned int)) __math_abort)((x),(y)))
57
58 #endif