OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [newlib-1.18.0/] [newlib/] [libc/] [machine/] [i386/] [f_frexp.S] - Blame information for rev 816

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
/*
2
 * ====================================================
3
 * Copyright (C) 1998, 2002 by Red Hat Inc. All rights reserved.
4
 *
5
 * Permission to use, copy, modify, and distribute this
6
 * software is freely granted, provided that this notice
7
 * is preserved.
8
 * ====================================================
9
 */
10
 
11
#if !defined(_SOFT_FLOAT)
12
 
13
/*
14
Fast version of frexp using Intel float instructions.
15
 
16
   double _f_frexp (double x, int *exp);
17
 
18
Function splits x into y * 2 ** z.  It then
19
returns the value of y and updates *exp with z.
20
There is no error checking or setting of errno.
21
*/
22
 
23
        #include "i386mach.h"
24
 
25
        .global SYM (_f_frexp)
26
       SOTYPE_FUNCTION(_f_frexp)
27
 
28
SYM (_f_frexp):
29
        pushl ebp
30
        movl esp,ebp
31
        fldl 8(ebp)
32
        movl 16(ebp),eax
33
 
34
        fxtract
35
        fld1
36
        fchs
37
        fxch
38
        fscale
39
        fstp st1
40
        fxch
41
        fld1
42
        faddp
43
        fistpl 0(eax)
44
 
45
        leave
46
        ret
47
 
48
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.