2001-04-10 05:04:59 +04:00
|
|
|
/*---------------------------------------------------------------------------+
|
|
|
|
| exception.h |
|
2003-10-04 16:52:29 +04:00
|
|
|
| $Id: exception.h,v 1.6 2003-10-04 12:52:29 sshwarts Exp $
|
2001-04-10 05:04:59 +04:00
|
|
|
| |
|
|
|
|
| Copyright (C) 1992 W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
|
|
|
|
| Australia. E-mail billm@vaxc.cc.monash.edu.au |
|
|
|
|
| |
|
|
|
|
+---------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
#ifndef _EXCEPTION_H_
|
|
|
|
#define _EXCEPTION_H_
|
|
|
|
|
|
|
|
#ifndef SW_C1
|
|
|
|
#include "fpu_emu.h"
|
2001-04-10 05:43:09 +04:00
|
|
|
#endif /* SW_C1 */
|
2001-04-10 05:04:59 +04:00
|
|
|
|
2003-07-31 21:39:24 +04:00
|
|
|
#define EX_ErrorSummary (0x0080) /* Error summary status */
|
2001-04-10 05:04:59 +04:00
|
|
|
/* Special exceptions: */
|
2003-07-31 21:39:24 +04:00
|
|
|
#define EX_StackOver (0x0041|SW_C1) /* stack overflow */
|
|
|
|
#define EX_StackUnder (0x0041) /* stack underflow */
|
2001-04-10 05:04:59 +04:00
|
|
|
/* Exception flags: */
|
2003-07-31 21:39:24 +04:00
|
|
|
#define EX_Precision (0x0020) /* loss of precision */
|
|
|
|
#define EX_Underflow (0x0010) /* underflow */
|
|
|
|
#define EX_Overflow (0x0008) /* overflow */
|
|
|
|
#define EX_ZeroDiv (0x0004) /* divide by zero */
|
|
|
|
#define EX_Denormal (0x0002) /* denormalized operand */
|
|
|
|
#define EX_Invalid (0x0001) /* invalid operation */
|
2001-04-10 05:04:59 +04:00
|
|
|
|
2003-07-31 21:39:24 +04:00
|
|
|
#define PRECISION_LOST_UP (EX_Precision | SW_C1)
|
|
|
|
#define PRECISION_LOST_DOWN (EX_Precision)
|
2001-04-10 05:04:59 +04:00
|
|
|
|
2003-07-31 21:39:24 +04:00
|
|
|
#define EXCEPTION(x) FPU_exception(x)
|
2003-10-04 16:32:56 +04:00
|
|
|
#define INTERNAL(x) FPU_internal(x)
|
2001-04-10 05:04:59 +04:00
|
|
|
|
2001-04-10 05:43:09 +04:00
|
|
|
#endif /* _EXCEPTION_H_ */
|