1998-01-09 06:45:03 +03:00
|
|
|
/* $NetBSD: fpsetsticky.S,v 1.5 1998/01/09 03:45:06 perry Exp $ */
|
|
|
|
|
1995-04-10 00:33:13 +04:00
|
|
|
/*
|
|
|
|
* Written by Charles M. Hannum, Apr 9, 1995
|
|
|
|
* Public domain.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <machine/asm.h>
|
|
|
|
|
|
|
|
ENTRY(fpsetsticky)
|
1995-04-10 01:00:57 +04:00
|
|
|
subl $28,%esp
|
1995-04-10 00:33:13 +04:00
|
|
|
|
1995-04-10 01:00:57 +04:00
|
|
|
fnstenv (%esp)
|
|
|
|
movl 4(%esp),%eax
|
1995-04-10 00:33:13 +04:00
|
|
|
movl %eax,%edx
|
|
|
|
|
|
|
|
andl $63,%eax
|
|
|
|
|
1995-04-10 01:55:20 +04:00
|
|
|
subl %eax,%edx
|
1995-04-10 01:00:57 +04:00
|
|
|
movl 32(%esp),%ecx
|
1995-04-10 00:33:13 +04:00
|
|
|
andl $63,%ecx
|
1995-04-10 01:55:20 +04:00
|
|
|
addl %ecx,%edx
|
1995-04-10 01:00:57 +04:00
|
|
|
movl %edx,4(%esp)
|
|
|
|
fldenv (%esp)
|
1995-04-10 00:33:13 +04:00
|
|
|
|
1995-04-10 01:00:57 +04:00
|
|
|
addl $28,%esp
|
1995-04-10 00:33:13 +04:00
|
|
|
ret
|