summaryrefslogtreecommitdiff
path: root/sysdeps/libm-i387/s_ceil.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/libm-i387/s_ceil.S')
-rw-r--r--sysdeps/libm-i387/s_ceil.S13
1 files changed, 9 insertions, 4 deletions
diff --git a/sysdeps/libm-i387/s_ceil.S b/sysdeps/libm-i387/s_ceil.S
index eabe662a6c..a500b07d31 100644
--- a/sysdeps/libm-i387/s_ceil.S
+++ b/sysdeps/libm-i387/s_ceil.S
@@ -13,10 +13,14 @@ ENTRY(__ceil)
subl $8,%esp
fstcw -4(%ebp) /* store fpu control word */
- movw -4(%ebp),%dx
- orw $0x0800,%dx /* round towards +oo */
- andw $0xfbff,%dx
- movw %dx,-8(%ebp)
+
+ /* We use here %edx although only the low 1 bits are defined.
+ But none of the operations should care and they are faster
+ than the 16 bit operations. */
+ movl -4(%ebp),%edx
+ orl $0x0800,%edx /* round towards +oo */
+ andl $0xfbff,%edx
+ movl %edx,-8(%ebp)
fldcw -8(%ebp) /* load modfied control word */
fldl 8(%ebp); /* round */
@@ -26,4 +30,5 @@ ENTRY(__ceil)
leave
ret
+PSEUDO_END (__ceil)
weak_alias (__ceil, ceil)