summaryrefslogtreecommitdiff
path: root/lib9/setfcr-NetBSD-386.S
diff options
context:
space:
mode:
authorCharles Forsyth <charles.forsyth@gmail.com>2018-12-21 15:12:00 +0000
committerCharles Forsyth <charles.forsyth@gmail.com>2018-12-21 15:12:00 +0000
commitf092bcd9be21a77f026a7c3227a920437d35b9e5 (patch)
treefd953df2a342e9cf9313f23b98d46e927f3da258 /lib9/setfcr-NetBSD-386.S
parent0195c4e25fc394097552c7f5ebf3085ec2d201f5 (diff)
parentaf364d9265f84faf807f5db6b8db6936a92124c6 (diff)
Merged in nbuwe/inferno-os/NetBSD/powerpc (pull request #10)
NetBSD/powerpc Approved-by: Charles Forsyth <charles.forsyth@gmail.com>
Diffstat (limited to 'lib9/setfcr-NetBSD-386.S')
-rw-r--r--lib9/setfcr-NetBSD-386.S15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib9/setfcr-NetBSD-386.S b/lib9/setfcr-NetBSD-386.S
index d981f36a..06a6b78d 100644
--- a/lib9/setfcr-NetBSD-386.S
+++ b/lib9/setfcr-NetBSD-386.S
@@ -1,18 +1,18 @@
+#include <machine/asm.h>
-#define FN(x) .type x,@function; .global x; x
#define ENT subl $16, %esp
#define RET addl $16, %esp; ret
- .file "setfcr-Linux-386.S"
-FN(setfcr):
+NENTRY(setfcr)
ENT
xorb $0x3f, %al
movl %eax, (%esp)
fwait
fldcw (%esp)
RET
+ END(setfcr)
-FN(getfcr):
+NENTRY(getfcr)
ENT
fwait
fstcw (%esp)
@@ -20,15 +20,18 @@ FN(getfcr):
andl $0xffff, %eax
xorb $0x3f, %al
RET
+ END(getfcr)
-FN(getfsr):
+NENTRY(getfsr)
ENT
fwait
fstsw (%esp)
movw (%esp), %ax
andl $0xffff, %eax
RET
+ END(getfsr)
-FN(setfsr):
+NENTRY(setfsr)
fclex
ret
+ END(setfsr)