~xnox/ubuntu/trusty/gcc-arm-linux-androideabi/dima

« back to all changes in this revision

Viewing changes to android/bionic/libm/i387/s_ceill.S

  • Committer: Package Import Robot
  • Author(s): Dmitrijs Ledkovs
  • Date: 2013-07-05 10:12:24 UTC
  • Revision ID: package-import@ubuntu.com-20130705101224-6qo3e8jbz8p31aa1
Tags: upstream-0.20130705.1
ImportĀ upstreamĀ versionĀ 0.20130705.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Based on code written by J.T. Conklin <jtc@NetBSD.org>.
 
3
 * Public domain.
 
4
 */
 
5
        
 
6
#include <machine/asm.h>
 
7
__FBSDID("$FreeBSD: src/lib/msun/i387/s_ceill.S,v 1.1 2005/04/16 21:12:55 das Exp $")
 
8
 
 
9
ENTRY(ceill)
 
10
        pushl   %ebp
 
11
        movl    %esp,%ebp
 
12
        subl    $8,%esp
 
13
 
 
14
        fstcw   -4(%ebp)                /* store fpu control word */
 
15
        movw    -4(%ebp),%dx
 
16
        orw     $0x0800,%dx             /* round towards +oo */
 
17
        andw    $0xfbff,%dx
 
18
        movw    %dx,-8(%ebp)
 
19
        fldcw   -8(%ebp)                /* load modfied control word */
 
20
 
 
21
        fldt    8(%ebp)                 /* round */
 
22
        frndint
 
23
 
 
24
        fldcw   -4(%ebp)                /* restore original control word */
 
25
 
 
26
        leave
 
27
        ret