/*
 * 5799-WZQ (C) COPYRIGHT IBM CORPORATION  1986,1987,1988
 * LICENSED MATERIALS - PROPERTY OF IBM
 * REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
 */
/* $Header:xFPexception.c 12.0$ */
/* $ACIS:xFPexception.c 12.0$ */
/* $Source: /ibm/acis/usr/sys/ca/RCS/xFPexception.c,v $ */
#if !defined(lint) && !defined(NO_RCS_HDRS)
static char *rcsid = "$Header:xFPexception.c 12.0$";
#endif

#include "param.h"
#include "signal.h"

#if	!defined(NFL)
#include "../machine/fp.h"
extern FP_MACH kern_fpm;
#endif	/* !defined(NFL) */

int fpa_valid = 0;

xFPexception()
{
#ifdef NFL
	if (!iskernel())
	      fpkill(fpgetpid(),SIGFPE);
	/* if it IS kernel, probably on user's behalf, so don't do anything! */
#else NFL
	printf("Kernel floating point exception raised: status=%b\n",
	    kern_fpm.status,
	   "\020\36INV_OPER\32OVERFLOW\30UNDERFLOW\34DIVIDE\7INEXACT");
#endif NFL
}
