No need for SVR4/SunOS5 FPE_* codes as these are compatible with ours.
This commit is contained in:
parent
557593445b
commit
3de506eaf1
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: fpu.c,v 1.21 2003/10/05 21:13:23 pk Exp $ */
|
/* $NetBSD: fpu.c,v 1.22 2003/10/06 07:10:41 pk Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1992, 1993
|
* Copyright (c) 1992, 1993
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.21 2003/10/05 21:13:23 pk Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.22 2003/10/06 07:10:41 pk Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/proc.h>
|
#include <sys/proc.h>
|
||||||
|
@ -108,21 +108,17 @@ static u_char fpu_codes_native[] = {
|
||||||
X8(FPE_FLTOVF),
|
X8(FPE_FLTOVF),
|
||||||
X16(FPE_FLTINV)
|
X16(FPE_FLTINV)
|
||||||
};
|
};
|
||||||
#if defined(COMPAT_SUNOS) || defined(SVR4_COMPAT)
|
#if defined(COMPAT_SUNOS)
|
||||||
static u_char fpu_codes_compat[] = {
|
static u_char fpu_codes_sunos[] = {
|
||||||
X1(FPE_FLTINEX_TRAP),
|
X1(FPE_FLTINEX_TRAP),
|
||||||
X2(FPE_FLTDIV_TRAP),
|
X2(FPE_FLTDIV_TRAP),
|
||||||
X4(FPE_FLTUND_TRAP),
|
X4(FPE_FLTUND_TRAP),
|
||||||
X8(FPE_FLTOVF_TRAP),
|
X8(FPE_FLTOVF_TRAP),
|
||||||
X16(FPE_FLTOPERR_TRAP)
|
X16(FPE_FLTOPERR_TRAP)
|
||||||
};
|
};
|
||||||
#ifdef COMPAT_SUNOS
|
|
||||||
extern struct emul emul_sunos;
|
extern struct emul emul_sunos;
|
||||||
#endif
|
#endif /* SUNOS_COMPAT */
|
||||||
#ifdef COMPAT_SVR4
|
/* Note: SVR4(Solaris) FPE_* codes happen to be compatible with ours */
|
||||||
extern struct emul emul_svr4;
|
|
||||||
#endif
|
|
||||||
#endif /* {SUNOS,SVR4}_COMPAT */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The FPU gave us an exception. Clean up the mess. Note that the
|
* The FPU gave us an exception. Clean up the mess. Note that the
|
||||||
|
@ -146,14 +142,11 @@ fpu_cleanup(l, fs)
|
||||||
u_char *fpu_codes;
|
u_char *fpu_codes;
|
||||||
ksiginfo_t ksi;
|
ksiginfo_t ksi;
|
||||||
|
|
||||||
fpu_codes = (0
|
fpu_codes =
|
||||||
#ifdef COMPAT_SUNOS
|
#ifdef COMPAT_SUNOS
|
||||||
|| p->p_emul == &emul_sunos
|
(p->p_emul == &emul_sunos) ? fpu_codes_sunos :
|
||||||
#endif
|
#endif
|
||||||
#ifdef SVR4_COMPAT
|
fpu_codes_native;
|
||||||
|| p->p_emul == &emul_svr4
|
|
||||||
#endif
|
|
||||||
) ? fpu_codes_compat : fpu_codes_native;
|
|
||||||
|
|
||||||
switch ((fsr >> FSR_FTT_SHIFT) & FSR_FTT_MASK) {
|
switch ((fsr >> FSR_FTT_SHIFT) & FSR_FTT_MASK) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue