summaryrefslogtreecommitdiff
path: root/lang/smlnj/patches/patch-ad
blob: 2b142103e154493f714aaff9e43f29414db662c7 (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
$NetBSD: patch-ad,v 1.4 2016/04/14 22:04:47 dholland Exp $

Support for NetBSD.

--- src/runtime/include/asm-base.h.orig
+++ src/runtime/include/asm-base.h
@@ -36,6 +36,11 @@
 #    define _ASM
 #    include <sys/stack.h>
 #    include <sys/trap.h>
+#  elif defined(OPSYS_NETBSD)
+#    include <machine/trap.h>
+#    define WINDOWSIZE (16*4)
+#    define SA(x) (((x)+7)&~7)
+#    define ST_INT_OVERFLOW 0x87
 #  endif
 #  define CGLOBAL(ID)	.global	CSYM(ID)
 #  define LABEL(ID)	ID:
@@ -104,7 +109,7 @@
 #    define DOUBLE(V)	.double V
 #    define LABEL(ID)   ID:
 
-#  elif (defined(OPSYS_LINUX) && defined(TARGET_PPC))
+#  elif ((defined(OPSYS_LINUX) || defined(OPSYS_NETBSD)) && defined(TARGET_PPC))
 #    define CFUNSYM(ID)	ID
 #    define CGLOBAL(ID)	.globl CSYM(ID)
 #    define TEXT	.section ".text"