diff options
| author | forsyth <forsyth@vitanuova.com> | 2011-02-25 10:59:02 +0000 |
|---|---|---|
| committer | forsyth <forsyth@vitanuova.com> | 2011-02-25 10:59:02 +0000 |
| commit | 90ccc69f5be0b7e26c3607dac07340fe3e271509 (patch) | |
| tree | 97f0ca5a225bf4efc8ee8a9e7403d34a41e17412 /MacOSX | |
| parent | 54d06533f3d8d73d9369206f7f5be71351cfbcf3 (diff) | |
20110225-1058
Diffstat (limited to 'MacOSX')
| -rw-r--r-- | MacOSX/386/include/emu.h | 34 | ||||
| -rw-r--r-- | MacOSX/power/include/emu.h | 22 |
2 files changed, 56 insertions, 0 deletions
diff --git a/MacOSX/386/include/emu.h b/MacOSX/386/include/emu.h new file mode 100644 index 00000000..1e938b8d --- /dev/null +++ b/MacOSX/386/include/emu.h @@ -0,0 +1,34 @@ +/* + * system- and machine-specific declarations for emu: + * floating-point save and restore, signal handling primitive, and + * implementation of the current-process variable `up'. + */ + +extern Proc *getup(void); +#define up (getup()) + +/* + * This structure must agree with FPsave and FPrestore asm routines + */ + +// something is at odds between i386/fpu.h and some of the thread headers +#define fp_control inffp_control +#define fp_control_t inffp_control_t +#define fp_status inffp_status +#define fp_status_t inffp_status_t + +#include <architecture/i386/fpu.h> + +typedef struct FPU FPU; +struct FPU +{ + fp_state_t env; +}; + +#undef fp_control +#undef fp_control_t +#undef fp_status +#undef fp_status_t + +typedef sigjmp_buf osjmpbuf; +#define ossetjmp(buf) sigsetjmp(buf, 1) diff --git a/MacOSX/power/include/emu.h b/MacOSX/power/include/emu.h new file mode 100644 index 00000000..acef66d0 --- /dev/null +++ b/MacOSX/power/include/emu.h @@ -0,0 +1,22 @@ +/* + * system- and machine-specific declarations for emu: + * floating-point save and restore, signal handling primitive, and + * implementation of the current-process variable `up'. + */ + +extern Proc *getup(void); +#define up (getup()) + +/* + * This structure must agree with FPsave and FPrestore asm routines + */ + +#include <architecture/ppc/fp_regs.h> + +typedef union { + double __dbl; + ppc_fp_scr_t __src; +} FPU; + +typedef sigjmp_buf osjmpbuf; +#define ossetjmp(buf) sigsetjmp(buf, 1) |
