$NetBSD: patch-af,v 1.3 2003/07/01 23:19:14 jtb Exp $ --- src/runtime/mach-dep/signal-sysdep.h.orig +++ src/runtime/mach-dep/signal-sysdep.h @@ -147,7 +147,7 @@ /* disable all FP exceptions */ # define SIG_InitFPE() SetFSR(0) -# if defined(OPSYS_SUNOS) +# if defined(OPSYS_SUNOS) || defined(OPSYS_NETBSD) /** SPARC, SUNOS **/ # define USE_ZERO_LIMIT_PTR_FN # define SIG_FAULT1 SIGFPE @@ -318,6 +318,19 @@ # define SIG_Flags 0 +# elif (defined(TARGET_PPC) && defined(OPSYS_NETBSD)) + /* PPC, NetBSD */ + +# define SIG_FAULT1 SIGTRAP + +# define INT_DIVZERO(s, c) ((s) == SIGTRAP) +# define INT_OVFLW(s, c) ((s) == SIGTRAP) +# define SIG_GetPC(scp) ((scp)->sc_frame.srr0) +# define SIG_SetPC(scp, addr) { (scp)->sc_frame.srr0 = (long)(addr); } +# define SIG_ZeroLimitPtr(scp) { ((scp)->sc_frame.fixreg[15] = 0); } /* limitptr = 15 (see src/runtime/mach-dep/PPC.prim.asm) */ +# define SIG_GetCode(info,scp) (info) + typedef void SigReturn_t; + # endif /* HOST_RS6000/HOST_PPC */