repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fix mdoc(7)/man(7) mix up.
[netbsd-mini2440.git]
/
lib
/
libc
/
arch
/
i386
/
gen
/
fpsetround.S
blob
5ed9825456e66343f34cc28cd13bd638278cae99
1
/* $NetBSD: fpsetround.S,v 1.2 1998/01/09 03:45:06 perry Exp $ */
2
3
/*
4
* Written by Charles M. Hannum, Apr 9, 1995
5
* Public domain.
6
*/
7
8
#include <machine/asm.h>
9
10
#ifdef WEAK_ALIAS
11
WEAK_ALIAS(fpsetround, _fpsetround)
12
ENTRY(_fpsetround)
13
#else
14
ENTRY(fpsetround)
15
#endif
16
subl $4,%esp
17
18
fnstcw (%esp)
19
movl (%esp),%eax
20
21
rorl $10,%eax
22
movl %eax,%edx
23
andl $3,%eax
24
25
subl %eax,%edx
26
movl 8(%esp),%ecx
27
andl $3,%ecx
28
orl %ecx,%edx
29
roll $10,%edx
30
movl %edx,(%esp)
31
fldcw (%esp)
32
33
addl $4,%esp
34
ret