xref: /plan9-contrib/sys/src/9/vt4/softfpu.c (revision d6dfd9ef91cf0fa8514a249d5f2a550978c19369)
1 #include "u.h"
2 #include "../port/lib.h"
3 #include "mem.h"
4 #include "dat.h"
5 #include "fns.h"
6 
7 /*
8  * Find a way to finesse this away if not needed.
9  */
10 int
fpudevprocio(Proc * proc,void * a,long n,uintptr offset,int write)11 fpudevprocio(Proc* proc, void* a, long n, uintptr offset, int write)
12 {
13 	USED(proc, a, n, offset, write);
14 	return 0;
15 }
16 
17 void
fpusysrfork(Ureg *)18 fpusysrfork(Ureg*)
19 {
20 }
21 
22 void
fpusysrforkchild(Proc *,Ureg *,Proc *)23 fpusysrforkchild(Proc*, Ureg*, Proc*)
24 {
25 }
26 
27 void
fputrap(Ureg *,int)28 fputrap(Ureg*, int)
29 {
30 }
31 
32 int
fpuemu(Ureg * ur)33 fpuemu(Ureg *ur)
34 {
35 	int nfp;
36 
37 	if(waserror()){
38 		postnote(up, 1, up->errstr, NDebug);
39 		return 1;
40 	}
41 	spllo();
42 	nfp = fpipower(ur);
43 	splhi();
44 	poperror();
45 	return nfp;
46 }
47 
48 void
fpuinit(void)49 fpuinit(void)
50 {
51 }
52 
53 int
fpuavail(Ureg *)54 fpuavail(Ureg*)
55 {
56 	return 0;
57 }
58 
59 void
fpunotify(Ureg *)60 fpunotify(Ureg*)
61 {
62 }
63 
64 void
fpunoted(void)65 fpunoted(void)
66 {
67 }
68 
69 void
fpusysprocsetup(Proc * p)70 fpusysprocsetup(Proc *p)
71 {
72 	p->fpstate = FPinit;
73 //	fpoff();		/* add to l.s */
74 }
75