/[cmucl]/src/lisp/fdlibm.h
ViewVC logotype

Contents of /src/lisp/fdlibm.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Fri Apr 11 07:49:46 2008 UTC (6 years ago) by cshapiro
Branch: MAIN
CVS Tags: sparc-tramp-assem-base, post-merge-intl-branch, merged-unicode-utf16-extfmt-2009-06-11, unicode-utf16-extfmt-2009-03-27, snapshot-2008-08, snapshot-2008-09, sse2-packed-2008-11-12, snapshot-2008-05, snapshot-2008-06, snapshot-2008-07, intl-branch-working-2010-02-19-1000, unicode-string-buffer-impl-base, sse2-base, release-20b-pre1, release-20b-pre2, unicode-string-buffer-base, sse2-packed-base, sparc-tramp-assem-2010-07-19, amd64-dd-start, release-19f-pre1, snapshot-2008-12, snapshot-2008-11, intl-2-branch-base, GIT-CONVERSION, unicode-utf16-sync-2008-12, cross-sol-x86-merged, label-2009-03-16, release-19f-base, merge-sse2-packed, merge-with-19f, intl-branch-working-2010-02-11-1000, unicode-snapshot-2009-05, unicode-snapshot-2009-06, unicode-utf16-sync-2008-07, unicode-utf16-sync-2008-09, unicode-utf16-extfmts-sync-2008-12, RELEASE_20b, unicode-utf16-sync-label-2009-03-16, RELEASE_19f, release-20a-base, cross-sol-x86-base, unicode-utf16-char-support-2009-03-26, unicode-utf16-char-support-2009-03-25, unicode-utf16-extfmts-pre-sync-2008-11, snapshot-2008-10, snapshot-2010-12, snapshot-2010-11, unicode-utf16-sync-2008-11, snapshot-2011-09, snapshot-2011-06, snapshot-2011-07, snapshot-2011-04, snapshot-2011-02, snapshot-2011-03, snapshot-2011-01, pre-merge-intl-branch, snapshot-2010-05, snapshot-2010-04, snapshot-2010-07, snapshot-2010-06, snapshot-2010-01, snapshot-2010-03, snapshot-2010-02, snapshot-2010-08, label-2009-03-25, cross-sol-x86-2010-12-20, sse2-checkpoint-2008-10-01, intl-branch-2010-03-18-1300, sse2-merge-with-2008-11, sse2-merge-with-2008-10, RELEASE_20a, release-20a-pre1, snapshot-2009-11, snapshot-2009-12, unicode-utf16-extfmt-2009-06-11, portable-clx-import-2009-06-16, unicode-utf16-string-support, cross-sparc-branch-base, intl-branch-base, unicode-utf16-base, portable-clx-base, snapshot-2009-08, snapshot-2009-02, snapshot-2009-01, snapshot-2009-07, snapshot-2009-05, snapshot-2009-04, HEAD
Branch point for: RELEASE-19F-BRANCH, portable-clx-branch, cross-sparc-branch, RELEASE-20B-BRANCH, unicode-string-buffer-branch, sparc-tramp-assem-branch, sse2-packed-branch, RELEASE-20A-BRANCH, amd64-dd-branch, unicode-string-buffer-impl-branch, intl-branch, unicode-utf16-branch, cross-sol-x86-branch, sse2-branch, intl-2-branch, unicode-utf16-extfmt-branch
Changes since 1.1: +8 -181 lines
File MIME type: text/plain
Retrieve the constituent words of a double through a union instead of
casts and pointer arithmetic.  This code now compiles correctly on GCC
version 4 without disabling the default assumption of strict aliasing
rules.  Also, remove lots of dead code associated with parts of fdlibm
that have not been imported into the runtime.
1
2 /* @(#)fdlibm.h 1.5 04/04/22 */
3 /*
4 * ====================================================
5 * Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.
6 *
7 * Permission to use, copy, modify, and distribute this
8 * software is freely granted, provided that this notice
9 * is preserved.
10 * ====================================================
11 */
12
13 /* Sometimes it's necessary to define __LITTLE_ENDIAN explicitly
14 but these catch some common cases. */
15
16 #if defined(i386) || defined(i486) || \
17 defined(intel) || defined(x86) || defined(i86pc) || \
18 defined(__alpha) || defined(__osf__)
19 #define __LITTLE_ENDIAN
20 #endif
21
22 #ifdef __LITTLE_ENDIAN
23 enum { HIWORD = 1, LOWORD = 0 };
24 #else
25 enum { HIWORD = 0, LOWORD = 1 };
26 #endif
27
28 /*
29 * ANSI/POSIX
30 */
31 extern double fabs(double);
32 extern double floor(double);
33
34 /* ieee style elementary functions */
35 extern int __ieee754_rem_pio2(double,double*);
36
37 /*
38 * Functions callable from C, intended to support IEEE arithmetic.
39 */
40 extern double scalbn(double, int);
41
42 /* fdlibm kernel function */
43 extern int __kernel_rem_pio2(double*,double*,int,int,int,const int*);

  ViewVC Help
Powered by ViewVC 1.1.5