xref: /openbsd-src/sys/arch/powerpc64/include/signal.h (revision 5e649a8714ba05cf482011b7b7d1e5437b7c17db)
1*5e649a87Skettenis /*	$OpenBSD: signal.h,v 1.5 2020/07/13 22:37:37 kettenis Exp $	*/
213861200Skettenis 
313861200Skettenis /*
413861200Skettenis  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
513861200Skettenis  * Copyright (C) 1995, 1996 TooLs GmbH.
613861200Skettenis  * All rights reserved.
713861200Skettenis  *
813861200Skettenis  * Redistribution and use in source and binary forms, with or without
913861200Skettenis  * modification, are permitted provided that the following conditions
1013861200Skettenis  * are met:
1113861200Skettenis  * 1. Redistributions of source code must retain the above copyright
1213861200Skettenis  *    notice, this list of conditions and the following disclaimer.
1313861200Skettenis  * 2. Redistributions in binary form must reproduce the above copyright
1413861200Skettenis  *    notice, this list of conditions and the following disclaimer in the
1513861200Skettenis  *    documentation and/or other materials provided with the distribution.
1613861200Skettenis  * 3. All advertising materials mentioning features or use of this software
1713861200Skettenis  *    must display the following acknowledgement:
1813861200Skettenis  *	This product includes software developed by TooLs GmbH.
1913861200Skettenis  * 4. The name of TooLs GmbH may not be used to endorse or promote products
2013861200Skettenis  *    derived from this software without specific prior written permission.
2113861200Skettenis  *
2213861200Skettenis  * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
2313861200Skettenis  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
2413861200Skettenis  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2513861200Skettenis  * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2613861200Skettenis  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
2713861200Skettenis  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
2813861200Skettenis  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
2913861200Skettenis  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
3013861200Skettenis  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
3113861200Skettenis  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3213861200Skettenis  */
33f6e57a87Skettenis 
34f6e57a87Skettenis #ifndef	_MACHDEP_SIGNAL_H_
35f6e57a87Skettenis #define	_MACHDEP_SIGNAL_H_
3613861200Skettenis 
3713861200Skettenis #include <sys/cdefs.h>
3813861200Skettenis 
3913861200Skettenis typedef int sig_atomic_t;
4013861200Skettenis 
4113861200Skettenis #if __BSD_VISIBLE || __XPG_VISIBLE >= 420
42f6e57a87Skettenis 
4313861200Skettenis #include <machine/_types.h>
4413861200Skettenis 
4513861200Skettenis struct sigcontext {
4613861200Skettenis 	long		sc_cookie;
4713861200Skettenis 	int		sc_mask;	/* saved signal mask */
48*5e649a87Skettenis 	__register_t	sc_reg[32];	/* saved registers */
49*5e649a87Skettenis 	__register_t	sc_lr;
50*5e649a87Skettenis 	__register_t	sc_cr;
51*5e649a87Skettenis 	__register_t	sc_xer;
52*5e649a87Skettenis 	__register_t	sc_ctr;
53*5e649a87Skettenis 	__register_t	sc_pc;
54*5e649a87Skettenis 	__register_t	sc_ps;
55*5e649a87Skettenis 	__register_t	sc_vrsave;
5637f59f88Skettenis 	__uint128_t	sc_vsx[64];
5737f59f88Skettenis 	__uint64_t	sc_fpscr;
5837f59f88Skettenis 	__uint64_t	sc_vscr;
5913861200Skettenis };
60f6e57a87Skettenis 
61*5e649a87Skettenis #define sc_sp	sc_reg[1]
62*5e649a87Skettenis 
6313861200Skettenis #endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 420 */
64f6e57a87Skettenis 
65f6e57a87Skettenis #endif	/* _MACHDEP_SIGNAL_H_ */
66