summaryrefslogtreecommitdiffstats
path: root/lib/msun
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-12-14 16:43:53 +0000
committerbde <bde@FreeBSD.org>1996-12-14 16:43:53 +0000
commitd859e7c0e5df793d2dff42afadfa39b0edc09672 (patch)
treeba315c3fd1aa26858973103cd6edb93dbf408e58 /lib/msun
parent0f43fda518bf59e5821d50ef8f4d6fe42e6e7729 (diff)
downloadFreeBSD-src-d859e7c0e5df793d2dff42afadfa39b0edc09672.zip
FreeBSD-src-d859e7c0e5df793d2dff42afadfa39b0edc09672.tar.gz
Fixed fiddling with the control word. Use the stack space reserved for
that purpose instead of space below the stack.
Diffstat (limited to 'lib/msun')
-rw-r--r--lib/msun/i387/s_ceil.S12
-rw-r--r--lib/msun/i387/s_floor.S12
2 files changed, 12 insertions, 12 deletions
diff --git a/lib/msun/i387/s_ceil.S b/lib/msun/i387/s_ceil.S
index c500263..84a1b7a 100644
--- a/lib/msun/i387/s_ceil.S
+++ b/lib/msun/i387/s_ceil.S
@@ -35,24 +35,24 @@
#include <machine/asmacros.h>
-RCSID("$Id: s_ceil.S,v 1.1.1.1 1994/08/19 09:40:00 jkh Exp $")
+RCSID("$Id: s_ceil.S,v 1.2 1994/08/19 11:14:21 jkh Exp $")
ENTRY(ceil)
pushl %ebp
movl %esp,%ebp
subl $8,%esp
- fstcw -12(%ebp) /* store fpu control word */
- movw -12(%ebp),%dx
+ fstcw -4(%ebp) /* store fpu control word */
+ movw -4(%ebp),%dx
orw $0x0800,%dx /* round towards +oo */
andw $0xfbff,%dx
- movw %dx,-16(%ebp)
- fldcw -16(%ebp) /* load modfied control word */
+ movw %dx,-8(%ebp)
+ fldcw -8(%ebp) /* load modfied control word */
fldl 8(%ebp); /* round */
frndint
- fldcw -12(%ebp) /* restore original control word */
+ fldcw -4(%ebp) /* restore original control word */
leave
ret
diff --git a/lib/msun/i387/s_floor.S b/lib/msun/i387/s_floor.S
index 129b01e..7abc424 100644
--- a/lib/msun/i387/s_floor.S
+++ b/lib/msun/i387/s_floor.S
@@ -35,24 +35,24 @@
#include <machine/asmacros.h>
-RCSID("$Id: s_floor.S,v 1.1.1.1 1994/08/19 09:40:01 jkh Exp $")
+RCSID("$Id: s_floor.S,v 1.2 1994/08/19 11:14:25 jkh Exp $")
ENTRY(floor)
pushl %ebp
movl %esp,%ebp
subl $8,%esp
- fstcw -12(%ebp) /* store fpu control word */
- movw -12(%ebp),%dx
+ fstcw -4(%ebp) /* store fpu control word */
+ movw -4(%ebp),%dx
orw $0x0400,%dx /* round towards -oo */
andw $0xf7ff,%dx
- movw %dx,-16(%ebp)
- fldcw -16(%ebp) /* load modfied control word */
+ movw %dx,-8(%ebp)
+ fldcw -8(%ebp) /* load modfied control word */
fldl 8(%ebp); /* round */
frndint
- fldcw -12(%ebp) /* restore original control word */
+ fldcw -4(%ebp) /* restore original control word */
leave
ret
OpenPOWER on IntegriCloud