shithub: purgatorio

Download patch

ref: 248c637d25154f762a7d675662c405a169594ca0
parent: d3da2e1b89f30f404c3d11053680098f1b7bf677
author: henesy <devnull@localhost>
date: Sat Feb 29 11:01:28 EST 2020

merge 3a4ecaa73af6efcbfa30eedde025a87dc1d20f27

--- a/OpenBSD/386/include/emu.h
+++ b/OpenBSD/386/include/emu.h
@@ -12,6 +12,9 @@
 {
 	uchar	env[28];
 };
+#else
+extern	Proc*	getup(void);
+#endif
 
 #define KSTACK (32 * 1024)
 
--- a/OpenBSD/386/include/lib9.h
+++ b/OpenBSD/386/include/lib9.h
@@ -504,3 +504,29 @@
 extern  void    setfsr(ulong);
 extern  ulong   getfcr(void);
 extern  ulong   getfsr(void);
+/* FCR */
+#define FPINEX  (1<<5)
+#define FPUNFL  ((1<<4)|(1<<1))
+#define FPOVFL  (1<<3)
+#define FPZDIV  (1<<2)
+#define FPINVAL (1<<0)
+#define FPRNR   (0<<10)
+#define FPRZ    (3<<10)
+#define FPRPINF (2<<10)
+#define FPRNINF (1<<10)
+#define FPRMASK (3<<10)
+#define FPPEXT  (3<<8)
+#define FPPSGL  (0<<8)
+#define FPPDBL  (2<<8)
+#define FPPMASK (3<<8)
+/* FSR */
+#define FPAINEX FPINEX
+#define FPAOVFL FPOVFL
+#define FPAUNFL FPUNFL
+#define FPAZDIV FPZDIV
+#define FPAINVAL        FPINVAL
+
+extern  void    setfcr(ulong);
+extern  void    setfsr(ulong);
+extern  ulong   getfcr(void);
+extern  ulong   getfsr(void);
--- a/emu/OpenBSD/mkfile
+++ b/emu/OpenBSD/mkfile
@@ -15,6 +15,7 @@
 OBJ=\
 	asm-$OBJTYPE.$O\
 	os.$O\
+	kproc-pthreads.$O\
 	win-x11a.$O\
 	$CONF.root.$O\
 	lock.$O\
@@ -24,7 +25,7 @@
 HFILES=\
 
 CFLAGS='-DROOT="'$ROOT'"' -DEMU -I. -I../port -I$ROOT/$SYSTARG/$OBJTYPE/include -I$ROOT/include -I$ROOT/libinterp $CTHREADFLAGS $CFLAGS $EMUOPTIONS
-SYSLIBS= -lm -lX11 -lXext -lossaudio 
+SYSLIBS= -lm -lX11 -lXext -lossaudio -lpthread
 KERNDATE=`{$NDATE}
 
 default:V:	$O.$CONF