xref: /csrg-svn/sys/sparc/include/signal.h (revision 55501)
155126Storek /*
255126Storek  * Copyright (c) 1992 The Regents of the University of California.
355126Storek  * All rights reserved.
455126Storek  *
555126Storek  * This software was developed by the Computer Systems Engineering group
655126Storek  * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
755126Storek  * contributed to Berkeley.
855126Storek  *
9*55501Sbostic  * All advertising materials mentioning features or use of this software
10*55501Sbostic  * must display the following acknowledgement:
11*55501Sbostic  *	This product includes software developed by the University of
12*55501Sbostic  *	California, Lawrence Berkeley Laboratories.
13*55501Sbostic  *
1455126Storek  * %sccs.include.redist.c%
1555126Storek  *
16*55501Sbostic  *	@(#)signal.h	7.2 (Berkeley) 07/21/92
1755126Storek  *
1855126Storek  * from: $Header: signal.h,v 1.4 92/06/17 06:10:28 torek Exp $
1955126Storek  */
2055126Storek 
2155126Storek #ifndef LOCORE
2255126Storek /*
2355126Storek  * Information pushed on stack when a signal is delivered.
2455126Storek  * This is used by the kernel to restore state following
2555126Storek  * execution of the signal handler.  It is also made available
2655126Storek  * to the handler to allow it to restore state properly if
2755126Storek  * a non-standard exit is performed.
2855126Storek  *
2955126Storek  * All machines must have an sc_onstack and sc_mask.
3055126Storek  */
3155126Storek struct sigcontext {
3255126Storek 	int	sc_onstack;		/* sigstack state to restore */
3355126Storek 	int	sc_mask;		/* signal mask to restore */
3455126Storek 	/* begin machine dependent portion */
3555126Storek 	int	sc_sp;			/* %sp to restore */
3655126Storek 	int	sc_pc;			/* pc to restore */
3755126Storek 	int	sc_npc;			/* npc to restore */
3855126Storek 	int	sc_psr;			/* psr to restore */
3955126Storek 	int	sc_g1;			/* %g1 to restore */
4055126Storek 	int	sc_o0;			/* %o0 to restore */
4155126Storek };
4255126Storek #else /* LOCORE */
4355126Storek #define	SC_SP_OFFSET	8
4455126Storek #define	SC_PC_OFFSET	12
4555126Storek #define	SC_NPC_OFFSET	16
4655126Storek #define	SC_PSR_OFFSET	20
4755126Storek #define	SC_G1_OFFSET	24
4855126Storek #define	SC_O0_OFFSET	28
4955126Storek #endif /* LOCORE */
5055126Storek 
5155126Storek /*
5255126Storek  * `Code' arguments to signal handlers.  The names, and the funny numbering.
5355126Storek  * are defined so as to match up with what SunOS uses; I have no idea why
5455126Storek  * they did the numbers that way, except maybe to match up with the 68881.
5555126Storek  */
5655126Storek #define	FPE_INTOVF_TRAP		0x01	/* integer overflow */
5755126Storek #define	FPE_INTDIV_TRAP		0x14	/* integer divide by zero */
5855126Storek #define	FPE_FLTINEX_TRAP	0xc4	/* inexact */
5955126Storek #define	FPE_FLTDIV_TRAP		0xc8	/* divide by zero */
6055126Storek #define	FPE_FLTUND_TRAP		0xcc	/* underflow */
6155126Storek #define	FPE_FLTOPERR_TRAP	0xd0	/* operand error */
6255126Storek #define	FPE_FLTOVF_TRAP		0xd4	/* overflow */
63