aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/libm-i387/s_ceill.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/libm-i387/s_ceill.S')
-rw-r--r--sysdeps/libm-i387/s_ceill.S13
1 files changed, 9 insertions, 4 deletions
diff --git a/sysdeps/libm-i387/s_ceill.S b/sysdeps/libm-i387/s_ceill.S
index fd7bd38..a02a547 100644
--- a/sysdeps/libm-i387/s_ceill.S
+++ b/sysdeps/libm-i387/s_ceill.S
@@ -14,10 +14,14 @@ ENTRY(__ceill)
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 */
fldt 8(%ebp); /* round */
@@ -27,4 +31,5 @@ ENTRY(__ceill)
leave
ret
+PSEUDO_END (__ceill)
weak_alias (__ceill, ceill)