xref: /inferno-os/Plan9/power/include/emu.h (revision 90ccc69f5be0b7e26c3607dac07340fe3e271509)
1*90ccc69fSforsyth /*
2*90ccc69fSforsyth  * system- and machine-specific declarations for emu:
3*90ccc69fSforsyth  * floating-point save and restore, signal handling primitive, and
4*90ccc69fSforsyth  * implementation of the current-process variable `up'.
5*90ccc69fSforsyth  */
6*90ccc69fSforsyth 
7*90ccc69fSforsyth extern	Proc**	Xup;
8*90ccc69fSforsyth #define	up	(*Xup)
9*90ccc69fSforsyth 
10*90ccc69fSforsyth typedef	struct	FPU	FPU;
11*90ccc69fSforsyth 
12*90ccc69fSforsyth /*
13*90ccc69fSforsyth  * This structure must agree with FPsave and FPrestore asm routines
14*90ccc69fSforsyth  */
15*90ccc69fSforsyth typedef struct FPU FPU;
16*90ccc69fSforsyth struct FPU
17*90ccc69fSforsyth {
18*90ccc69fSforsyth 	double	fpreg[32];
19*90ccc69fSforsyth 	union {
20*90ccc69fSforsyth 		double	fpscrd;
21*90ccc69fSforsyth 		struct {
22*90ccc69fSforsyth 			ulong	pad;
23*90ccc69fSforsyth 			ulong	fpscr;
24*90ccc69fSforsyth 		};
25*90ccc69fSforsyth 	};
26*90ccc69fSforsyth };
27*90ccc69fSforsyth 
28*90ccc69fSforsyth typedef jmp_buf osjmpbuf;
29*90ccc69fSforsyth #define	ossetjmp(buf)	setjmp(buf)
30*90ccc69fSforsyth 
31