Make these compile with options DEBUG_FPE.

This commit is contained in:
tsutsui 2007-03-09 16:23:01 +00:00
parent fb3988281d
commit 369fa66d6e
2 changed files with 9 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: fpu_emulate.c,v 1.26 2005/12/11 12:17:52 christos Exp $ */
/* $NetBSD: fpu_emulate.c,v 1.27 2007/03/09 16:23:01 tsutsui Exp $ */
/*
* Copyright (c) 1995 Gordon W. Ross
@ -37,8 +37,9 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: fpu_emulate.c,v 1.26 2005/12/11 12:17:52 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: fpu_emulate.c,v 1.27 2007/03/09 16:23:01 tsutsui Exp $");
#include <sys/param.h>
#include <sys/types.h>
#include <sys/signal.h>
#include <sys/systm.h>
@ -924,7 +925,8 @@ fpu_emul_arith(fe, insn)
fpregs[regnum*3], fpregs[regnum*3+1],
fpregs[regnum*3+2], regnum);
} else if (sig == 0) {
static char *class_name[] = { "SNAN", "QNAN", "ZERO", "NUM", "INF" };
static const char *class_name[] =
{ "SNAN", "QNAN", "ZERO", "NUM", "INF" };
printf("fpu_emul_arith: result(%s,%c,%d,%08x,%08x,%08x) discarded\n",
class_name[res->fp_class + 2],
res->fp_sign ? '-' : '+', res->fp_exp,

View File

@ -1,4 +1,4 @@
/* $NetBSD: fpu_fstore.c,v 1.9 2005/12/11 12:17:52 christos Exp $ */
/* $NetBSD: fpu_fstore.c,v 1.10 2007/03/09 16:23:01 tsutsui Exp $ */
/*
* Copyright (c) 1995 Ken Nakata
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: fpu_fstore.c,v 1.9 2005/12/11 12:17:52 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: fpu_fstore.c,v 1.10 2007/03/09 16:23:01 tsutsui Exp $");
#include <sys/types.h>
#include <sys/signal.h>
@ -115,7 +115,8 @@ fpu_emul_fstore(fe, insn)
fpu_explode(fe, &fe->fe_f3, FTYPE_EXT, &fpregs[regnum * 3]);
#if DEBUG_FPE
{
static char *class_name[] = { "SNAN", "QNAN", "ZERO", "NUM", "INF" };
static const char *class_name[] =
{ "SNAN", "QNAN", "ZERO", "NUM", "INF" };
printf(" fpu_emul_fstore: fpn (%s,%c,%d,%08x,%08x,%08x)\n",
class_name[fe->fe_f3.fp_class + 2],
fe->fe_f3.fp_sign ? '-' : '+', fe->fe_f3.fp_exp,