blob: b8fdd4f075fddf55d7b12cd6daf53743ddac610b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
$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 */
|