/* Environment information of floating point unit */
struct env87 {
- long en_cw; /* control word (16bits) */
- long en_sw; /* status word (16bits) */
- long en_tw; /* tag word (16bits) */
- long en_fip; /* floating point instruction pointer */
+ int32_t en_cw; /* control word (16bits) */
+ int32_t en_sw; /* status word (16bits) */
+ int32_t en_tw; /* tag word (16bits) */
+ int32_t en_fip; /* floating point instruction pointer */
u_short en_fcs; /* floating code segment selector */
u_short en_opcode; /* opcode last executed (11 bits ) */
- long en_foo; /* floating operand offset */
- long en_fos; /* floating operand segment selector */
+ int32_t en_foo; /* floating operand offset */
+ int32_t en_fos; /* floating operand segment selector */
};
/* Contents of each floating point accumulator */
struct fpacc87 {
#ifdef dontdef /* too unportable */
- u_long fp_mantlo; /* mantissa low (31:0) */
- u_long fp_manthi; /* mantissa high (63:32) */
+ u_int32_t fp_mantlo; /* mantissa low (31:0) */
+ u_int32_t fp_manthi; /* mantissa high (63:32) */
int fp_exp:15; /* exponent */
int fp_sgn:1; /* mantissa sign */
#else
struct save87 {
struct env87 sv_env; /* floating point control/status */
struct fpacc87 sv_ac[8]; /* accumulator contents, 0-7 */
- u_long sv_unused001;
+ u_int32_t sv_unused001;
/*
* Bogus padding for emulators. Emulators should use their own
* struct and arrange to store into this struct (ending here)
u_char fp_pad[6]; /* 6 (padding) */
} sv_fp[8];
struct xmmacc sv_xmm[8]; /* 128 */
- u_long sv_unused001;
+ u_int32_t sv_unused001;
u_char sv_pad[220];
} __attribute__((aligned(16)));
* used the FP unit. This also occurs when a thread pushes a
* signal handler and uses FP in the handler.
*/
+ crit_enter();
if ((td->td_flags & (TDF_USINGFP | TDF_KERNELFP)) == 0) {
td->td_flags |= TDF_USINGFP;
npxinit(__INITIAL_NPXCW__);
* and then restore the garbage rather then the originally saved
* fpstate.
*/
- crit_enter();
stop_emulating();
/*
* Record new context early in case frstor causes an IRQ13.