diff options
| author | Charles Forsyth <charles.forsyth@gmail.com> | 2018-12-21 14:58:57 +0000 |
|---|---|---|
| committer | Charles Forsyth <charles.forsyth@gmail.com> | 2018-12-21 14:58:57 +0000 |
| commit | 3a4ecaa73af6efcbfa30eedde025a87dc1d20f27 (patch) | |
| tree | bb756897181c9a9dc2538f843a2eb3b3a270424a /lib9 | |
| parent | f2847740e449ea52349968e40fa4e5fb8426bb41 (diff) | |
| parent | 9615754de500d96213e295cb80e41cb24e4a75ac (diff) | |
Merged in mechazoidal/inferno-os (pull request #19)
Fix building on OpenBSD
Diffstat (limited to 'lib9')
| -rw-r--r-- | lib9/setfcr-OpenBSD-386.S | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lib9/setfcr-OpenBSD-386.S b/lib9/setfcr-OpenBSD-386.S new file mode 100644 index 00000000..d981f36a --- /dev/null +++ b/lib9/setfcr-OpenBSD-386.S @@ -0,0 +1,34 @@ + +#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): + ENT + xorb $0x3f, %al + movl %eax, (%esp) + fwait + fldcw (%esp) + RET + +FN(getfcr): + ENT + fwait + fstcw (%esp) + movw (%esp), %ax + andl $0xffff, %eax + xorb $0x3f, %al + RET + +FN(getfsr): + ENT + fwait + fstsw (%esp) + movw (%esp), %ax + andl $0xffff, %eax + RET + +FN(setfsr): + fclex + ret |
