From a2c3b903b5a872f448d428051846c1572f610a76 Mon Sep 17 00:00:00 2001 From: Valery Ushakov Date: Fri, 13 Jan 2017 02:49:51 +0300 Subject: Copied NetBSD 386 version and mechanically applied Linux 386->power diff. --- NetBSD/power/include/emu.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 NetBSD/power/include/emu.h (limited to 'NetBSD') diff --git a/NetBSD/power/include/emu.h b/NetBSD/power/include/emu.h new file mode 100644 index 00000000..83af30d8 --- /dev/null +++ b/NetBSD/power/include/emu.h @@ -0,0 +1,28 @@ +/* + * system- and machine-specific declarations for emu: + * floating-point save and restore, signal handling primitive, and + * implementation of the current-process variable `up'. + */ + +/* + * This structure must agree with FPsave and FPrestore asm routines + */ +typedef struct FPU FPU; +struct FPU +{ + uchar env[18*8]; +}; + +#define KSTACK (32 * 1024) + +static __inline Proc *getup(void) { + Proc *p; + __asm__( "mr %0, 1" : "=r" (p)); + return *(Proc **)((unsigned long)p & ~(KSTACK - 1)); +}; + +#define up (getup()) + +typedef sigjmp_buf osjmpbuf; +#define ossetjmp(buf) sigsetjmp(buf, 1) + -- cgit v1.2.3