upload android base code part15

This commit is contained in:
August 2018-08-09 09:46:05 +08:00
parent 06502e9cd9
commit 3c17267bcc
47349 changed files with 4844998 additions and 0 deletions

View file

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

View file

@ -0,0 +1 @@
i686-apple-darwin10-cpp-4.2.1

View file

@ -0,0 +1 @@
i686-apple-darwin10-g++-4.2.1

View file

@ -0,0 +1 @@
i686-apple-darwin10-gcc-4.2.1

View file

@ -0,0 +1 @@
i686-apple-darwin11-cpp-4.2.1

View file

@ -0,0 +1 @@
i686-apple-darwin11-g++-4.2.1

View file

@ -0,0 +1 @@
i686-apple-darwin11-gcc-4.2.1

View file

@ -0,0 +1,9 @@
/* This file is public domain. */
/* This file exists soley to keep Metrowerks' compilers happy. The version
used by GCC 3.4 and later can be found in /usr/lib/gcc, although it's
not very informative. */
#ifdef __MWERKS__
#include "mw_float.h"
#else
#error "This header only supports __MWERKS__."
#endif

View file

@ -0,0 +1,6 @@
/* This file is public domain. */
#ifdef __MWERKS__
#include "mw_stdarg.h"
#else
#error "This header only supports __MWERKS__."
#endif

View file

@ -0,0 +1,253 @@
/*
* Copyright (c) 2000, 2001, 2003, 2004, 2008 Apple Computer, Inc.
* All rights reserved.
*/
#ifndef _STDINT_H_
#define _STDINT_H_
#if defined(__LP64__) && __LP64__
#define __WORDSIZE 64
#else
#define __WORDSIZE 32
#endif
/* from ISO/IEC 988:1999 spec */
/* 7.18.1.1 Exact-width integer types */
#ifndef _INT8_T
#define _INT8_T
typedef signed char int8_t;
#endif /*_INT8_T */
#ifndef _INT16_T
#define _INT16_T
typedef short int16_t;
#endif /* _INT16_T */
#ifndef _INT32_T
#define _INT32_T
typedef int int32_t;
#endif /* _INT32_T */
#ifndef _INT64_T
#define _INT64_T
typedef long long int64_t;
#endif /* _INT64_T */
#ifndef _UINT8_T
#define _UINT8_T
typedef unsigned char uint8_t;
#endif /*_UINT8_T */
#ifndef _UINT16_T
#define _UINT16_T
typedef unsigned short uint16_t;
#endif /* _UINT16_T */
#ifndef _UINT32_T
#define _UINT32_T
typedef unsigned int uint32_t;
#endif /* _UINT32_T */
#ifndef _UINT64_T
#define _UINT64_T
typedef unsigned long long uint64_t;
#endif /* _UINT64_T */
/* 7.18.1.2 Minimum-width integer types */
typedef int8_t int_least8_t;
typedef int16_t int_least16_t;
typedef int32_t int_least32_t;
typedef int64_t int_least64_t;
typedef uint8_t uint_least8_t;
typedef uint16_t uint_least16_t;
typedef uint32_t uint_least32_t;
typedef uint64_t uint_least64_t;
/* 7.18.1.3 Fastest-width integer types */
typedef int8_t int_fast8_t;
typedef int16_t int_fast16_t;
typedef int32_t int_fast32_t;
typedef int64_t int_fast64_t;
typedef uint8_t uint_fast8_t;
typedef uint16_t uint_fast16_t;
typedef uint32_t uint_fast32_t;
typedef uint64_t uint_fast64_t;
/* 7.18.1.4 Integer types capable of holding object pointers */
#ifndef _INTPTR_T
#define _INTPTR_T
typedef long intptr_t;
#endif /* _INTPTR_T */
#ifndef _UINTPTR_T
#define _UINTPTR_T
typedef unsigned long uintptr_t;
#endif /* _UINTPTR_T */
/* 7.18.1.5 Greatest-width integer types */
#ifndef _INTMAX_T
#define _INTMAX_T
#ifdef __INTMAX_TYPE__
typedef __INTMAX_TYPE__ intmax_t;
#else /* __INTMAX_TYPE__ */
typedef long long intmax_t;
#endif /* __INTMAX_TYPE__ */
#endif /* _INTMAX_T */
#ifndef _UINTMAX_T
#define _UINTMAX_T
#ifdef __UINTMAX_TYPE__
typedef __UINTMAX_TYPE__ uintmax_t;
#else /* __UINTMAX_TYPE__ */
typedef unsigned long long uintmax_t;
#endif /* __UINTMAX_TYPE__ */
#endif /* _UINTMAX_T */
/* 7.18.2 Limits of specified-width integer types:
* These #defines specify the minimum and maximum limits
* of each of the types declared above.
*/
/* 7.18.2.1 Limits of exact-width integer types */
#define INT8_MAX 127
#define INT16_MAX 32767
#define INT32_MAX 2147483647
#define INT64_MAX 9223372036854775807LL
#define INT8_MIN -128
#define INT16_MIN -32768
/*
Note: the literal "most negative int" cannot be written in C --
the rules in the standard (section 6.4.4.1 in C99) will give it
an unsigned type, so INT32_MIN (and the most negative member of
any larger signed type) must be written via a constant expression.
*/
#define INT32_MIN (-INT32_MAX-1)
#define INT64_MIN (-INT64_MAX-1)
#define UINT8_MAX 255
#define UINT16_MAX 65535
#define UINT32_MAX 4294967295U
#define UINT64_MAX 18446744073709551615ULL
/* 7.18.2.2 Limits of minimum-width integer types */
#define INT_LEAST8_MIN INT8_MIN
#define INT_LEAST16_MIN INT16_MIN
#define INT_LEAST32_MIN INT32_MIN
#define INT_LEAST64_MIN INT64_MIN
#define INT_LEAST8_MAX INT8_MAX
#define INT_LEAST16_MAX INT16_MAX
#define INT_LEAST32_MAX INT32_MAX
#define INT_LEAST64_MAX INT64_MAX
#define UINT_LEAST8_MAX UINT8_MAX
#define UINT_LEAST16_MAX UINT16_MAX
#define UINT_LEAST32_MAX UINT32_MAX
#define UINT_LEAST64_MAX UINT64_MAX
/* 7.18.2.3 Limits of fastest minimum-width integer types */
#define INT_FAST8_MIN INT8_MIN
#define INT_FAST16_MIN INT16_MIN
#define INT_FAST32_MIN INT32_MIN
#define INT_FAST64_MIN INT64_MIN
#define INT_FAST8_MAX INT8_MAX
#define INT_FAST16_MAX INT16_MAX
#define INT_FAST32_MAX INT32_MAX
#define INT_FAST64_MAX INT64_MAX
#define UINT_FAST8_MAX UINT8_MAX
#define UINT_FAST16_MAX UINT16_MAX
#define UINT_FAST32_MAX UINT32_MAX
#define UINT_FAST64_MAX UINT64_MAX
/* 7.18.2.4 Limits of integer types capable of holding object pointers */
#if __WORDSIZE == 64
#define INTPTR_MIN INT64_MIN
#define INTPTR_MAX INT64_MAX
#else
#define INTPTR_MIN INT32_MIN
#define INTPTR_MAX INT32_MAX
#endif
#if __WORDSIZE == 64
#define UINTPTR_MAX UINT64_MAX
#else
#define UINTPTR_MAX UINT32_MAX
#endif
/* 7.18.2.5 Limits of greatest-width integer types */
#define INTMAX_MIN INT64_MIN
#define INTMAX_MAX INT64_MAX
#define UINTMAX_MAX UINT64_MAX
/* 7.18.3 "Other" */
#if __WORDSIZE == 64
#define PTRDIFF_MIN INT64_MIN
#define PTRDIFF_MAX INT64_MAX
#else
#define PTRDIFF_MIN INT32_MIN
#define PTRDIFF_MAX INT32_MAX
#endif
/* We have no sig_atomic_t yet, so no SIG_ATOMIC_{MIN,MAX}.
Should end up being {-127,127} or {0,255} ... or bigger.
My bet would be on one of {U}INT32_{MIN,MAX}. */
#if __WORDSIZE == 64
#define SIZE_MAX UINT64_MAX
#else
#define SIZE_MAX UINT32_MAX
#endif
#ifndef WCHAR_MAX
# ifdef __WCHAR_MAX__
# define WCHAR_MAX __WCHAR_MAX__
# else
# define WCHAR_MAX 0x7fffffff
# endif
#endif
/* WCHAR_MIN should be 0 if wchar_t is an unsigned type and
(-WCHAR_MAX-1) if wchar_t is a signed type. Unfortunately,
it turns out that -fshort-wchar changes the signedness of
the type. */
#ifndef WCHAR_MIN
# if WCHAR_MAX == 0xffff
# define WCHAR_MIN 0
# else
# define WCHAR_MIN (-WCHAR_MAX-1)
# endif
#endif
#define WINT_MIN INT32_MIN
#define WINT_MAX INT32_MAX
#define SIG_ATOMIC_MIN INT32_MIN
#define SIG_ATOMIC_MAX INT32_MAX
/* 7.18.4 Macros for integer constants */
#define INT8_C(v) (v)
#define INT16_C(v) (v)
#define INT32_C(v) (v)
#define INT64_C(v) (v ## LL)
#define UINT8_C(v) (v ## U)
#define UINT16_C(v) (v ## U)
#define UINT32_C(v) (v ## U)
#define UINT64_C(v) (v ## ULL)
#define INTMAX_C(v) (v ## LL)
#define UINTMAX_C(v) (v ## ULL)
#endif /* _STDINT_H_ */

View file

@ -0,0 +1,6 @@
/* This file is public domain. */
#ifdef __MWERKS__
#include "mw_varargs.h"
#else
#error "This header only supports __MWERKS__."
#endif

View file

@ -0,0 +1,14 @@
This README file is copied into the directory for GCC-only header files
when fixincludes is run by the makefile for GCC.
Many of the files in this directory were automatically edited from the
standard system header files by the fixincludes process. They are
system-specific, and will not work on any other kind of system. They
are also not part of GCC. The reason we have to do this is because
GCC requires ANSI C headers and many vendors supply ANSI-incompatible
headers.
Because this is an automated process, sometimes headers get "fixed"
that do not, strictly speaking, need a fix. As long as nothing is broken
by the process, it is just an unfortunate collateral inconvenience.
We would like to rectify it, if it is not "too inconvenient".

View file

@ -0,0 +1,106 @@
/* APPLE LOCAL file 5612787 mainline sse4 */
/* Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/* Implemented from the specification included in the AMD Programmers
Manual Update, version 2.x */
#ifndef _AMMINTRIN_H_INCLUDED
#define _AMMINTRIN_H_INCLUDED
#ifndef __SSE4A__
# error "SSE4A instruction set not enabled"
#else
/* We need definitions from the SSE3, SSE2 and SSE header files*/
#include <pmmintrin.h>
/* APPLE LOCAL begin nodebug inline 4152603 */
#define __always_inline__ __always_inline__, __nodebug__
/* APPLE LOCAL end nodebug inline 4152603 */
/* APPLE LOCAL begin radar 5618945 */
#undef __STATIC_INLINE
#ifdef __GNUC_STDC_INLINE__
#define __STATIC_INLINE __inline
#else
#define __STATIC_INLINE static __inline
#endif
/* APPLE LOCAL end radar 5618945 */
__STATIC_INLINE void __attribute__((__always_inline__))
_mm_stream_sd (double * __P, __m128d __Y)
{
__builtin_ia32_movntsd (__P, (__v2df) __Y);
}
__STATIC_INLINE void __attribute__((__always_inline__))
_mm_stream_ss (float * __P, __m128 __Y)
{
__builtin_ia32_movntss (__P, (__v4sf) __Y);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_extract_si64 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_extrq ((__v2di) __X, (__v16qi) __Y);
}
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_extracti_si64 (__m128i __X, unsigned const int __I, unsigned const int __L)
{
return (__m128i) __builtin_ia32_extrqi ((__v2di) __X, __I, __L);
}
#else
#define _mm_extracti_si64(X, I, L) \
((__m128i) __builtin_ia32_extrqi ((__v2di)(X), I, L))
#endif
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_insert_si64 (__m128i __X,__m128i __Y)
{
return (__m128i) __builtin_ia32_insertq ((__v2di)__X, (__v2di)__Y);
}
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_inserti_si64(__m128i __X, __m128i __Y, unsigned const int __I, unsigned const int __L)
{
return (__m128i) __builtin_ia32_insertqi ((__v2di)__X, (__v2di)__Y, __I, __L);
}
#else
#define _mm_inserti_si64(X, Y, I, L) \
((__m128i) __builtin_ia32_insertqi ((__v2di)(X), (__v2di)(Y), I, L))
#endif
#endif /* __SSE4A__ */
/* APPLE LOCAL begin nodebug inline 4152603 */
#undef __always_inline__
/* APPLE LOCAL end nodebug inline 4152603 */
#endif /* _AMMINTRIN_H_INCLUDED */

View file

@ -0,0 +1,108 @@
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/*
* Draft C Extension to support decimal floating-pointing arithmetic:
* Characteristics of decimal floating types <decfloat.h>
*/
#ifndef _DECFLOAT_H___
#define _DECFLOAT_H___
/* Number of base-FLT_RADIX digits in the significand, p. */
#undef DEC32_MANT_DIG
#undef DEC64_MANT_DIG
#undef DEC128_MANT_DIG
#define DEC32_MANT_DIG __DEC32_MANT_DIG__
#define DEC64_MANT_DIG __DEC64_MANT_DIG__
#define DEC128_MANT_DIG __DEC128_MANT_DIG__
/* Minimum exponent. */
#undef DEC32_MIN_EXP
#undef DEC64_MIN_EXP
#undef DEC128_MIN_EXP
#define DEC32_MIN_EXP __DEC32_MIN_EXP__
#define DEC64_MIN_EXP __DEC64_MIN_EXP__
#define DEC128_MIN_EXP __DEC128_MIN_EXP__
/* Maximum exponent. */
#undef DEC32_MAX_EXP
#undef DEC64_MAX_EXP
#undef DEC128_MAX_EXP
#define DEC32_MAX_EXP __DEC32_MAX_EXP__
#define DEC64_MAX_EXP __DEC64_MAX_EXP__
#define DEC128_MAX_EXP __DEC128_MAX_EXP__
/* Maximum representable finite decimal floating-point number
(there are 6, 15, and 33 9s after the decimal points respectively). */
#undef DEC32_MAX
#undef DEC64_MAX
#undef DEC128_MAX
#define DEC32_MAX __DEC32_MAX__
#define DEC64_MAX __DEC64_MAX__
#define DEC128_MAX __DEC128_MAX__
/* The difference between 1 and the least value greater than 1 that is
representable in the given floating point type. */
#undef DEC32_EPSILON
#undef DEC64_EPSILON
#undef DEC128_EPSILON
#define DEC32_EPSILON __DEC32_EPSILON__
#define DEC64_EPSILON __DEC64_EPSILON__
#define DEC128_EPSILON __DEC128_EPSILON__
/* Minimum normalized positive floating-point number. */
#undef DEC32_MIN
#undef DEC64_MIN
#undef DEC128_MIN
#define DEC32_MIN __DEC32_MIN__
#define DEC64_MIN __DEC64_MIN__
#define DEC128_MIN __DEC128_MIN__
/* Minimum denormalized positive floating-point number. */
#undef DEC32_DEN
#undef DEC64_DEN
#undef DEC128_DEN
#define DEC32_DEN __DEC32_DEN__
#define DEC64_DEN __DEC64_DEN__
#define DEC128_DEN __DEC128_DEN__
/* The floating-point expression evaluation method.
-1 indeterminate
0 evaluate all operations and constants just to the range and
precision of the type
1 evaluate operations and constants of type _Decimal32
and _Decimal64 to the range and precision of the _Decimal64
type, evaluate _Decimal128 operations and constants to the
range and precision of the _Decimal128 type;
2 evaluate all operations and constants to the range and
precision of the _Decimal128 type.
*/
#undef DECFLT_EVAL_METHOD
#define DECFLT_EVAL_METHOD __DECFLT_EVAL_METHOD__
#endif /* _DECFLOAT_H___ */

View file

@ -0,0 +1,164 @@
/* Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/*
* ISO C Standard: 5.2.4.2.2 Characteristics of floating types <float.h>
*/
#ifndef _FLOAT_H___
#define _FLOAT_H___
/* Radix of exponent representation, b. */
#undef FLT_RADIX
#define FLT_RADIX __FLT_RADIX__
/* Number of base-FLT_RADIX digits in the significand, p. */
#undef FLT_MANT_DIG
#undef DBL_MANT_DIG
#undef LDBL_MANT_DIG
#define FLT_MANT_DIG __FLT_MANT_DIG__
#define DBL_MANT_DIG __DBL_MANT_DIG__
#define LDBL_MANT_DIG __LDBL_MANT_DIG__
/* Number of decimal digits, q, such that any floating-point number with q
decimal digits can be rounded into a floating-point number with p radix b
digits and back again without change to the q decimal digits,
p * log10(b) if b is a power of 10
floor((p - 1) * log10(b)) otherwise
*/
#undef FLT_DIG
#undef DBL_DIG
#undef LDBL_DIG
#define FLT_DIG __FLT_DIG__
#define DBL_DIG __DBL_DIG__
#define LDBL_DIG __LDBL_DIG__
/* Minimum int x such that FLT_RADIX**(x-1) is a normalized float, emin */
#undef FLT_MIN_EXP
#undef DBL_MIN_EXP
#undef LDBL_MIN_EXP
#define FLT_MIN_EXP __FLT_MIN_EXP__
#define DBL_MIN_EXP __DBL_MIN_EXP__
#define LDBL_MIN_EXP __LDBL_MIN_EXP__
/* Minimum negative integer such that 10 raised to that power is in the
range of normalized floating-point numbers,
ceil(log10(b) * (emin - 1))
*/
#undef FLT_MIN_10_EXP
#undef DBL_MIN_10_EXP
#undef LDBL_MIN_10_EXP
#define FLT_MIN_10_EXP __FLT_MIN_10_EXP__
#define DBL_MIN_10_EXP __DBL_MIN_10_EXP__
#define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__
/* Maximum int x such that FLT_RADIX**(x-1) is a representable float, emax. */
#undef FLT_MAX_EXP
#undef DBL_MAX_EXP
#undef LDBL_MAX_EXP
#define FLT_MAX_EXP __FLT_MAX_EXP__
#define DBL_MAX_EXP __DBL_MAX_EXP__
#define LDBL_MAX_EXP __LDBL_MAX_EXP__
/* Maximum integer such that 10 raised to that power is in the range of
representable finite floating-point numbers,
floor(log10((1 - b**-p) * b**emax))
*/
#undef FLT_MAX_10_EXP
#undef DBL_MAX_10_EXP
#undef LDBL_MAX_10_EXP
#define FLT_MAX_10_EXP __FLT_MAX_10_EXP__
#define DBL_MAX_10_EXP __DBL_MAX_10_EXP__
#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__
/* Maximum representable finite floating-point number,
(1 - b**-p) * b**emax
*/
#undef FLT_MAX
#undef DBL_MAX
#undef LDBL_MAX
#define FLT_MAX __FLT_MAX__
#define DBL_MAX __DBL_MAX__
#define LDBL_MAX __LDBL_MAX__
/* The difference between 1 and the least value greater than 1 that is
representable in the given floating point type, b**1-p. */
#undef FLT_EPSILON
#undef DBL_EPSILON
#undef LDBL_EPSILON
#define FLT_EPSILON __FLT_EPSILON__
#define DBL_EPSILON __DBL_EPSILON__
#define LDBL_EPSILON __LDBL_EPSILON__
/* Minimum normalized positive floating-point number, b**(emin - 1). */
#undef FLT_MIN
#undef DBL_MIN
#undef LDBL_MIN
#define FLT_MIN __FLT_MIN__
#define DBL_MIN __DBL_MIN__
#define LDBL_MIN __LDBL_MIN__
/* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown. */
/* APPLE LOCAL begin 3399553 */
/* This changes with calls to fesetround in <fenv.h>. */
#undef FLT_ROUNDS
#define FLT_ROUNDS (__builtin_flt_rounds ())
/* APPLE LOCAL end 3399553 */
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* The floating-point expression evaluation method.
-1 indeterminate
0 evaluate all operations and constants just to the range and
precision of the type
1 evaluate operations and constants of type float and double
to the range and precision of the double type, evaluate
long double operations and constants to the range and
precision of the long double type
2 evaluate all operations and constants to the range and
precision of the long double type
??? This ought to change with the setting of the fp control word;
the value provided by the compiler assumes the widest setting. */
#undef FLT_EVAL_METHOD
#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
/* Number of decimal digits, n, such that any floating-point number in the
widest supported floating type with pmax radix b digits can be rounded
to a floating-point number with n decimal digits and back again without
change to the value,
pmax * log10(b) if b is a power of 10
ceil(1 + pmax * log10(b)) otherwise
*/
#undef DECIMAL_DIG
#define DECIMAL_DIG __DECIMAL_DIG__
#endif /* C99 */
#endif /* _FLOAT_H___ */

View file

@ -0,0 +1,48 @@
/* Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/*
* ISO C Standard: 7.9 Alternative spellings <iso646.h>
*/
#ifndef _ISO646_H
#define _ISO646_H
#ifndef __cplusplus
#define and &&
#define and_eq &=
#define bitand &
#define bitor |
#define compl ~
#define not !
#define not_eq !=
#define or ||
#define or_eq |=
#define xor ^
#define xor_eq ^=
#endif
#endif

View file

@ -0,0 +1,118 @@
/* This administrivia gets added to the beginning of limits.h
if the system has its own version of limits.h. */
/* APPLE LOCAL begin 4401222 */
#ifndef _LIBC_LIMITS_H_
/* Use "..." so that we find syslimits.h only in this same directory. */
#include "syslimits.h"
#endif
#ifdef _GCC_NEXT_LIMITS_H
#include_next <limits.h>
#undef _GCC_NEXT_LIMITS_H
#endif
/* APPLE LOCAL end 4401222 */
#ifndef _LIMITS_H___
#define _LIMITS_H___
/* Number of bits in a `char'. */
#undef CHAR_BIT
#define CHAR_BIT __CHAR_BIT__
/* Maximum length of a multibyte character. */
#ifndef MB_LEN_MAX
#define MB_LEN_MAX 1
#endif
/* Minimum and maximum values a `signed char' can hold. */
#undef SCHAR_MIN
#define SCHAR_MIN (-SCHAR_MAX - 1)
#undef SCHAR_MAX
#define SCHAR_MAX __SCHAR_MAX__
/* Maximum value an `unsigned char' can hold. (Minimum is 0). */
#undef UCHAR_MAX
#if __SCHAR_MAX__ == __INT_MAX__
# define UCHAR_MAX (SCHAR_MAX * 2U + 1U)
#else
# define UCHAR_MAX (SCHAR_MAX * 2 + 1)
#endif
/* Minimum and maximum values a `char' can hold. */
#ifdef __CHAR_UNSIGNED__
# undef CHAR_MIN
# if __SCHAR_MAX__ == __INT_MAX__
# define CHAR_MIN 0U
# else
# define CHAR_MIN 0
# endif
# undef CHAR_MAX
# define CHAR_MAX UCHAR_MAX
#else
# undef CHAR_MIN
# define CHAR_MIN SCHAR_MIN
# undef CHAR_MAX
# define CHAR_MAX SCHAR_MAX
#endif
/* Minimum and maximum values a `signed short int' can hold. */
#undef SHRT_MIN
#define SHRT_MIN (-SHRT_MAX - 1)
#undef SHRT_MAX
#define SHRT_MAX __SHRT_MAX__
/* Maximum value an `unsigned short int' can hold. (Minimum is 0). */
#undef USHRT_MAX
#if __SHRT_MAX__ == __INT_MAX__
# define USHRT_MAX (SHRT_MAX * 2U + 1U)
#else
# define USHRT_MAX (SHRT_MAX * 2 + 1)
#endif
/* Minimum and maximum values a `signed int' can hold. */
#undef INT_MIN
#define INT_MIN (-INT_MAX - 1)
#undef INT_MAX
#define INT_MAX __INT_MAX__
/* Maximum value an `unsigned int' can hold. (Minimum is 0). */
#undef UINT_MAX
#define UINT_MAX (INT_MAX * 2U + 1U)
/* Minimum and maximum values a `signed long int' can hold.
(Same as `int'). */
#undef LONG_MIN
#define LONG_MIN (-LONG_MAX - 1L)
#undef LONG_MAX
#define LONG_MAX __LONG_MAX__
/* Maximum value an `unsigned long int' can hold. (Minimum is 0). */
#undef ULONG_MAX
#define ULONG_MAX (LONG_MAX * 2UL + 1UL)
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* Minimum and maximum values a `signed long long int' can hold. */
# undef LLONG_MIN
# define LLONG_MIN (-LLONG_MAX - 1LL)
# undef LLONG_MAX
# define LLONG_MAX __LONG_LONG_MAX__
/* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
# undef ULLONG_MAX
# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
#endif
#if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
/* Minimum and maximum values a `signed long long int' can hold. */
# undef LONG_LONG_MIN
# define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL)
# undef LONG_LONG_MAX
# define LONG_LONG_MAX __LONG_LONG_MAX__
/* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
# undef ULONG_LONG_MAX
# define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1ULL)
#endif
#endif /* _LIMITS_H___ */
/* APPLE LOCAL begin 4401222 */
/* APPLE LOCAL end 4401222 */

View file

@ -0,0 +1,220 @@
/* Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/* Implemented from the mm3dnow.h (of supposedly AMD origin) included with
MSVC 7.1. */
#ifndef _MM3DNOW_H_INCLUDED
#define _MM3DNOW_H_INCLUDED
#ifdef __3dNOW__
#include <mmintrin.h>
/* Internal data types for implementing the intrinsics. */
typedef float __v2sf __attribute__ ((__vector_size__ (8)));
static __inline void
_m_femms (void)
{
__builtin_ia32_femms();
}
static __inline __m64
_m_pavgusb (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pavgusb ((__v8qi)__A, (__v8qi)__B);
}
static __inline __m64
_m_pf2id (__m64 __A)
{
return (__m64)__builtin_ia32_pf2id ((__v2sf)__A);
}
static __inline __m64
_m_pfacc (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfacc ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfadd (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfadd ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfcmpeq (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfcmpeq ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfcmpge (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfcmpge ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfcmpgt (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfcmpgt ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfmax (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfmax ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfmin (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfmin ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfmul (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfmul ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfrcp (__m64 __A)
{
return (__m64)__builtin_ia32_pfrcp ((__v2sf)__A);
}
static __inline __m64
_m_pfrcpit1 (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfrcpit1 ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfrcpit2 (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfrcpit2 ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfrsqrt (__m64 __A)
{
return (__m64)__builtin_ia32_pfrsqrt ((__v2sf)__A);
}
static __inline __m64
_m_pfrsqit1 (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfrsqit1 ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfsub (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfsub ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfsubr (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfsubr ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pi2fd (__m64 __A)
{
return (__m64)__builtin_ia32_pi2fd ((__v2si)__A);
}
static __inline __m64
_m_pmulhrw (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pmulhrw ((__v4hi)__A, (__v4hi)__B);
}
static __inline void
_m_prefetch (void *__P)
{
__builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
}
static __inline void
_m_prefetchw (void *__P)
{
__builtin_prefetch (__P, 1, 3 /* _MM_HINT_T0 */);
}
static __inline __m64
_m_from_float (float __A)
{
return (__m64)(__v2sf){ __A, 0 };
}
static __inline float
_m_to_float (__m64 __A)
{
union { __v2sf v; float a[2]; } __tmp = { (__v2sf)__A };
return __tmp.a[0];
}
#ifdef __3dNOW_A__
static __inline __m64
_m_pf2iw (__m64 __A)
{
return (__m64)__builtin_ia32_pf2iw ((__v2sf)__A);
}
static __inline __m64
_m_pfnacc (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfnacc ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfpnacc (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfpnacc ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pi2fw (__m64 __A)
{
return (__m64)__builtin_ia32_pi2fw ((__v2si)__A);
}
static __inline __m64
_m_pswapd (__m64 __A)
{
return (__m64)__builtin_ia32_pswapdsf ((__v2sf)__A);
}
#endif /* __3dNOW_A__ */
#endif /* __3dNOW__ */
#endif /* _MM3DNOW_H_INCLUDED */

View file

@ -0,0 +1,77 @@
/* Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
#ifndef _MM_MALLOC_H_INCLUDED
#define _MM_MALLOC_H_INCLUDED
#include <stdlib.h>
#include <errno.h>
static __inline__ void*
_mm_malloc (size_t size, size_t align)
{
void * malloc_ptr;
void * aligned_ptr;
/* Error if align is not a power of two. */
if (align & (align - 1))
{
errno = EINVAL;
return ((void*) 0);
}
if (size == 0)
return ((void *) 0);
/* Assume malloc'd pointer is aligned at least to sizeof (void*).
If necessary, add another sizeof (void*) to store the value
returned by malloc. Effectively this enforces a minimum alignment
of sizeof double. */
if (align < 2 * sizeof (void *))
align = 2 * sizeof (void *);
malloc_ptr = malloc (size + align);
if (!malloc_ptr)
return ((void *) 0);
/* Align We have at least sizeof (void *) space below malloc'd ptr. */
aligned_ptr = (void *) (((size_t) malloc_ptr + align)
& ~((size_t) (align) - 1));
/* Store the original pointer just before p. */
((void **) aligned_ptr) [-1] = malloc_ptr;
return aligned_ptr;
}
static __inline__ void
_mm_free (void * aligned_ptr)
{
if (aligned_ptr)
free (((void **) aligned_ptr) [-1]);
}
#endif /* _MM_MALLOC_H_INCLUDED */

View file

@ -0,0 +1,41 @@
/* APPLE LOCAL file 5612787 mainline sse4 */
/* Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/* Implemented from the specification included in the Intel C++ Compiler
User Guide and Reference, version 10.0. */
#ifndef _NMMINTRIN_H_INCLUDED
#define _NMMINTRIN_H_INCLUDED
#ifndef __SSE4_2__
# error "SSE4.2 instruction set not enabled"
#else
/* We just include SSE4.1 header file. */
#include <smmintrin.h>
#endif /* __SSE4_2__ */
#endif /* _NMMINTRIN_H_INCLUDED */

View file

@ -0,0 +1,87 @@
/* Copyright (C) 2005 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@redhat.com>.
This file is part of the GNU OpenMP Library (libgomp).
Libgomp is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
more details.
You should have received a copy of the GNU Lesser General Public License
along with libgomp; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA. */
/* As a special exception, if you link this library with other files, some
of which are compiled with GCC, to produce an executable, this library
does not by itself cause the resulting executable to be covered by the
GNU General Public License. This exception does not however invalidate
any other reasons why the executable file might be covered by the GNU
General Public License. */
#ifndef OMP_H
#define OMP_H 1
#ifndef _LIBGOMP_OMP_LOCK_DEFINED
#define _LIBGOMP_OMP_LOCK_DEFINED 1
/* These two structures get edited by the libgomp build process to
reflect the shape of the two types. Their internals are private
to the library. */
typedef struct
{
unsigned char _x[64]
__attribute__((__aligned__(8)));
} omp_lock_t;
typedef struct
{
unsigned char _x[72]
__attribute__((__aligned__(8)));
} omp_nest_lock_t;
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern void omp_set_num_threads (int);
extern int omp_get_num_threads (void);
extern int omp_get_max_threads (void);
extern int omp_get_thread_num (void);
extern int omp_get_num_procs (void);
extern int omp_in_parallel (void);
extern void omp_set_dynamic (int);
extern int omp_get_dynamic (void);
extern void omp_set_nested (int);
extern int omp_get_nested (void);
extern void omp_init_lock (omp_lock_t *);
extern void omp_destroy_lock (omp_lock_t *);
extern void omp_set_lock (omp_lock_t *);
extern void omp_unset_lock (omp_lock_t *);
extern int omp_test_lock (omp_lock_t *);
extern void omp_init_nest_lock (omp_nest_lock_t *);
extern void omp_destroy_nest_lock (omp_nest_lock_t *);
extern void omp_set_nest_lock (omp_nest_lock_t *);
extern void omp_unset_nest_lock (omp_nest_lock_t *);
extern int omp_test_nest_lock (omp_nest_lock_t *);
extern double omp_get_wtime (void);
extern double omp_get_wtick (void);
#ifdef __cplusplus
}
#endif
#endif /* OMP_H */

View file

@ -0,0 +1,172 @@
/* APPLE LOCAL file mainline 2005-06-30 Radar 4131077 */
/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/* Implemented from the specification included in the Intel C++ Compiler
User Guide and Reference, version 9.0. */
#ifndef _PMMINTRIN_H_INCLUDED
#define _PMMINTRIN_H_INCLUDED
#ifdef __SSE3__
#include <xmmintrin.h>
#include <emmintrin.h>
/* Additional bits in the MXCSR. */
#define _MM_DENORMALS_ZERO_MASK 0x0040
#define _MM_DENORMALS_ZERO_ON 0x0040
#define _MM_DENORMALS_ZERO_OFF 0x0000
#define _MM_SET_DENORMALS_ZERO_MODE(mode) \
_mm_setcsr ((_mm_getcsr () & ~_MM_DENORMALS_ZERO_MASK) | (mode))
#define _MM_GET_DENORMALS_ZERO_MODE() \
(_mm_getcsr() & _MM_DENORMALS_ZERO_MASK)
/* APPLE LOCAL begin nodebug inline 4152603 */
#define __always_inline__ __always_inline__, __nodebug__
/* APPLE LOCAL end nodebug inline 4152603 */
/* APPLE LOCAL begin radar 5618945 */
#undef __STATIC_INLINE
#ifdef __GNUC_STDC_INLINE__
#define __STATIC_INLINE __inline
#else
#define __STATIC_INLINE static __inline
#endif
/* APPLE LOCAL end radar 5618945 */
/* APPLE LOCAL begin radar 4152603 */
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_addsub_ps (__m128 __X, __m128 __Y)
{
return (__m128) __builtin_ia32_addsubps ((__v4sf)__X, (__v4sf)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hadd_ps (__m128 __X, __m128 __Y)
{
return (__m128) __builtin_ia32_haddps ((__v4sf)__X, (__v4sf)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hsub_ps (__m128 __X, __m128 __Y)
{
return (__m128) __builtin_ia32_hsubps ((__v4sf)__X, (__v4sf)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_movehdup_ps (__m128 __X)
{
return (__m128) __builtin_ia32_movshdup ((__v4sf)__X);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_moveldup_ps (__m128 __X)
{
return (__m128) __builtin_ia32_movsldup ((__v4sf)__X);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128d __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_addsub_pd (__m128d __X, __m128d __Y)
{
return (__m128d) __builtin_ia32_addsubpd ((__v2df)__X, (__v2df)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128d __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hadd_pd (__m128d __X, __m128d __Y)
{
return (__m128d) __builtin_ia32_haddpd ((__v2df)__X, (__v2df)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128d __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hsub_pd (__m128d __X, __m128d __Y)
{
return (__m128d) __builtin_ia32_hsubpd ((__v2df)__X, (__v2df)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128d __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_loaddup_pd (double const *__P)
{
return _mm_load1_pd (__P);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128d __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_movedup_pd (__m128d __X)
{
return _mm_shuffle_pd (__X, __X, _MM_SHUFFLE2 (0,0));
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_lddqu_si128 (__m128i const *__P)
{
return (__m128i) __builtin_ia32_lddqu ((char const *)__P);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE void __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_monitor (void const * __P, unsigned int __E, unsigned int __H)
{
__builtin_ia32_monitor (__P, __E, __H);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE void __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_mwait (unsigned int __E, unsigned int __H)
{
__builtin_ia32_mwait (__E, __H);
}
/* APPLE LOCAL end radar 4152603 */
/* APPLE LOCAL begin nodebug inline 4152603 */
#undef __always_inline__
/* APPLE LOCAL end nodebug inline 4152603 */
#endif /* __SSE3__ */
#endif /* _PMMINTRIN_H_INCLUDED */

View file

@ -0,0 +1 @@
../../../../../include/gcc/darwin/4.2/ppc_intrinsics.h

View file

@ -0,0 +1,836 @@
/* APPLE LOCAL file 5612787 mainline sse4 */
/* Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/* Implemented from the specification included in the Intel C++ Compiler
User Guide and Reference, version 10.0. */
#ifndef _SMMINTRIN_H_INCLUDED
#define _SMMINTRIN_H_INCLUDED
#ifndef __SSE4_1__
# error "SSE4.1 instruction set not enabled"
#else
/* We need definitions from the SSSE3, SSE3, SSE2 and SSE header
files. */
#include <tmmintrin.h>
/* SSE4.1 */
/* Rounding mode macros. */
#define _MM_FROUND_TO_NEAREST_INT 0x00
#define _MM_FROUND_TO_NEG_INF 0x01
#define _MM_FROUND_TO_POS_INF 0x02
#define _MM_FROUND_TO_ZERO 0x03
#define _MM_FROUND_CUR_DIRECTION 0x04
#define _MM_FROUND_RAISE_EXC 0x00
#define _MM_FROUND_NO_EXC 0x08
#define _MM_FROUND_NINT \
(_MM_FROUND_TO_NEAREST_INT | _MM_FROUND_RAISE_EXC)
#define _MM_FROUND_FLOOR \
(_MM_FROUND_TO_NEG_INF | _MM_FROUND_RAISE_EXC)
#define _MM_FROUND_CEIL \
(_MM_FROUND_TO_POS_INF | _MM_FROUND_RAISE_EXC)
#define _MM_FROUND_TRUNC \
(_MM_FROUND_TO_ZERO | _MM_FROUND_RAISE_EXC)
#define _MM_FROUND_RINT \
(_MM_FROUND_CUR_DIRECTION | _MM_FROUND_RAISE_EXC)
#define _MM_FROUND_NEARBYINT \
(_MM_FROUND_CUR_DIRECTION | _MM_FROUND_NO_EXC)
/* APPLE LOCAL begin nodebug inline 4152603 */
#define __always_inline__ __always_inline__, __nodebug__
/* APPLE LOCAL end nodebug inline 4152603 */
/* APPLE LOCAL begin radar 5618945 */
#undef __STATIC_INLINE
#ifdef __GNUC_STDC_INLINE__
#define __STATIC_INLINE __inline
#else
#define __STATIC_INLINE static __inline
#endif
/* APPLE LOCAL end radar 5618945 */
/* Integer blend instructions - select data from 2 sources using
constant/variable mask. */
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_blend_epi16 (__m128i __X, __m128i __Y, const int __M)
{
return (__m128i) __builtin_ia32_pblendw128 ((__v8hi)__X,
(__v8hi)__Y,
__M);
}
#else
#define _mm_blend_epi16(X, Y, M) \
((__m128i) __builtin_ia32_pblendw128 ((__v8hi)(X), (__v8hi)(Y), (M)))
#endif
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_blendv_epi8 (__m128i __X, __m128i __Y, __m128i __M)
{
return (__m128i) __builtin_ia32_pblendvb128 ((__v16qi)__X,
(__v16qi)__Y,
(__v16qi)__M);
}
/* Single precision floating point blend instructions - select data
from 2 sources using constant/variable mask. */
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128 __attribute__((__always_inline__))
_mm_blend_ps (__m128 __X, __m128 __Y, const int __M)
{
return (__m128) __builtin_ia32_blendps ((__v4sf)__X,
(__v4sf)__Y,
__M);
}
#else
#define _mm_blend_ps(X, Y, M) \
((__m128) __builtin_ia32_blendps ((__v4sf)(X), (__v4sf)(Y), (M)))
#endif
__STATIC_INLINE __m128 __attribute__((__always_inline__))
_mm_blendv_ps (__m128 __X, __m128 __Y, __m128 __M)
{
return (__m128) __builtin_ia32_blendvps ((__v4sf)__X,
(__v4sf)__Y,
(__v4sf)__M);
}
/* Double precision floating point blend instructions - select data
from 2 sources using constant/variable mask. */
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128d __attribute__((__always_inline__))
_mm_blend_pd (__m128d __X, __m128d __Y, const int __M)
{
return (__m128d) __builtin_ia32_blendpd ((__v2df)__X,
(__v2df)__Y,
__M);
}
#else
#define _mm_blend_pd(X, Y, M) \
((__m128d) __builtin_ia32_blendpd ((__v2df)(X), (__v2df)(Y), (M)))
#endif
__STATIC_INLINE __m128d __attribute__((__always_inline__))
_mm_blendv_pd (__m128d __X, __m128d __Y, __m128d __M)
{
return (__m128d) __builtin_ia32_blendvpd ((__v2df)__X,
(__v2df)__Y,
(__v2df)__M);
}
/* Dot product instructions with mask-defined summing and zeroing parts
of result. */
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128 __attribute__((__always_inline__))
_mm_dp_ps (__m128 __X, __m128 __Y, const int __M)
{
return (__m128) __builtin_ia32_dpps ((__v4sf)__X,
(__v4sf)__Y,
__M);
}
__STATIC_INLINE __m128d __attribute__((__always_inline__))
_mm_dp_pd (__m128d __X, __m128d __Y, const int __M)
{
return (__m128d) __builtin_ia32_dppd ((__v2df)__X,
(__v2df)__Y,
__M);
}
#else
#define _mm_dp_ps(X, Y, M) \
((__m128) __builtin_ia32_dpps ((__v4sf)(X), (__v4sf)(Y), (M)))
#define _mm_dp_pd(X, Y, M) \
((__m128d) __builtin_ia32_dppd ((__v2df)(X), (__v2df)(Y), (M)))
#endif
/* Packed integer 64-bit comparison, zeroing or filling with ones
corresponding parts of result. */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cmpeq_epi64 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pcmpeqq ((__v2di)__X, (__v2di)__Y);
}
/* Min/max packed integer instructions. */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_min_epi8 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pminsb128 ((__v16qi)__X, (__v16qi)__Y);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_max_epi8 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pmaxsb128 ((__v16qi)__X, (__v16qi)__Y);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_min_epu16 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pminuw128 ((__v8hi)__X, (__v8hi)__Y);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_max_epu16 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pmaxuw128 ((__v8hi)__X, (__v8hi)__Y);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_min_epi32 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pminsd128 ((__v4si)__X, (__v4si)__Y);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_max_epi32 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pmaxsd128 ((__v4si)__X, (__v4si)__Y);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_min_epu32 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pminud128 ((__v4si)__X, (__v4si)__Y);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_max_epu32 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pmaxud128 ((__v4si)__X, (__v4si)__Y);
}
/* Packed integer 32-bit multiplication with truncation of upper
halves of results. */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_mullo_epi32 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pmulld128 ((__v4si)__X, (__v4si)__Y);
}
/* Packed integer 32-bit multiplication of 2 pairs of operands
with two 64-bit results. */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_mul_epi32 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pmuldq128 ((__v4si)__X, (__v4si)__Y);
}
/* Packed integer 128-bit bitwise comparison. Return 1 if
(__V & __M) == 0. */
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_testz_si128 (__m128i __M, __m128i __V)
{
return __builtin_ia32_ptestz128 ((__v2di)__M, (__v2di)__V);
}
/* Packed integer 128-bit bitwise comparison. Return 1 if
(__V & ~__M) == 0. */
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_testc_si128 (__m128i __M, __m128i __V)
{
return __builtin_ia32_ptestc128 ((__v2di)__M, (__v2di)__V);
}
/* Packed integer 128-bit bitwise comparison. Return 1 if
(__V & __M) != 0 && (__V & ~__M) != 0. */
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_testnzc_si128 (__m128i __M, __m128i __V)
{
return __builtin_ia32_ptestnzc128 ((__v2di)__M, (__v2di)__V);
}
/* Macros for packed integer 128-bit comparison intrinsics. */
#define _mm_test_all_zeros(M, V) _mm_testz_si128 ((M), (V))
#define _mm_test_all_ones(V) \
_mm_testc_si128 ((V), _mm_cmpeq_epi32 ((V), (V)))
#define _mm_test_mix_ones_zeros(M, V) _mm_testnzc_si128 ((M), (V))
/* Insert single precision float into packed single precision array
element selected by index N. The bits [7-6] of N define S
index, the bits [5-4] define D index, and bits [3-0] define
zeroing mask for D. */
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128 __attribute__((__always_inline__))
_mm_insert_ps (__m128 __D, __m128 __S, const int __N)
{
return (__m128) __builtin_ia32_insertps128 ((__v4sf)__D,
(__v4sf)__S,
__N);
}
#else
#define _mm_insert_ps(D, S, N) \
((__m128) __builtin_ia32_insertps128 ((__v4sf)(D), (__v4sf)(S), (N)))
#endif
/* Helper macro to create the N value for _mm_insert_ps. */
#define _MM_MK_INSERTPS_NDX(S, D, M) (((S) << 6) | ((D) << 4) | (M))
/* Extract binary representation of single precision float from packed
single precision array element of X selected by index N. */
#ifdef __OPTIMIZE__
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_extract_ps (__m128 __X, const int __N)
{
union { int i; float f; } __tmp;
__tmp.f = __builtin_ia32_vec_ext_v4sf ((__v4sf)__X, __N);
return __tmp.i;
}
#else
#define _mm_extract_ps(X, N) \
(__extension__ \
({ \
union { int i; float f; } __tmp; \
__tmp.f = __builtin_ia32_vec_ext_v4sf ((__v4sf)(X), (N)); \
__tmp.i; \
}) \
)
#endif
/* Extract binary representation of single precision float into
D from packed single precision array element of S selected
by index N. */
#define _MM_EXTRACT_FLOAT(D, S, N) \
{ (D) = __builtin_ia32_vec_ext_v4sf ((__v4sf)(S), (N)); }
/* Extract specified single precision float element into the lower
part of __m128. */
#define _MM_PICK_OUT_PS(X, N) \
_mm_insert_ps (_mm_setzero_ps (), (X), \
_MM_MK_INSERTPS_NDX ((N), 0, 0x0e))
/* Insert integer, S, into packed integer array element of D
selected by index N. */
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_insert_epi8 (__m128i __D, int __S, const int __N)
{
return (__m128i) __builtin_ia32_vec_set_v16qi ((__v16qi)__D,
__S, __N);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_insert_epi32 (__m128i __D, int __S, const int __N)
{
return (__m128i) __builtin_ia32_vec_set_v4si ((__v4si)__D,
__S, __N);
}
#ifdef __x86_64__
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_insert_epi64 (__m128i __D, long long __S, const int __N)
{
return (__m128i) __builtin_ia32_vec_set_v2di ((__v2di)__D,
__S, __N);
}
#endif
#else
#define _mm_insert_epi8(D, S, N) \
((__m128i) __builtin_ia32_vec_set_v16qi ((__v16qi)(D), (S), (N)))
#define _mm_insert_epi32(D, S, N) \
((__m128i) __builtin_ia32_vec_set_v4si ((__v4si)(D), (S), (N)))
#ifdef __x86_64__
#define _mm_insert_epi64(D, S, N) \
((__m128i) __builtin_ia32_vec_set_v2di ((__v2di)(D), (S), (N)))
#endif
#endif
/* Extract integer from packed integer array element of X selected by
index N. */
#ifdef __OPTIMIZE__
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_extract_epi8 (__m128i __X, const int __N)
{
return __builtin_ia32_vec_ext_v16qi ((__v16qi)__X, __N);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_extract_epi32 (__m128i __X, const int __N)
{
return __builtin_ia32_vec_ext_v4si ((__v4si)__X, __N);
}
#ifdef __x86_64__
__STATIC_INLINE long long __attribute__((__always_inline__))
_mm_extract_epi64 (__m128i __X, const int __N)
{
return __builtin_ia32_vec_ext_v2di ((__v2di)__X, __N);
}
#endif
#else
#define _mm_extract_epi8(X, N) \
__builtin_ia32_vec_ext_v16qi ((__v16qi) X, (N))
#define _mm_extract_epi32(X, N) \
__builtin_ia32_vec_ext_v4si ((__v4si) X, (N))
#ifdef __x86_64__
#define _mm_extract_epi64(X, N) \
((long long) __builtin_ia32_vec_ext_v2di ((__v2di)(X), (N)))
#endif
#endif
/* Return horizontal packed word minimum and its index in bits [15:0]
and bits [18:16] respectively. */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_minpos_epu16 (__m128i __X)
{
return (__m128i) __builtin_ia32_phminposuw128 ((__v8hi)__X);
}
/* Packed/scalar double precision floating point rounding. */
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128d __attribute__((__always_inline__))
_mm_round_pd (__m128d __V, const int __M)
{
return (__m128d) __builtin_ia32_roundpd ((__v2df)__V, __M);
}
__STATIC_INLINE __m128d __attribute__((__always_inline__))
_mm_round_sd(__m128d __D, __m128d __V, const int __M)
{
return (__m128d) __builtin_ia32_roundsd ((__v2df)__D,
(__v2df)__V,
__M);
}
#else
#define _mm_round_pd(V, M) \
((__m128d) __builtin_ia32_roundpd ((__v2df)(V), (M)))
#define _mm_round_sd(D, V, M) \
((__m128d) __builtin_ia32_roundsd ((__v2df)(D), (__v2df)(V), (M)))
#endif
/* Packed/scalar single precision floating point rounding. */
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128 __attribute__((__always_inline__))
_mm_round_ps (__m128 __V, const int __M)
{
return (__m128) __builtin_ia32_roundps ((__v4sf)__V, __M);
}
__STATIC_INLINE __m128 __attribute__((__always_inline__))
_mm_round_ss (__m128 __D, __m128 __V, const int __M)
{
return (__m128) __builtin_ia32_roundss ((__v4sf)__D,
(__v4sf)__V,
__M);
}
#else
#define _mm_round_ps(V, M) \
((__m128) __builtin_ia32_roundps ((__v4sf)(V), (M)))
#define _mm_round_ss(D, V, M) \
((__m128) __builtin_ia32_roundss ((__v4sf)(D), (__v4sf)(V), (M)))
#endif
/* Macros for ceil/floor intrinsics. */
#define _mm_ceil_pd(V) _mm_round_pd ((V), _MM_FROUND_CEIL)
#define _mm_ceil_sd(D, V) _mm_round_sd ((D), (V), _MM_FROUND_CEIL)
#define _mm_floor_pd(V) _mm_round_pd((V), _MM_FROUND_FLOOR)
#define _mm_floor_sd(D, V) _mm_round_sd ((D), (V), _MM_FROUND_FLOOR)
#define _mm_ceil_ps(V) _mm_round_ps ((V), _MM_FROUND_CEIL)
#define _mm_ceil_ss(D, V) _mm_round_ss ((D), (V), _MM_FROUND_CEIL)
#define _mm_floor_ps(V) _mm_round_ps ((V), _MM_FROUND_FLOOR)
#define _mm_floor_ss(D, V) _mm_round_ss ((D), (V), _MM_FROUND_FLOOR)
/* Packed integer sign-extension. */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepi8_epi32 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovsxbd128 ((__v16qi)__X);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepi16_epi32 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovsxwd128 ((__v8hi)__X);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepi8_epi64 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovsxbq128 ((__v16qi)__X);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepi32_epi64 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovsxdq128 ((__v4si)__X);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepi16_epi64 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovsxwq128 ((__v8hi)__X);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepi8_epi16 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovsxbw128 ((__v16qi)__X);
}
/* Packed integer zero-extension. */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepu8_epi32 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovzxbd128 ((__v16qi)__X);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepu16_epi32 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovzxwd128 ((__v8hi)__X);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepu8_epi64 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovzxbq128 ((__v16qi)__X);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepu32_epi64 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovzxdq128 ((__v4si)__X);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepu16_epi64 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovzxwq128 ((__v8hi)__X);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepu8_epi16 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovzxbw128 ((__v16qi)__X);
}
/* Pack 8 double words from 2 operands into 8 words of result with
unsigned saturation. */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_packus_epi32 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_packusdw128 ((__v4si)__X, (__v4si)__Y);
}
/* Sum absolute 8-bit integer difference of adjacent groups of 4
byte integers in the first 2 operands. Starting offsets within
operands are determined by the 3rd mask operand. */
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_mpsadbw_epu8 (__m128i __X, __m128i __Y, const int __M)
{
return (__m128i) __builtin_ia32_mpsadbw128 ((__v16qi)__X,
(__v16qi)__Y, __M);
}
#else
#define _mm_mpsadbw_epu8(X, Y, M) \
((__m128i) __builtin_ia32_mpsadbw128 ((__v16qi)(X), (__v16qi)(Y), (M)))
#endif
/* Load double quadword using non-temporal aligned hint. */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_stream_load_si128 (__m128i *__X)
{
return (__m128i) __builtin_ia32_movntdqa ((__v2di *) __X);
}
#ifdef __SSE4_2__
/* These macros specify the source data format. */
#define SIDD_UBYTE_OPS 0x00
#define SIDD_UWORD_OPS 0x01
#define SIDD_SBYTE_OPS 0x02
#define SIDD_SWORD_OPS 0x03
/* These macros specify the comparison operation. */
#define SIDD_CMP_EQUAL_ANY 0x00
#define SIDD_CMP_RANGES 0x04
#define SIDD_CMP_EQUAL_EACH 0x08
#define SIDD_CMP_EQUAL_ORDERED 0x0c
/* These macros specify the the polarity. */
#define SIDD_POSITIVE_POLARITY 0x00
#define SIDD_NEGATIVE_POLARITY 0x10
#define SIDD_MASKED_POSITIVE_POLARITY 0x20
#define SIDD_MASKED_NEGATIVE_POLARITY 0x30
/* These macros specify the output selection in _mm_cmpXstri (). */
#define SIDD_LEAST_SIGNIFICANT 0x00
#define SIDD_MOST_SIGNIFICANT 0x40
/* These macros specify the output selection in _mm_cmpXstrm (). */
#define SIDD_BIT_MASK 0x00
#define SIDD_UNIT_MASK 0x40
/* Intrinsics for text/string processing. */
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cmpistrm (__m128i __X, __m128i __Y, const int __M)
{
return (__m128i) __builtin_ia32_pcmpistrm128 ((__v16qi)__X,
(__v16qi)__Y,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpistri (__m128i __X, __m128i __Y, const int __M)
{
return __builtin_ia32_pcmpistri128 ((__v16qi)__X,
(__v16qi)__Y,
__M);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cmpestrm (__m128i __X, int __LX, __m128i __Y, int __LY, const int __M)
{
return (__m128i) __builtin_ia32_pcmpestrm128 ((__v16qi)__X, __LX,
(__v16qi)__Y, __LY,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpestri (__m128i __X, int __LX, __m128i __Y, int __LY, const int __M)
{
return __builtin_ia32_pcmpestri128 ((__v16qi)__X, __LX,
(__v16qi)__Y, __LY,
__M);
}
#else
#define _mm_cmpistrm(X, Y, M) \
((__m128i) __builtin_ia32_pcmpistrm128 ((__v16qi)(X), (__v16qi)(Y), (M)))
#define _mm_cmpistri(X, Y, M) \
__builtin_ia32_pcmpistri128 ((__v16qi)(X), (__v16qi)(Y), (M))
#define _mm_cmpestrm(X, LX, Y, LY, M) \
((__m128i) __builtin_ia32_pcmpestrm128 ((__v16qi)(X), (int)(LX), \
(__v16qi)(Y), (int)(LY), (M)))
#define _mm_cmpestri(X, LX, Y, LY, M) \
__builtin_ia32_pcmpestri128 ((__v16qi)(X), (int)(LX), \
(__v16qi)(Y), (int)(LY), (M))
#endif
/* Intrinsics for text/string processing and reading values of
EFlags. */
#ifdef __OPTIMIZE__
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpistra (__m128i __X, __m128i __Y, const int __M)
{
return __builtin_ia32_pcmpistria128 ((__v16qi)__X,
(__v16qi)__Y,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpistrc (__m128i __X, __m128i __Y, const int __M)
{
return __builtin_ia32_pcmpistric128 ((__v16qi)__X,
(__v16qi)__Y,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpistro (__m128i __X, __m128i __Y, const int __M)
{
return __builtin_ia32_pcmpistrio128 ((__v16qi)__X,
(__v16qi)__Y,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpistrs (__m128i __X, __m128i __Y, const int __M)
{
return __builtin_ia32_pcmpistris128 ((__v16qi)__X,
(__v16qi)__Y,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpistrz (__m128i __X, __m128i __Y, const int __M)
{
return __builtin_ia32_pcmpistriz128 ((__v16qi)__X,
(__v16qi)__Y,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpestra (__m128i __X, int __LX, __m128i __Y, int __LY, const int __M)
{
return __builtin_ia32_pcmpestria128 ((__v16qi)__X, __LX,
(__v16qi)__Y, __LY,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpestrc (__m128i __X, int __LX, __m128i __Y, int __LY, const int __M)
{
return __builtin_ia32_pcmpestric128 ((__v16qi)__X, __LX,
(__v16qi)__Y, __LY,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpestro (__m128i __X, int __LX, __m128i __Y, int __LY, const int __M)
{
return __builtin_ia32_pcmpestrio128 ((__v16qi)__X, __LX,
(__v16qi)__Y, __LY,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpestrs (__m128i __X, int __LX, __m128i __Y, int __LY, const int __M)
{
return __builtin_ia32_pcmpestris128 ((__v16qi)__X, __LX,
(__v16qi)__Y, __LY,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpestrz (__m128i __X, int __LX, __m128i __Y, int __LY, const int __M)
{
return __builtin_ia32_pcmpestriz128 ((__v16qi)__X, __LX,
(__v16qi)__Y, __LY,
__M);
}
#else
#define _mm_cmpistra(X, Y, M) \
__builtin_ia32_pcmpistria128 ((__v16qi)(X), (__v16qi)(Y), (M))
#define _mm_cmpistrc(X, Y, M) \
__builtin_ia32_pcmpistric128 ((__v16qi)(X), (__v16qi)(Y), (M))
#define _mm_cmpistro(X, Y, M) \
__builtin_ia32_pcmpistrio128 ((__v16qi)(X), (__v16qi)(Y), (M))
#define _mm_cmpistrs(X, Y, M) \
__builtin_ia32_pcmpistris128 ((__v16qi)(X), (__v16qi)(Y), (M))
#define _mm_cmpistrz(X, Y, M) \
__builtin_ia32_pcmpistriz128 ((__v16qi)(X), (__v16qi)(Y), (M))
#define _mm_cmpestra(X, LX, Y, LY, M) \
__builtin_ia32_pcmpestria128 ((__v16qi)(X), (int)(LX), \
(__v16qi)(Y), (int)(LY), (M))
#define _mm_cmpestrc(X, LX, Y, LY, M) \
__builtin_ia32_pcmpestric128 ((__v16qi)(X), (int)(LX), \
(__v16qi)(Y), (int)(LY), (M))
#define _mm_cmpestro(X, LX, Y, LY, M) \
__builtin_ia32_pcmpestrio128 ((__v16qi)(X), (int)(LX), \
(__v16qi)(Y), (int)(LY), (M))
#define _mm_cmpestrs(X, LX, Y, LY, M) \
__builtin_ia32_pcmpestris128 ((__v16qi)(X), (int)(LX), \
(__v16qi)(Y), (int)(LY), (M))
#define _mm_cmpestrz(X, LX, Y, LY, M) \
__builtin_ia32_pcmpestriz128 ((__v16qi)(X), (int)(LX), \
(__v16qi)(Y), (int)(LY), (M))
#endif
/* Packed integer 64-bit comparison, zeroing or filling with ones
corresponding parts of result. */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cmpgt_epi64 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pcmpgtq ((__v2di)__X, (__v2di)__Y);
}
/* Calculate a number of bits set to 1. */
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_popcnt_u32 (unsigned int __X)
{
return __builtin_popcount (__X);
}
#ifdef __x86_64__
__STATIC_INLINE long long __attribute__((__always_inline__))
_mm_popcnt_u64 (unsigned long long __X)
{
return __builtin_popcountll (__X);
}
#endif
/* Accumulate CRC32 (polynomial 0x11EDC6F41) value. */
__STATIC_INLINE unsigned int __attribute__((__always_inline__))
_mm_crc32_u8 (unsigned int __C, unsigned char __V)
{
return __builtin_ia32_crc32qi (__C, __V);
}
__STATIC_INLINE unsigned int __attribute__((__always_inline__))
_mm_crc32_u16 (unsigned int __C, unsigned short __V)
{
return __builtin_ia32_crc32hi (__C, __V);
}
__STATIC_INLINE unsigned int __attribute__((__always_inline__))
_mm_crc32_u32 (unsigned int __C, unsigned int __V)
{
return __builtin_ia32_crc32si (__C, __V);
}
#ifdef __x86_64__
__STATIC_INLINE unsigned long long __attribute__((__always_inline__))
_mm_crc32_u64 (unsigned long long __C, unsigned long long __V)
{
return __builtin_ia32_crc32di (__C, __V);
}
#endif
#endif /* __SSE4_2__ */
#endif /* __SSE4_1__ */
/* APPLE LOCAL begin nodebug inline 4152603 */
#undef __always_inline__
/* APPLE LOCAL end nodebug inline 4152603 */
#endif /* _SMMINTRIN_H_INCLUDED */

View file

@ -0,0 +1,133 @@
/* Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/*
* ISO C Standard: 7.15 Variable arguments <stdarg.h>
*/
#ifndef _STDARG_H
#ifndef _ANSI_STDARG_H_
#ifndef __need___va_list
#define _STDARG_H
#define _ANSI_STDARG_H_
#endif /* not __need___va_list */
#undef __need___va_list
/* Define __gnuc_va_list. */
#ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST
typedef __builtin_va_list __gnuc_va_list;
#endif
/* Define the standard macros for the user,
if this invocation was from the user program. */
#ifdef _STDARG_H
#define va_start(v,l) __builtin_va_start(v,l)
#define va_end(v) __builtin_va_end(v)
#define va_arg(v,l) __builtin_va_arg(v,l)
#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L
#define va_copy(d,s) __builtin_va_copy(d,s)
#endif
#define __va_copy(d,s) __builtin_va_copy(d,s)
/* Define va_list, if desired, from __gnuc_va_list. */
/* We deliberately do not define va_list when called from
stdio.h, because ANSI C says that stdio.h is not supposed to define
va_list. stdio.h needs to have access to that data type,
but must not use that name. It should use the name __gnuc_va_list,
which is safe because it is reserved for the implementation. */
#ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */
#undef _VA_LIST
#endif
#ifdef _BSD_VA_LIST
#undef _BSD_VA_LIST
#endif
#if defined(__svr4__) || (defined(_SCO_DS) && !defined(__VA_LIST))
/* SVR4.2 uses _VA_LIST for an internal alias for va_list,
so we must avoid testing it and setting it here.
SVR4 uses _VA_LIST as a flag in stdarg.h, but we should
have no conflict with that. */
#ifndef _VA_LIST_
#define _VA_LIST_
#ifdef __i860__
#ifndef _VA_LIST
#define _VA_LIST va_list
#endif
#endif /* __i860__ */
typedef __gnuc_va_list va_list;
#ifdef _SCO_DS
#define __VA_LIST
#endif
#endif /* _VA_LIST_ */
#else /* not __svr4__ || _SCO_DS */
/* The macro _VA_LIST_ is the same thing used by this file in Ultrix.
But on BSD NET2 we must not test or define or undef it.
(Note that the comments in NET 2's ansi.h
are incorrect for _VA_LIST_--see stdio.h!) */
#if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__) || defined(WINNT)
/* The macro _VA_LIST_DEFINED is used in Windows NT 3.5 */
#ifndef _VA_LIST_DEFINED
/* The macro _VA_LIST is used in SCO Unix 3.2. */
#ifndef _VA_LIST
/* The macro _VA_LIST_T_H is used in the Bull dpx2 */
#ifndef _VA_LIST_T_H
/* The macro __va_list__ is used by BeOS. */
#ifndef __va_list__
typedef __gnuc_va_list va_list;
#endif /* not __va_list__ */
#endif /* not _VA_LIST_T_H */
#endif /* not _VA_LIST */
#endif /* not _VA_LIST_DEFINED */
#if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__))
#define _VA_LIST_
#endif
#ifndef _VA_LIST
#define _VA_LIST
#endif
#ifndef _VA_LIST_DEFINED
#define _VA_LIST_DEFINED
#endif
#ifndef _VA_LIST_T_H
#define _VA_LIST_T_H
#endif
#ifndef __va_list__
#define __va_list__
#endif
#endif /* not _VA_LIST_, except on certain systems */
#endif /* not __svr4__ */
#endif /* _STDARG_H */
#endif /* not _ANSI_STDARG_H_ */
#endif /* not _STDARG_H */

View file

@ -0,0 +1,53 @@
/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/*
* ISO C Standard: 7.16 Boolean type and values <stdbool.h>
*/
#ifndef _STDBOOL_H
#define _STDBOOL_H
#ifndef __cplusplus
#define bool _Bool
#define true 1
#define false 0
#else /* __cplusplus */
/* Supporting <stdbool.h> in C++ is a GCC extension. */
#define _Bool bool
#define bool bool
#define false false
#define true true
#endif /* __cplusplus */
/* Signal that all the definitions are present. */
#define __bool_true_false_are_defined 1
#endif /* stdbool.h */

View file

@ -0,0 +1,419 @@
/* Copyright (C) 1989, 1997, 1998, 1999, 2000, 2002, 2004
Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/*
* ISO C Standard: 7.17 Common definitions <stddef.h>
*/
#if (!defined(_STDDEF_H) && !defined(_STDDEF_H_) && !defined(_ANSI_STDDEF_H) \
&& !defined(__STDDEF_H__)) \
|| defined(__need_wchar_t) || defined(__need_size_t) \
|| defined(__need_ptrdiff_t) || defined(__need_NULL) \
|| defined(__need_wint_t)
/* Any one of these symbols __need_* means that GNU libc
wants us just to define one data type. So don't define
the symbols that indicate this file's entire job has been done. */
#if (!defined(__need_wchar_t) && !defined(__need_size_t) \
&& !defined(__need_ptrdiff_t) && !defined(__need_NULL) \
&& !defined(__need_wint_t))
#define _STDDEF_H
#define _STDDEF_H_
/* snaroff@next.com says the NeXT needs this. */
#define _ANSI_STDDEF_H
/* Irix 5.1 needs this. */
#define __STDDEF_H__
#endif
#ifndef __sys_stdtypes_h
/* This avoids lossage on SunOS but only if stdtypes.h comes first.
There's no way to win with the other order! Sun lossage. */
/* On 4.3bsd-net2, make sure ansi.h is included, so we have
one less case to deal with in the following. */
#if defined (__BSD_NET2__) || defined (____386BSD____) || (defined (__FreeBSD__) && (__FreeBSD__ < 5)) || defined(__NetBSD__)
#include <machine/ansi.h>
#endif
/* On FreeBSD 5, machine/ansi.h does not exist anymore... */
#if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
#include <sys/_types.h>
#endif
/* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
defined if the corresponding type is *not* defined.
FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_ */
#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_)
#if !defined(_SIZE_T_) && !defined(_BSD_SIZE_T_)
#define _SIZE_T
#endif
#if !defined(_PTRDIFF_T_) && !defined(_BSD_PTRDIFF_T_)
#define _PTRDIFF_T
#endif
/* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_
instead of _WCHAR_T_. */
#if !defined(_WCHAR_T_) && !defined(_BSD_WCHAR_T_)
#ifndef _BSD_WCHAR_T_
#define _WCHAR_T
#endif
#endif
/* Undef _FOO_T_ if we are supposed to define foo_t. */
#if defined (__need_ptrdiff_t) || defined (_STDDEF_H_)
#undef _PTRDIFF_T_
#undef _BSD_PTRDIFF_T_
#endif
#if defined (__need_size_t) || defined (_STDDEF_H_)
#undef _SIZE_T_
#undef _BSD_SIZE_T_
#endif
#if defined (__need_wchar_t) || defined (_STDDEF_H_)
#undef _WCHAR_T_
#undef _BSD_WCHAR_T_
#endif
#endif /* defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) */
/* Sequent's header files use _PTRDIFF_T_ in some conflicting way.
Just ignore it. */
#if defined (__sequent__) && defined (_PTRDIFF_T_)
#undef _PTRDIFF_T_
#endif
/* On VxWorks, <type/vxTypesBase.h> may have defined macros like
_TYPE_size_t which will typedef size_t. fixincludes patched the
vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
not defined, and so that defining this macro defines _GCC_SIZE_T.
If we find that the macros are still defined at this point, we must
invoke them so that the type is defined as expected. */
#if defined (_TYPE_ptrdiff_t) && (defined (__need_ptrdiff_t) || defined (_STDDEF_H_))
_TYPE_ptrdiff_t;
#undef _TYPE_ptrdiff_t
#endif
#if defined (_TYPE_size_t) && (defined (__need_size_t) || defined (_STDDEF_H_))
_TYPE_size_t;
#undef _TYPE_size_t
#endif
#if defined (_TYPE_wchar_t) && (defined (__need_wchar_t) || defined (_STDDEF_H_))
_TYPE_wchar_t;
#undef _TYPE_wchar_t
#endif
/* In case nobody has defined these types, but we aren't running under
GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
__WCHAR_TYPE__ have reasonable values. This can happen if the
parts of GCC is compiled by an older compiler, that actually
include gstddef.h, such as collect2. */
/* Signed type of difference of two pointers. */
/* Define this type if we are doing the whole job,
or if we want this type in particular. */
#if defined (_STDDEF_H) || defined (__need_ptrdiff_t)
#ifndef _PTRDIFF_T /* in case <sys/types.h> has defined it. */
#ifndef _T_PTRDIFF_
#ifndef _T_PTRDIFF
#ifndef __PTRDIFF_T
#ifndef _PTRDIFF_T_
#ifndef _BSD_PTRDIFF_T_
#ifndef ___int_ptrdiff_t_h
#ifndef _GCC_PTRDIFF_T
#define _PTRDIFF_T
#define _T_PTRDIFF_
#define _T_PTRDIFF
#define __PTRDIFF_T
#define _PTRDIFF_T_
#define _BSD_PTRDIFF_T_
#define ___int_ptrdiff_t_h
#define _GCC_PTRDIFF_T
#ifndef __PTRDIFF_TYPE__
#define __PTRDIFF_TYPE__ long int
#endif
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#endif /* _GCC_PTRDIFF_T */
#endif /* ___int_ptrdiff_t_h */
#endif /* _BSD_PTRDIFF_T_ */
#endif /* _PTRDIFF_T_ */
#endif /* __PTRDIFF_T */
#endif /* _T_PTRDIFF */
#endif /* _T_PTRDIFF_ */
#endif /* _PTRDIFF_T */
/* If this symbol has done its job, get rid of it. */
#undef __need_ptrdiff_t
#endif /* _STDDEF_H or __need_ptrdiff_t. */
/* Unsigned type of `sizeof' something. */
/* Define this type if we are doing the whole job,
or if we want this type in particular. */
#if defined (_STDDEF_H) || defined (__need_size_t)
#ifndef __size_t__ /* BeOS */
#ifndef __SIZE_T__ /* Cray Unicos/Mk */
#ifndef _SIZE_T /* in case <sys/types.h> has defined it. */
#ifndef _SYS_SIZE_T_H
#ifndef _T_SIZE_
#ifndef _T_SIZE
#ifndef __SIZE_T
#ifndef _SIZE_T_
#ifndef _BSD_SIZE_T_
#ifndef _SIZE_T_DEFINED_
#ifndef _SIZE_T_DEFINED
#ifndef _BSD_SIZE_T_DEFINED_ /* Darwin */
#ifndef _SIZE_T_DECLARED /* FreeBSD 5 */
#ifndef ___int_size_t_h
#ifndef _GCC_SIZE_T
#ifndef _SIZET_
#ifndef __size_t
#define __size_t__ /* BeOS */
#define __SIZE_T__ /* Cray Unicos/Mk */
#define _SIZE_T
#define _SYS_SIZE_T_H
#define _T_SIZE_
#define _T_SIZE
#define __SIZE_T
#define _SIZE_T_
#define _BSD_SIZE_T_
#define _SIZE_T_DEFINED_
#define _SIZE_T_DEFINED
#define _BSD_SIZE_T_DEFINED_ /* Darwin */
#define _SIZE_T_DECLARED /* FreeBSD 5 */
#define ___int_size_t_h
#define _GCC_SIZE_T
#define _SIZET_
#if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
/* __size_t is a typedef on FreeBSD 5!, must not trash it. */
#else
#define __size_t
#endif
#ifndef __SIZE_TYPE__
#define __SIZE_TYPE__ long unsigned int
#endif
#if !(defined (__GNUG__) && defined (size_t))
typedef __SIZE_TYPE__ size_t;
#ifdef __BEOS__
typedef long ssize_t;
#endif /* __BEOS__ */
#endif /* !(defined (__GNUG__) && defined (size_t)) */
#endif /* __size_t */
#endif /* _SIZET_ */
#endif /* _GCC_SIZE_T */
#endif /* ___int_size_t_h */
#endif /* _SIZE_T_DECLARED */
#endif /* _BSD_SIZE_T_DEFINED_ */
#endif /* _SIZE_T_DEFINED */
#endif /* _SIZE_T_DEFINED_ */
#endif /* _BSD_SIZE_T_ */
#endif /* _SIZE_T_ */
#endif /* __SIZE_T */
#endif /* _T_SIZE */
#endif /* _T_SIZE_ */
#endif /* _SYS_SIZE_T_H */
#endif /* _SIZE_T */
#endif /* __SIZE_T__ */
#endif /* __size_t__ */
#undef __need_size_t
#endif /* _STDDEF_H or __need_size_t. */
/* Wide character type.
Locale-writers should change this as necessary to
be big enough to hold unique values not between 0 and 127,
and not (wchar_t) -1, for each defined multibyte character. */
/* Define this type if we are doing the whole job,
or if we want this type in particular. */
#if defined (_STDDEF_H) || defined (__need_wchar_t)
#ifndef __wchar_t__ /* BeOS */
#ifndef __WCHAR_T__ /* Cray Unicos/Mk */
#ifndef _WCHAR_T
#ifndef _T_WCHAR_
#ifndef _T_WCHAR
#ifndef __WCHAR_T
#ifndef _WCHAR_T_
#ifndef _BSD_WCHAR_T_
#ifndef _BSD_WCHAR_T_DEFINED_ /* Darwin */
#ifndef _BSD_RUNE_T_DEFINED_ /* Darwin */
#ifndef _WCHAR_T_DECLARED /* FreeBSD 5 */
#ifndef _WCHAR_T_DEFINED_
#ifndef _WCHAR_T_DEFINED
#ifndef _WCHAR_T_H
#ifndef ___int_wchar_t_h
#ifndef __INT_WCHAR_T_H
#ifndef _GCC_WCHAR_T
#define __wchar_t__ /* BeOS */
#define __WCHAR_T__ /* Cray Unicos/Mk */
#define _WCHAR_T
#define _T_WCHAR_
#define _T_WCHAR
#define __WCHAR_T
#define _WCHAR_T_
#define _BSD_WCHAR_T_
#define _WCHAR_T_DEFINED_
#define _WCHAR_T_DEFINED
#define _WCHAR_T_H
#define ___int_wchar_t_h
#define __INT_WCHAR_T_H
#define _GCC_WCHAR_T
#define _WCHAR_T_DECLARED
/* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_
instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other
symbols in the _FOO_T_ family, stays defined even after its
corresponding type is defined). If we define wchar_t, then we
must undef _WCHAR_T_; for BSD/386 1.1 (and perhaps others), if
we undef _WCHAR_T_, then we must also define rune_t, since
headers like runetype.h assume that if machine/ansi.h is included,
and _BSD_WCHAR_T_ is not defined, then rune_t is available.
machine/ansi.h says, "Note that _WCHAR_T_ and _RUNE_T_ must be of
the same type." */
#ifdef _BSD_WCHAR_T_
#undef _BSD_WCHAR_T_
#ifdef _BSD_RUNE_T_
#if !defined (_ANSI_SOURCE) && !defined (_POSIX_SOURCE)
typedef _BSD_RUNE_T_ rune_t;
#define _BSD_WCHAR_T_DEFINED_
#define _BSD_RUNE_T_DEFINED_ /* Darwin */
#if defined (__FreeBSD__) && (__FreeBSD__ < 5)
/* Why is this file so hard to maintain properly? In contrast to
the comment above regarding BSD/386 1.1, on FreeBSD for as long
as the symbol has existed, _BSD_RUNE_T_ must not stay defined or
redundant typedefs will occur when stdlib.h is included after this file. */
#undef _BSD_RUNE_T_
#endif
#endif
#endif
#endif
/* FreeBSD 5 can't be handled well using "traditional" logic above
since it no longer defines _BSD_RUNE_T_ yet still desires to export
rune_t in some cases... */
#if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
#if !defined (_ANSI_SOURCE) && !defined (_POSIX_SOURCE)
#if __BSD_VISIBLE
#ifndef _RUNE_T_DECLARED
typedef __rune_t rune_t;
#define _RUNE_T_DECLARED
#endif
#endif
#endif
#endif
#ifndef __WCHAR_TYPE__
#define __WCHAR_TYPE__ int
#endif
#ifndef __cplusplus
typedef __WCHAR_TYPE__ wchar_t;
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif /* _WCHAR_T_DECLARED */
#endif /* _BSD_RUNE_T_DEFINED_ */
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif /* __WCHAR_T__ */
#endif /* __wchar_t__ */
#undef __need_wchar_t
#endif /* _STDDEF_H or __need_wchar_t. */
#if defined (__need_wint_t)
#ifndef _WINT_T
#define _WINT_T
#ifndef __WINT_TYPE__
#define __WINT_TYPE__ unsigned int
#endif
typedef __WINT_TYPE__ wint_t;
#endif
#undef __need_wint_t
#endif
/* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
are already defined. */
/* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */
#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_)
/* The references to _GCC_PTRDIFF_T_, _GCC_SIZE_T_, and _GCC_WCHAR_T_
are probably typos and should be removed before 2.8 is released. */
#ifdef _GCC_PTRDIFF_T_
#undef _PTRDIFF_T_
#undef _BSD_PTRDIFF_T_
#endif
#ifdef _GCC_SIZE_T_
#undef _SIZE_T_
#undef _BSD_SIZE_T_
#endif
#ifdef _GCC_WCHAR_T_
#undef _WCHAR_T_
#undef _BSD_WCHAR_T_
#endif
/* The following ones are the real ones. */
#ifdef _GCC_PTRDIFF_T
#undef _PTRDIFF_T_
#undef _BSD_PTRDIFF_T_
#endif
#ifdef _GCC_SIZE_T
#undef _SIZE_T_
#undef _BSD_SIZE_T_
#endif
#ifdef _GCC_WCHAR_T
#undef _WCHAR_T_
#undef _BSD_WCHAR_T_
#endif
#endif /* _ANSI_H_ || _MACHINE_ANSI_H_ */
#endif /* __sys_stdtypes_h */
/* A null pointer constant. */
#if defined (_STDDEF_H) || defined (__need_NULL)
#undef NULL /* in case <stdio.h> has defined it. */
#ifdef __GNUG__
#define NULL __null
#else /* G++ */
#ifndef __cplusplus
#define NULL ((void *)0)
#else /* C++ */
#define NULL 0
#endif /* C++ */
#endif /* G++ */
#endif /* NULL not defined and <stddef.h> or need NULL. */
#undef __need_NULL
#ifdef _STDDEF_H
/* Offset of member MEMBER in a struct of type TYPE. */
#define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER)
#endif /* _STDDEF_H was defined this time */
#endif /* !_STDDEF_H && !_STDDEF_H_ && !_ANSI_STDDEF_H && !__STDDEF_H__
|| __need_XXX was not defined before */

View file

@ -0,0 +1 @@
../../../../../include/gcc/darwin/4.2/stdint.h

View file

@ -0,0 +1,8 @@
/* syslimits.h stands for the system's own limits.h file.
If we can use it ok unmodified, then we install this text.
If fixincludes fixes it, then the fixed version is installed
instead of this text. */
#define _GCC_NEXT_LIMITS_H /* tell gcc's limits.h to recurse */
/* APPLE LOCAL begin 4401222 */
/* APPLE LOCAL end 4401222 */

View file

@ -0,0 +1,182 @@
/* APPLE LOCAL file mainline 2007-06-12 2872232 */
/* Copyright (C) 2004
Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/*
* ISO C Standard: 7.22 Type-generic math <tgmath.h>
*/
#ifndef _TGMATH_H
#define _TGMATH_H
#include <math.h>
#ifndef __cplusplus
#include <complex.h>
/* Naming convention: generic macros are defining using
__TGMATH_CPLX*, __TGMATH_REAL*, and __TGMATH_CPLX_ONLY. _CPLX
means the generic argument(s) may be real or complex, _REAL means
real only, _CPLX means complex only. If there is no suffix, we are
defining a function of one generic argument. If the suffix is _n
it is a function of n generic arguments. If the suffix is _m_n it
is a function of n arguments, the first m of which are generic. We
only define these macros for values of n and/or m that are needed. */
/* The general rules for generic macros are given in 7.22 paragraphs 1 and 2.
If any generic parameter is complex, we use a complex version. Otherwise
we use a real version. If the real part of any generic parameter is long
double, we use the long double version. Otherwise if the real part of any
generic paramter is double or of integer type, we use the double version.
Otherwise we use the float version. */
#define __tg_cplx(expr) \
__builtin_classify_type(expr) == 9
#define __tg_ldbl(expr) \
__builtin_types_compatible_p(__typeof__(expr), long double)
#define __tg_dbl(expr) \
(__builtin_types_compatible_p(__typeof__(expr), double) \
|| __builtin_classify_type(expr) == 1)
#define __tg_choose(x,f,d,l) \
__builtin_choose_expr(__tg_ldbl(x), l, \
__builtin_choose_expr(__tg_dbl(x), d, \
f))
#define __tg_choose_2(x,y,f,d,l) \
__builtin_choose_expr(__tg_ldbl(x) || __tg_ldbl(y), l, \
__builtin_choose_expr(__tg_dbl(x) || __tg_dbl(y), d, \
f))
#define __tg_choose_3(x,y,z,f,d,l) \
__builtin_choose_expr(__tg_ldbl(x) || __tg_ldbl(y) || __tg_ldbl(z), l, \
__builtin_choose_expr(__tg_dbl(x) || __tg_dbl(y) \
|| __tg_dbl(z), d, \
f))
#define __TGMATH_CPLX(z,R,C) \
__builtin_choose_expr (__tg_cplx(z), \
__tg_choose (__real__(z), C##f(z), (C)(z), C##l(z)), \
/* APPLE LOCAL shorten-64-to-32 4604239 */ \
__tg_choose (z, R##f((float)(z)), (R)(z), R##l(z)))
#define __TGMATH_CPLX_2(z1,z2,R,C) \
__builtin_choose_expr (__tg_cplx(z1) || __tg_cplx(z2), \
__tg_choose_2 (__real__(z1), __real__(z2), \
C##f(z1,z2), (C)(z1,z2), C##l(z1,z2)), \
__tg_choose_2 (z1, z2, \
/* APPLE LOCAL shorten-64-to-32 5909621 */ \
R##f((float)(z1),(float)(z2)), (R)(z1,z2), R##l(z1,z2)))
#define __TGMATH_REAL(x,R) \
/* APPLE LOCAL shorten-64-to-32 5909621 */ \
__tg_choose (x, R##f((float)(x)), (R)(x), R##l(x))
#define __TGMATH_REAL_2(x,y,R) \
/* APPLE LOCAL shorten-64-to-32 4604239 */ \
__tg_choose_2 (x, y, R##f((float)(x),(float)(y)), (R)(x,y), R##l(x,y))
#define __TGMATH_REAL_3(x,y,z,R) \
/* APPLE LOCAL shorten-64-to-32 5909621 */ \
__tg_choose_3 (x, y, z, R##f((float)(x),(float)(y),(float)(z)), (R)(x,y,z), R##l(x,y,z))
#define __TGMATH_REAL_1_2(x,y,R) \
/* APPLE LOCAL shorten-64-to-32 5909621 */ \
__tg_choose (x, R##f((float)(x),y), (R)(x,y), R##l(x,y))
#define __TGMATH_REAL_2_3(x,y,z,R) \
/* APPLE LOCAL shorten-64-to-32 5909621 */ \
__tg_choose_2 (x, y, R##f((float)(x),(float)(y),z), (R)(x,y,z), R##l(x,y,z))
#define __TGMATH_CPLX_ONLY(z,C) \
__tg_choose (__real__(z), C##f(z), (C)(z), C##l(z))
/* Functions defined in both <math.h> and <complex.h> (7.22p4) */
#define acos(z) __TGMATH_CPLX(z, acos, cacos)
#define asin(z) __TGMATH_CPLX(z, asin, casin)
#define atan(z) __TGMATH_CPLX(z, atan, catan)
#define acosh(z) __TGMATH_CPLX(z, acosh, cacosh)
#define asinh(z) __TGMATH_CPLX(z, asinh, casinh)
#define atanh(z) __TGMATH_CPLX(z, atanh, catanh)
#define cos(z) __TGMATH_CPLX(z, cos, ccos)
#define sin(z) __TGMATH_CPLX(z, sin, csin)
#define tan(z) __TGMATH_CPLX(z, tan, ctan)
#define cosh(z) __TGMATH_CPLX(z, cosh, ccosh)
#define sinh(z) __TGMATH_CPLX(z, sinh, csinh)
#define tanh(z) __TGMATH_CPLX(z, tanh, ctanh)
#define exp(z) __TGMATH_CPLX(z, exp, cexp)
#define log(z) __TGMATH_CPLX(z, log, clog)
#define pow(z1,z2) __TGMATH_CPLX_2(z1, z2, pow, cpow)
#define sqrt(z) __TGMATH_CPLX(z, sqrt, csqrt)
#define fabs(z) __TGMATH_CPLX(z, fabs, cabs)
/* Functions defined in <math.h> only (7.22p5) */
#define atan2(x,y) __TGMATH_REAL_2(x, y, atan2)
#define cbrt(x) __TGMATH_REAL(x, cbrt)
#define ceil(x) __TGMATH_REAL(x, ceil)
#define copysign(x,y) __TGMATH_REAL_2(x, y, copysign)
#define erf(x) __TGMATH_REAL(x, erf)
#define erfc(x) __TGMATH_REAL(x, erfc)
#define exp2(x) __TGMATH_REAL(x, exp2)
#define expm1(x) __TGMATH_REAL(x, expm1)
#define fdim(x,y) __TGMATH_REAL_2(x, y, fdim)
#define floor(x) __TGMATH_REAL(x, floor)
#define fma(x,y,z) __TGMATH_REAL_3(x, y, z, fma)
#define fmax(x,y) __TGMATH_REAL_2(x, y, fmax)
#define fmin(x,y) __TGMATH_REAL_2(x, y, fmin)
#define fmod(x,y) __TGMATH_REAL_2(x, y, fmod)
#define frexp(x,y) __TGMATH_REAL_1_2(x, y, frexp)
#define hypot(x,y) __TGMATH_REAL_2(x, y, hypot)
#define ilogb(x) __TGMATH_REAL(x, ilogb)
#define ldexp(x,y) __TGMATH_REAL_1_2(x, y, ldexp)
#define lgamma(x) __TGMATH_REAL(x, lgamma)
#define llrint(x) __TGMATH_REAL(x, llrint)
#define llround(x) __TGMATH_REAL(x, llround)
#define log10(x) __TGMATH_REAL(x, log10)
#define log1p(x) __TGMATH_REAL(x, log1p)
#define log2(x) __TGMATH_REAL(x, log2)
#define logb(x) __TGMATH_REAL(x, logb)
#define lrint(x) __TGMATH_REAL(x, lrint)
#define lround(x) __TGMATH_REAL(x, lround)
#define nearbyint(x) __TGMATH_REAL(x, nearbyint)
#define nextafter(x,y) __TGMATH_REAL_2(x, y, nextafter)
#define nexttoward(x,y) __TGMATH_REAL_1_2(x, y, nexttoward)
#define remainder(x,y) __TGMATH_REAL_2(x, y, remainder)
#define remquo(x,y,z) __TGMATH_REAL_2_3(x, y, z, remquo)
#define rint(x) __TGMATH_REAL(x, rint)
#define round(x) __TGMATH_REAL(x, round)
#define scalbn(x,y) __TGMATH_REAL_1_2(x, y, scalbn)
#define scalbln(x,y) __TGMATH_REAL_1_2(x, y, scalbln)
#define tgamma(x) __TGMATH_REAL(x, tgamma)
#define trunc(x) __TGMATH_REAL(x, trunc)
/* Functions defined in <complex.h> only (7.22p6) */
#define carg(z) __TGMATH_CPLX_ONLY(z, carg)
#define cimag(z) __TGMATH_CPLX_ONLY(z, cimag)
#define conj(z) __TGMATH_CPLX_ONLY(z, conj)
#define cproj(z) __TGMATH_CPLX_ONLY(z, cproj)
#define creal(z) __TGMATH_CPLX_ONLY(z, creal)
#endif /* __cplusplus */
#endif /* _TGMATH_H */

View file

@ -0,0 +1,304 @@
/* APPLE LOCAL file ssse3 4424835 */
/* Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/* Implemented from the specification included in the Intel C++ Compiler
User Guide and Reference, version 9.1. */
#ifndef _TMMINTRIN_H_INCLUDED
#define _TMMINTRIN_H_INCLUDED
#ifdef __SSSE3__
#include <pmmintrin.h>
/* APPLE LOCAL begin nodebug inline */
#define __always_inline__ __always_inline__, __nodebug__
/* APPLE LOCAL end nodebug inline */
/* APPLE LOCAL begin radar 5618945 */
#undef __STATIC_INLINE
#ifdef __GNUC_STDC_INLINE__
#define __STATIC_INLINE __inline
#else
#define __STATIC_INLINE static __inline
#endif
/* APPLE LOCAL end radar 5618945 */
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hadd_epi16 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_phaddw128 ((__v8hi)__X, (__v8hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hadd_epi32 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_phaddd128 ((__v4si)__X, (__v4si)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hadds_epi16 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_phaddsw128 ((__v8hi)__X, (__v8hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hadd_pi16 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_phaddw ((__v4hi)__X, (__v4hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hadd_pi32 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_phaddd ((__v2si)__X, (__v2si)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hadds_pi16 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_phaddsw ((__v4hi)__X, (__v4hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hsub_epi16 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_phsubw128 ((__v8hi)__X, (__v8hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hsub_epi32 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_phsubd128 ((__v4si)__X, (__v4si)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hsubs_epi16 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_phsubsw128 ((__v8hi)__X, (__v8hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hsub_pi16 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_phsubw ((__v4hi)__X, (__v4hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hsub_pi32 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_phsubd ((__v2si)__X, (__v2si)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hsubs_pi16 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_phsubsw ((__v4hi)__X, (__v4hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_maddubs_epi16 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pmaddubsw128 ((__v16qi)__X, (__v16qi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_maddubs_pi16 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_pmaddubsw ((__v8qi)__X, (__v8qi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_mulhrs_epi16 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pmulhrsw128 ((__v8hi)__X, (__v8hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_mulhrs_pi16 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_pmulhrsw ((__v4hi)__X, (__v4hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_shuffle_epi8 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pshufb128 ((__v16qi)__X, (__v16qi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_shuffle_pi8 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_pshufb ((__v8qi)__X, (__v8qi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_sign_epi8 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_psignb128 ((__v16qi)__X, (__v16qi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_sign_epi16 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_psignw128 ((__v8hi)__X, (__v8hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_sign_epi32 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_psignd128 ((__v4si)__X, (__v4si)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_sign_pi8 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_psignb ((__v8qi)__X, (__v8qi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_sign_pi16 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_psignw ((__v4hi)__X, (__v4hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_sign_pi32 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_psignd ((__v2si)__X, (__v2si)__Y);
}
/* APPLE LOCAL begin 5814283 */
#define _mm_alignr_epi8(__X, __Y, __N) \
((__m128i)__builtin_ia32_palignr128 ((__v2di)(__X), (__v2di)(__Y), (__N) * 8))
/* APPLE LOCAL end 5814283 */
#define _mm_alignr_pi8(__X, __Y, __N) \
((__m64)__builtin_ia32_palignr ((long long) (__X), (long long) (__Y), (__N) * 8))
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_abs_epi8 (__m128i __X)
{
return (__m128i) __builtin_ia32_pabsb128 ((__v16qi)__X);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_abs_epi16 (__m128i __X)
{
return (__m128i) __builtin_ia32_pabsw128 ((__v8hi)__X);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_abs_epi32 (__m128i __X)
{
return (__m128i) __builtin_ia32_pabsd128 ((__v4si)__X);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_abs_pi8 (__m64 __X)
{
return (__m64) __builtin_ia32_pabsb ((__v8qi)__X);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_abs_pi16 (__m64 __X)
{
return (__m64) __builtin_ia32_pabsw ((__v4hi)__X);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_abs_pi32 (__m64 __X)
{
return (__m64) __builtin_ia32_pabsd ((__v2si)__X);
}
/* APPLE LOCAL begin nodebug inline */
#undef __always_inline__
/* APPLE LOCAL end nodebug inline */
#endif /* __SSSE3__ */
#endif /* _TMMINTRIN_H_INCLUDED */

View file

@ -0,0 +1,241 @@
/* Exception handling and frame unwind runtime interface routines.
Copyright (C) 2001, 2003, 2004, 2006 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/* This is derived from the C++ ABI for IA-64. Where we diverge
for cross-architecture compatibility are noted with "@@@". */
#ifndef _UNWIND_H
#define _UNWIND_H
#ifndef HIDE_EXPORTS
#pragma GCC visibility push(default)
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Level 1: Base ABI */
/* @@@ The IA-64 ABI uses uint64 throughout. Most places this is
inefficient for 32-bit and smaller machines. */
typedef unsigned _Unwind_Word __attribute__((__mode__(__word__)));
typedef signed _Unwind_Sword __attribute__((__mode__(__word__)));
#if defined(__ia64__) && defined(__hpux__)
typedef unsigned _Unwind_Ptr __attribute__((__mode__(__word__)));
#else
typedef unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__)));
#endif
typedef unsigned _Unwind_Internal_Ptr __attribute__((__mode__(__pointer__)));
/* @@@ The IA-64 ABI uses a 64-bit word to identify the producer and
consumer of an exception. We'll go along with this for now even on
32-bit machines. We'll need to provide some other option for
16-bit machines and for machines with > 8 bits per byte. */
typedef unsigned _Unwind_Exception_Class __attribute__((__mode__(__DI__)));
/* The unwind interface uses reason codes in several contexts to
identify the reasons for failures or other actions. */
typedef enum
{
_URC_NO_REASON = 0,
_URC_FOREIGN_EXCEPTION_CAUGHT = 1,
_URC_FATAL_PHASE2_ERROR = 2,
_URC_FATAL_PHASE1_ERROR = 3,
_URC_NORMAL_STOP = 4,
_URC_END_OF_STACK = 5,
_URC_HANDLER_FOUND = 6,
_URC_INSTALL_CONTEXT = 7,
_URC_CONTINUE_UNWIND = 8
} _Unwind_Reason_Code;
/* The unwind interface uses a pointer to an exception header object
as its representation of an exception being thrown. In general, the
full representation of an exception object is language- and
implementation-specific, but it will be prefixed by a header
understood by the unwind interface. */
struct _Unwind_Exception;
typedef void (*_Unwind_Exception_Cleanup_Fn) (_Unwind_Reason_Code,
struct _Unwind_Exception *);
struct _Unwind_Exception
{
_Unwind_Exception_Class exception_class;
_Unwind_Exception_Cleanup_Fn exception_cleanup;
_Unwind_Word private_1;
_Unwind_Word private_2;
/* @@@ The IA-64 ABI says that this structure must be double-word aligned.
Taking that literally does not make much sense generically. Instead we
provide the maximum alignment required by any type for the machine. */
} __attribute__((__aligned__));
/* The ACTIONS argument to the personality routine is a bitwise OR of one
or more of the following constants. */
typedef int _Unwind_Action;
#define _UA_SEARCH_PHASE 1
#define _UA_CLEANUP_PHASE 2
#define _UA_HANDLER_FRAME 4
#define _UA_FORCE_UNWIND 8
#define _UA_END_OF_STACK 16
/* This is an opaque type used to refer to a system-specific data
structure used by the system unwinder. This context is created and
destroyed by the system, and passed to the personality routine
during unwinding. */
struct _Unwind_Context;
/* Raise an exception, passing along the given exception object. */
extern _Unwind_Reason_Code _Unwind_RaiseException (struct _Unwind_Exception *);
/* Raise an exception for forced unwinding. */
typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn)
(int, _Unwind_Action, _Unwind_Exception_Class,
struct _Unwind_Exception *, struct _Unwind_Context *, void *);
extern _Unwind_Reason_Code _Unwind_ForcedUnwind (struct _Unwind_Exception *,
_Unwind_Stop_Fn,
void *);
/* Helper to invoke the exception_cleanup routine. */
extern void _Unwind_DeleteException (struct _Unwind_Exception *);
/* Resume propagation of an existing exception. This is used after
e.g. executing cleanup code, and not to implement rethrowing. */
extern void _Unwind_Resume (struct _Unwind_Exception *);
/* @@@ Resume propagation of an FORCE_UNWIND exception, or to rethrow
a normal exception that was handled. */
extern _Unwind_Reason_Code _Unwind_Resume_or_Rethrow (struct _Unwind_Exception *);
/* @@@ Use unwind data to perform a stack backtrace. The trace callback
is called for every stack frame in the call chain, but no cleanup
actions are performed. */
typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn)
(struct _Unwind_Context *, void *);
extern _Unwind_Reason_Code _Unwind_Backtrace (_Unwind_Trace_Fn, void *);
/* These functions are used for communicating information about the unwind
context (i.e. the unwind descriptors and the user register state) between
the unwind library and the personality routine and landing pad. Only
selected registers maybe manipulated. */
extern _Unwind_Word _Unwind_GetGR (struct _Unwind_Context *, int);
extern void _Unwind_SetGR (struct _Unwind_Context *, int, _Unwind_Word);
extern _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *);
extern _Unwind_Ptr _Unwind_GetIPInfo (struct _Unwind_Context *, int *);
extern void _Unwind_SetIP (struct _Unwind_Context *, _Unwind_Ptr);
/* @@@ Retrieve the CFA of the given context. */
extern _Unwind_Word _Unwind_GetCFA (struct _Unwind_Context *);
extern void *_Unwind_GetLanguageSpecificData (struct _Unwind_Context *);
extern _Unwind_Ptr _Unwind_GetRegionStart (struct _Unwind_Context *);
/* The personality routine is the function in the C++ (or other language)
runtime library which serves as an interface between the system unwind
library and language-specific exception handling semantics. It is
specific to the code fragment described by an unwind info block, and
it is always referenced via the pointer in the unwind info block, and
hence it has no ABI-specified name.
Note that this implies that two different C++ implementations can
use different names, and have different contents in the language
specific data area. Moreover, that the language specific data
area contains no version info because name of the function invoked
provides more effective versioning by detecting at link time the
lack of code to handle the different data format. */
typedef _Unwind_Reason_Code (*_Unwind_Personality_Fn)
(int, _Unwind_Action, _Unwind_Exception_Class,
struct _Unwind_Exception *, struct _Unwind_Context *);
/* @@@ The following alternate entry points are for setjmp/longjmp
based unwinding. */
struct SjLj_Function_Context;
extern void _Unwind_SjLj_Register (struct SjLj_Function_Context *);
extern void _Unwind_SjLj_Unregister (struct SjLj_Function_Context *);
extern _Unwind_Reason_Code _Unwind_SjLj_RaiseException
(struct _Unwind_Exception *);
extern _Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind
(struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
extern void _Unwind_SjLj_Resume (struct _Unwind_Exception *);
extern _Unwind_Reason_Code _Unwind_SjLj_Resume_or_Rethrow (struct _Unwind_Exception *);
/* @@@ The following provide access to the base addresses for text
and data-relative addressing in the LDSA. In order to stay link
compatible with the standard ABI for IA-64, we inline these. */
#ifdef __ia64__
#include <stdlib.h>
static inline _Unwind_Ptr
_Unwind_GetDataRelBase (struct _Unwind_Context *_C)
{
/* The GP is stored in R1. */
return _Unwind_GetGR (_C, 1);
}
static inline _Unwind_Ptr
_Unwind_GetTextRelBase (struct _Unwind_Context *_C __attribute__ ((__unused__)))
{
abort ();
return 0;
}
/* @@@ Retrieve the Backing Store Pointer of the given context. */
extern _Unwind_Word _Unwind_GetBSP (struct _Unwind_Context *);
#else
extern _Unwind_Ptr _Unwind_GetDataRelBase (struct _Unwind_Context *);
extern _Unwind_Ptr _Unwind_GetTextRelBase (struct _Unwind_Context *);
#endif
/* @@@ Given an address, return the entry point of the function that
contains it. */
extern void * _Unwind_FindEnclosingFunction (void *pc);
#ifdef __cplusplus
}
#endif
#ifndef HIDE_EXPORTS
#pragma GCC visibility pop
#endif
#endif /* unwind.h */

View file

@ -0,0 +1,7 @@
#ifndef _VARARGS_H
#define _VARARGS_H
#error "GCC no longer implements <varargs.h>."
#error "Revise your code to use <stdarg.h>."
#endif

View file

@ -0,0 +1,3 @@
# This spec file is read by gcc when linking. It is used to specify the
# standard libraries we need in order to link with -fopenmp.
*link_gomp: -lgomp %{static: }

View file

@ -0,0 +1,3 @@
# This spec file is read by gcc when linking. It is used to specify the
# standard libraries we need in order to link with -fopenmp.
*link_gomp: -lgomp %{static: }

View file

@ -0,0 +1,14 @@
This README file is copied into the directory for GCC-only header files
when fixincludes is run by the makefile for GCC.
Many of the files in this directory were automatically edited from the
standard system header files by the fixincludes process. They are
system-specific, and will not work on any other kind of system. They
are also not part of GCC. The reason we have to do this is because
GCC requires ANSI C headers and many vendors supply ANSI-incompatible
headers.
Because this is an automated process, sometimes headers get "fixed"
that do not, strictly speaking, need a fix. As long as nothing is broken
by the process, it is just an unfortunate collateral inconvenience.
We would like to rectify it, if it is not "too inconvenient".

View file

@ -0,0 +1,106 @@
/* APPLE LOCAL file 5612787 mainline sse4 */
/* Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/* Implemented from the specification included in the AMD Programmers
Manual Update, version 2.x */
#ifndef _AMMINTRIN_H_INCLUDED
#define _AMMINTRIN_H_INCLUDED
#ifndef __SSE4A__
# error "SSE4A instruction set not enabled"
#else
/* We need definitions from the SSE3, SSE2 and SSE header files*/
#include <pmmintrin.h>
/* APPLE LOCAL begin nodebug inline 4152603 */
#define __always_inline__ __always_inline__, __nodebug__
/* APPLE LOCAL end nodebug inline 4152603 */
/* APPLE LOCAL begin radar 5618945 */
#undef __STATIC_INLINE
#ifdef __GNUC_STDC_INLINE__
#define __STATIC_INLINE __inline
#else
#define __STATIC_INLINE static __inline
#endif
/* APPLE LOCAL end radar 5618945 */
__STATIC_INLINE void __attribute__((__always_inline__))
_mm_stream_sd (double * __P, __m128d __Y)
{
__builtin_ia32_movntsd (__P, (__v2df) __Y);
}
__STATIC_INLINE void __attribute__((__always_inline__))
_mm_stream_ss (float * __P, __m128 __Y)
{
__builtin_ia32_movntss (__P, (__v4sf) __Y);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_extract_si64 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_extrq ((__v2di) __X, (__v16qi) __Y);
}
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_extracti_si64 (__m128i __X, unsigned const int __I, unsigned const int __L)
{
return (__m128i) __builtin_ia32_extrqi ((__v2di) __X, __I, __L);
}
#else
#define _mm_extracti_si64(X, I, L) \
((__m128i) __builtin_ia32_extrqi ((__v2di)(X), I, L))
#endif
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_insert_si64 (__m128i __X,__m128i __Y)
{
return (__m128i) __builtin_ia32_insertq ((__v2di)__X, (__v2di)__Y);
}
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_inserti_si64(__m128i __X, __m128i __Y, unsigned const int __I, unsigned const int __L)
{
return (__m128i) __builtin_ia32_insertqi ((__v2di)__X, (__v2di)__Y, __I, __L);
}
#else
#define _mm_inserti_si64(X, Y, I, L) \
((__m128i) __builtin_ia32_insertqi ((__v2di)(X), (__v2di)(Y), I, L))
#endif
#endif /* __SSE4A__ */
/* APPLE LOCAL begin nodebug inline 4152603 */
#undef __always_inline__
/* APPLE LOCAL end nodebug inline 4152603 */
#endif /* _AMMINTRIN_H_INCLUDED */

View file

@ -0,0 +1,108 @@
/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/*
* Draft C Extension to support decimal floating-pointing arithmetic:
* Characteristics of decimal floating types <decfloat.h>
*/
#ifndef _DECFLOAT_H___
#define _DECFLOAT_H___
/* Number of base-FLT_RADIX digits in the significand, p. */
#undef DEC32_MANT_DIG
#undef DEC64_MANT_DIG
#undef DEC128_MANT_DIG
#define DEC32_MANT_DIG __DEC32_MANT_DIG__
#define DEC64_MANT_DIG __DEC64_MANT_DIG__
#define DEC128_MANT_DIG __DEC128_MANT_DIG__
/* Minimum exponent. */
#undef DEC32_MIN_EXP
#undef DEC64_MIN_EXP
#undef DEC128_MIN_EXP
#define DEC32_MIN_EXP __DEC32_MIN_EXP__
#define DEC64_MIN_EXP __DEC64_MIN_EXP__
#define DEC128_MIN_EXP __DEC128_MIN_EXP__
/* Maximum exponent. */
#undef DEC32_MAX_EXP
#undef DEC64_MAX_EXP
#undef DEC128_MAX_EXP
#define DEC32_MAX_EXP __DEC32_MAX_EXP__
#define DEC64_MAX_EXP __DEC64_MAX_EXP__
#define DEC128_MAX_EXP __DEC128_MAX_EXP__
/* Maximum representable finite decimal floating-point number
(there are 6, 15, and 33 9s after the decimal points respectively). */
#undef DEC32_MAX
#undef DEC64_MAX
#undef DEC128_MAX
#define DEC32_MAX __DEC32_MAX__
#define DEC64_MAX __DEC64_MAX__
#define DEC128_MAX __DEC128_MAX__
/* The difference between 1 and the least value greater than 1 that is
representable in the given floating point type. */
#undef DEC32_EPSILON
#undef DEC64_EPSILON
#undef DEC128_EPSILON
#define DEC32_EPSILON __DEC32_EPSILON__
#define DEC64_EPSILON __DEC64_EPSILON__
#define DEC128_EPSILON __DEC128_EPSILON__
/* Minimum normalized positive floating-point number. */
#undef DEC32_MIN
#undef DEC64_MIN
#undef DEC128_MIN
#define DEC32_MIN __DEC32_MIN__
#define DEC64_MIN __DEC64_MIN__
#define DEC128_MIN __DEC128_MIN__
/* Minimum denormalized positive floating-point number. */
#undef DEC32_DEN
#undef DEC64_DEN
#undef DEC128_DEN
#define DEC32_DEN __DEC32_DEN__
#define DEC64_DEN __DEC64_DEN__
#define DEC128_DEN __DEC128_DEN__
/* The floating-point expression evaluation method.
-1 indeterminate
0 evaluate all operations and constants just to the range and
precision of the type
1 evaluate operations and constants of type _Decimal32
and _Decimal64 to the range and precision of the _Decimal64
type, evaluate _Decimal128 operations and constants to the
range and precision of the _Decimal128 type;
2 evaluate all operations and constants to the range and
precision of the _Decimal128 type.
*/
#undef DECFLT_EVAL_METHOD
#define DECFLT_EVAL_METHOD __DECFLT_EVAL_METHOD__
#endif /* _DECFLOAT_H___ */

View file

@ -0,0 +1,18 @@
/* DO NOT EDIT THIS FILE.
It has been auto-edited by fixincludes from:
"/usr/include/fenv.h"
This had to be done to correct non-standard usages in the
original, manufacturer supplied header file. */
/* This file is a backwards compability hack to allow
no-trapping-math to be the default. */
#ifndef _DARWIN_FENV_H_WRAPPER
#if defined(__GNUC__) && __GNUC__ >= 4
#pragma GCC fenv
#endif
#include_next <fenv.h>
#define _DARWIN_FENV_H_WRAPPER
#endif /* _DARWIN_FENV_H_WRAPPER */

View file

@ -0,0 +1,164 @@
/* Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/*
* ISO C Standard: 5.2.4.2.2 Characteristics of floating types <float.h>
*/
#ifndef _FLOAT_H___
#define _FLOAT_H___
/* Radix of exponent representation, b. */
#undef FLT_RADIX
#define FLT_RADIX __FLT_RADIX__
/* Number of base-FLT_RADIX digits in the significand, p. */
#undef FLT_MANT_DIG
#undef DBL_MANT_DIG
#undef LDBL_MANT_DIG
#define FLT_MANT_DIG __FLT_MANT_DIG__
#define DBL_MANT_DIG __DBL_MANT_DIG__
#define LDBL_MANT_DIG __LDBL_MANT_DIG__
/* Number of decimal digits, q, such that any floating-point number with q
decimal digits can be rounded into a floating-point number with p radix b
digits and back again without change to the q decimal digits,
p * log10(b) if b is a power of 10
floor((p - 1) * log10(b)) otherwise
*/
#undef FLT_DIG
#undef DBL_DIG
#undef LDBL_DIG
#define FLT_DIG __FLT_DIG__
#define DBL_DIG __DBL_DIG__
#define LDBL_DIG __LDBL_DIG__
/* Minimum int x such that FLT_RADIX**(x-1) is a normalized float, emin */
#undef FLT_MIN_EXP
#undef DBL_MIN_EXP
#undef LDBL_MIN_EXP
#define FLT_MIN_EXP __FLT_MIN_EXP__
#define DBL_MIN_EXP __DBL_MIN_EXP__
#define LDBL_MIN_EXP __LDBL_MIN_EXP__
/* Minimum negative integer such that 10 raised to that power is in the
range of normalized floating-point numbers,
ceil(log10(b) * (emin - 1))
*/
#undef FLT_MIN_10_EXP
#undef DBL_MIN_10_EXP
#undef LDBL_MIN_10_EXP
#define FLT_MIN_10_EXP __FLT_MIN_10_EXP__
#define DBL_MIN_10_EXP __DBL_MIN_10_EXP__
#define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__
/* Maximum int x such that FLT_RADIX**(x-1) is a representable float, emax. */
#undef FLT_MAX_EXP
#undef DBL_MAX_EXP
#undef LDBL_MAX_EXP
#define FLT_MAX_EXP __FLT_MAX_EXP__
#define DBL_MAX_EXP __DBL_MAX_EXP__
#define LDBL_MAX_EXP __LDBL_MAX_EXP__
/* Maximum integer such that 10 raised to that power is in the range of
representable finite floating-point numbers,
floor(log10((1 - b**-p) * b**emax))
*/
#undef FLT_MAX_10_EXP
#undef DBL_MAX_10_EXP
#undef LDBL_MAX_10_EXP
#define FLT_MAX_10_EXP __FLT_MAX_10_EXP__
#define DBL_MAX_10_EXP __DBL_MAX_10_EXP__
#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__
/* Maximum representable finite floating-point number,
(1 - b**-p) * b**emax
*/
#undef FLT_MAX
#undef DBL_MAX
#undef LDBL_MAX
#define FLT_MAX __FLT_MAX__
#define DBL_MAX __DBL_MAX__
#define LDBL_MAX __LDBL_MAX__
/* The difference between 1 and the least value greater than 1 that is
representable in the given floating point type, b**1-p. */
#undef FLT_EPSILON
#undef DBL_EPSILON
#undef LDBL_EPSILON
#define FLT_EPSILON __FLT_EPSILON__
#define DBL_EPSILON __DBL_EPSILON__
#define LDBL_EPSILON __LDBL_EPSILON__
/* Minimum normalized positive floating-point number, b**(emin - 1). */
#undef FLT_MIN
#undef DBL_MIN
#undef LDBL_MIN
#define FLT_MIN __FLT_MIN__
#define DBL_MIN __DBL_MIN__
#define LDBL_MIN __LDBL_MIN__
/* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown. */
/* APPLE LOCAL begin 3399553 */
/* This changes with calls to fesetround in <fenv.h>. */
#undef FLT_ROUNDS
#define FLT_ROUNDS (__builtin_flt_rounds ())
/* APPLE LOCAL end 3399553 */
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* The floating-point expression evaluation method.
-1 indeterminate
0 evaluate all operations and constants just to the range and
precision of the type
1 evaluate operations and constants of type float and double
to the range and precision of the double type, evaluate
long double operations and constants to the range and
precision of the long double type
2 evaluate all operations and constants to the range and
precision of the long double type
??? This ought to change with the setting of the fp control word;
the value provided by the compiler assumes the widest setting. */
#undef FLT_EVAL_METHOD
#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
/* Number of decimal digits, n, such that any floating-point number in the
widest supported floating type with pmax radix b digits can be rounded
to a floating-point number with n decimal digits and back again without
change to the value,
pmax * log10(b) if b is a power of 10
ceil(1 + pmax * log10(b)) otherwise
*/
#undef DECIMAL_DIG
#define DECIMAL_DIG __DECIMAL_DIG__
#endif /* C99 */
#endif /* _FLOAT_H___ */

View file

@ -0,0 +1,48 @@
/* Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/*
* ISO C Standard: 7.9 Alternative spellings <iso646.h>
*/
#ifndef _ISO646_H
#define _ISO646_H
#ifndef __cplusplus
#define and &&
#define and_eq &=
#define bitand &
#define bitor |
#define compl ~
#define not !
#define not_eq !=
#define or ||
#define or_eq |=
#define xor ^
#define xor_eq ^=
#endif
#endif

View file

@ -0,0 +1,118 @@
/* This administrivia gets added to the beginning of limits.h
if the system has its own version of limits.h. */
/* APPLE LOCAL begin 4401222 */
#ifndef _LIBC_LIMITS_H_
/* Use "..." so that we find syslimits.h only in this same directory. */
#include "syslimits.h"
#endif
#ifdef _GCC_NEXT_LIMITS_H
#include_next <limits.h>
#undef _GCC_NEXT_LIMITS_H
#endif
/* APPLE LOCAL end 4401222 */
#ifndef _LIMITS_H___
#define _LIMITS_H___
/* Number of bits in a `char'. */
#undef CHAR_BIT
#define CHAR_BIT __CHAR_BIT__
/* Maximum length of a multibyte character. */
#ifndef MB_LEN_MAX
#define MB_LEN_MAX 1
#endif
/* Minimum and maximum values a `signed char' can hold. */
#undef SCHAR_MIN
#define SCHAR_MIN (-SCHAR_MAX - 1)
#undef SCHAR_MAX
#define SCHAR_MAX __SCHAR_MAX__
/* Maximum value an `unsigned char' can hold. (Minimum is 0). */
#undef UCHAR_MAX
#if __SCHAR_MAX__ == __INT_MAX__
# define UCHAR_MAX (SCHAR_MAX * 2U + 1U)
#else
# define UCHAR_MAX (SCHAR_MAX * 2 + 1)
#endif
/* Minimum and maximum values a `char' can hold. */
#ifdef __CHAR_UNSIGNED__
# undef CHAR_MIN
# if __SCHAR_MAX__ == __INT_MAX__
# define CHAR_MIN 0U
# else
# define CHAR_MIN 0
# endif
# undef CHAR_MAX
# define CHAR_MAX UCHAR_MAX
#else
# undef CHAR_MIN
# define CHAR_MIN SCHAR_MIN
# undef CHAR_MAX
# define CHAR_MAX SCHAR_MAX
#endif
/* Minimum and maximum values a `signed short int' can hold. */
#undef SHRT_MIN
#define SHRT_MIN (-SHRT_MAX - 1)
#undef SHRT_MAX
#define SHRT_MAX __SHRT_MAX__
/* Maximum value an `unsigned short int' can hold. (Minimum is 0). */
#undef USHRT_MAX
#if __SHRT_MAX__ == __INT_MAX__
# define USHRT_MAX (SHRT_MAX * 2U + 1U)
#else
# define USHRT_MAX (SHRT_MAX * 2 + 1)
#endif
/* Minimum and maximum values a `signed int' can hold. */
#undef INT_MIN
#define INT_MIN (-INT_MAX - 1)
#undef INT_MAX
#define INT_MAX __INT_MAX__
/* Maximum value an `unsigned int' can hold. (Minimum is 0). */
#undef UINT_MAX
#define UINT_MAX (INT_MAX * 2U + 1U)
/* Minimum and maximum values a `signed long int' can hold.
(Same as `int'). */
#undef LONG_MIN
#define LONG_MIN (-LONG_MAX - 1L)
#undef LONG_MAX
#define LONG_MAX __LONG_MAX__
/* Maximum value an `unsigned long int' can hold. (Minimum is 0). */
#undef ULONG_MAX
#define ULONG_MAX (LONG_MAX * 2UL + 1UL)
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* Minimum and maximum values a `signed long long int' can hold. */
# undef LLONG_MIN
# define LLONG_MIN (-LLONG_MAX - 1LL)
# undef LLONG_MAX
# define LLONG_MAX __LONG_LONG_MAX__
/* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
# undef ULLONG_MAX
# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
#endif
#if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
/* Minimum and maximum values a `signed long long int' can hold. */
# undef LONG_LONG_MIN
# define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL)
# undef LONG_LONG_MAX
# define LONG_LONG_MAX __LONG_LONG_MAX__
/* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
# undef ULONG_LONG_MAX
# define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1ULL)
#endif
#endif /* _LIMITS_H___ */
/* APPLE LOCAL begin 4401222 */
/* APPLE LOCAL end 4401222 */

View file

@ -0,0 +1,220 @@
/* Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/* Implemented from the mm3dnow.h (of supposedly AMD origin) included with
MSVC 7.1. */
#ifndef _MM3DNOW_H_INCLUDED
#define _MM3DNOW_H_INCLUDED
#ifdef __3dNOW__
#include <mmintrin.h>
/* Internal data types for implementing the intrinsics. */
typedef float __v2sf __attribute__ ((__vector_size__ (8)));
static __inline void
_m_femms (void)
{
__builtin_ia32_femms();
}
static __inline __m64
_m_pavgusb (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pavgusb ((__v8qi)__A, (__v8qi)__B);
}
static __inline __m64
_m_pf2id (__m64 __A)
{
return (__m64)__builtin_ia32_pf2id ((__v2sf)__A);
}
static __inline __m64
_m_pfacc (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfacc ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfadd (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfadd ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfcmpeq (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfcmpeq ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfcmpge (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfcmpge ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfcmpgt (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfcmpgt ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfmax (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfmax ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfmin (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfmin ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfmul (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfmul ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfrcp (__m64 __A)
{
return (__m64)__builtin_ia32_pfrcp ((__v2sf)__A);
}
static __inline __m64
_m_pfrcpit1 (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfrcpit1 ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfrcpit2 (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfrcpit2 ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfrsqrt (__m64 __A)
{
return (__m64)__builtin_ia32_pfrsqrt ((__v2sf)__A);
}
static __inline __m64
_m_pfrsqit1 (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfrsqit1 ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfsub (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfsub ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfsubr (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfsubr ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pi2fd (__m64 __A)
{
return (__m64)__builtin_ia32_pi2fd ((__v2si)__A);
}
static __inline __m64
_m_pmulhrw (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pmulhrw ((__v4hi)__A, (__v4hi)__B);
}
static __inline void
_m_prefetch (void *__P)
{
__builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
}
static __inline void
_m_prefetchw (void *__P)
{
__builtin_prefetch (__P, 1, 3 /* _MM_HINT_T0 */);
}
static __inline __m64
_m_from_float (float __A)
{
return (__m64)(__v2sf){ __A, 0 };
}
static __inline float
_m_to_float (__m64 __A)
{
union { __v2sf v; float a[2]; } __tmp = { (__v2sf)__A };
return __tmp.a[0];
}
#ifdef __3dNOW_A__
static __inline __m64
_m_pf2iw (__m64 __A)
{
return (__m64)__builtin_ia32_pf2iw ((__v2sf)__A);
}
static __inline __m64
_m_pfnacc (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfnacc ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pfpnacc (__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pfpnacc ((__v2sf)__A, (__v2sf)__B);
}
static __inline __m64
_m_pi2fw (__m64 __A)
{
return (__m64)__builtin_ia32_pi2fw ((__v2si)__A);
}
static __inline __m64
_m_pswapd (__m64 __A)
{
return (__m64)__builtin_ia32_pswapdsf ((__v2sf)__A);
}
#endif /* __3dNOW_A__ */
#endif /* __3dNOW__ */
#endif /* _MM3DNOW_H_INCLUDED */

View file

@ -0,0 +1,77 @@
/* Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
#ifndef _MM_MALLOC_H_INCLUDED
#define _MM_MALLOC_H_INCLUDED
#include <stdlib.h>
#include <errno.h>
static __inline__ void*
_mm_malloc (size_t size, size_t align)
{
void * malloc_ptr;
void * aligned_ptr;
/* Error if align is not a power of two. */
if (align & (align - 1))
{
errno = EINVAL;
return ((void*) 0);
}
if (size == 0)
return ((void *) 0);
/* Assume malloc'd pointer is aligned at least to sizeof (void*).
If necessary, add another sizeof (void*) to store the value
returned by malloc. Effectively this enforces a minimum alignment
of sizeof double. */
if (align < 2 * sizeof (void *))
align = 2 * sizeof (void *);
malloc_ptr = malloc (size + align);
if (!malloc_ptr)
return ((void *) 0);
/* Align We have at least sizeof (void *) space below malloc'd ptr. */
aligned_ptr = (void *) (((size_t) malloc_ptr + align)
& ~((size_t) (align) - 1));
/* Store the original pointer just before p. */
((void **) aligned_ptr) [-1] = malloc_ptr;
return aligned_ptr;
}
static __inline__ void
_mm_free (void * aligned_ptr)
{
if (aligned_ptr)
free (((void **) aligned_ptr) [-1]);
}
#endif /* _MM_MALLOC_H_INCLUDED */

View file

@ -0,0 +1,41 @@
/* APPLE LOCAL file 5612787 mainline sse4 */
/* Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/* Implemented from the specification included in the Intel C++ Compiler
User Guide and Reference, version 10.0. */
#ifndef _NMMINTRIN_H_INCLUDED
#define _NMMINTRIN_H_INCLUDED
#ifndef __SSE4_2__
# error "SSE4.2 instruction set not enabled"
#else
/* We just include SSE4.1 header file. */
#include <smmintrin.h>
#endif /* __SSE4_2__ */
#endif /* _NMMINTRIN_H_INCLUDED */

View file

@ -0,0 +1,87 @@
/* Copyright (C) 2005 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@redhat.com>.
This file is part of the GNU OpenMP Library (libgomp).
Libgomp is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
more details.
You should have received a copy of the GNU Lesser General Public License
along with libgomp; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA. */
/* As a special exception, if you link this library with other files, some
of which are compiled with GCC, to produce an executable, this library
does not by itself cause the resulting executable to be covered by the
GNU General Public License. This exception does not however invalidate
any other reasons why the executable file might be covered by the GNU
General Public License. */
#ifndef OMP_H
#define OMP_H 1
#ifndef _LIBGOMP_OMP_LOCK_DEFINED
#define _LIBGOMP_OMP_LOCK_DEFINED 1
/* These two structures get edited by the libgomp build process to
reflect the shape of the two types. Their internals are private
to the library. */
typedef struct
{
unsigned char _x[64]
__attribute__((__aligned__(8)));
} omp_lock_t;
typedef struct
{
unsigned char _x[72]
__attribute__((__aligned__(8)));
} omp_nest_lock_t;
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern void omp_set_num_threads (int);
extern int omp_get_num_threads (void);
extern int omp_get_max_threads (void);
extern int omp_get_thread_num (void);
extern int omp_get_num_procs (void);
extern int omp_in_parallel (void);
extern void omp_set_dynamic (int);
extern int omp_get_dynamic (void);
extern void omp_set_nested (int);
extern int omp_get_nested (void);
extern void omp_init_lock (omp_lock_t *);
extern void omp_destroy_lock (omp_lock_t *);
extern void omp_set_lock (omp_lock_t *);
extern void omp_unset_lock (omp_lock_t *);
extern int omp_test_lock (omp_lock_t *);
extern void omp_init_nest_lock (omp_nest_lock_t *);
extern void omp_destroy_nest_lock (omp_nest_lock_t *);
extern void omp_set_nest_lock (omp_nest_lock_t *);
extern void omp_unset_nest_lock (omp_nest_lock_t *);
extern int omp_test_nest_lock (omp_nest_lock_t *);
extern double omp_get_wtime (void);
extern double omp_get_wtick (void);
#ifdef __cplusplus
}
#endif
#endif /* OMP_H */

View file

@ -0,0 +1,172 @@
/* APPLE LOCAL file mainline 2005-06-30 Radar 4131077 */
/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/* Implemented from the specification included in the Intel C++ Compiler
User Guide and Reference, version 9.0. */
#ifndef _PMMINTRIN_H_INCLUDED
#define _PMMINTRIN_H_INCLUDED
#ifdef __SSE3__
#include <xmmintrin.h>
#include <emmintrin.h>
/* Additional bits in the MXCSR. */
#define _MM_DENORMALS_ZERO_MASK 0x0040
#define _MM_DENORMALS_ZERO_ON 0x0040
#define _MM_DENORMALS_ZERO_OFF 0x0000
#define _MM_SET_DENORMALS_ZERO_MODE(mode) \
_mm_setcsr ((_mm_getcsr () & ~_MM_DENORMALS_ZERO_MASK) | (mode))
#define _MM_GET_DENORMALS_ZERO_MODE() \
(_mm_getcsr() & _MM_DENORMALS_ZERO_MASK)
/* APPLE LOCAL begin nodebug inline 4152603 */
#define __always_inline__ __always_inline__, __nodebug__
/* APPLE LOCAL end nodebug inline 4152603 */
/* APPLE LOCAL begin radar 5618945 */
#undef __STATIC_INLINE
#ifdef __GNUC_STDC_INLINE__
#define __STATIC_INLINE __inline
#else
#define __STATIC_INLINE static __inline
#endif
/* APPLE LOCAL end radar 5618945 */
/* APPLE LOCAL begin radar 4152603 */
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_addsub_ps (__m128 __X, __m128 __Y)
{
return (__m128) __builtin_ia32_addsubps ((__v4sf)__X, (__v4sf)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hadd_ps (__m128 __X, __m128 __Y)
{
return (__m128) __builtin_ia32_haddps ((__v4sf)__X, (__v4sf)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hsub_ps (__m128 __X, __m128 __Y)
{
return (__m128) __builtin_ia32_hsubps ((__v4sf)__X, (__v4sf)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_movehdup_ps (__m128 __X)
{
return (__m128) __builtin_ia32_movshdup ((__v4sf)__X);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_moveldup_ps (__m128 __X)
{
return (__m128) __builtin_ia32_movsldup ((__v4sf)__X);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128d __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_addsub_pd (__m128d __X, __m128d __Y)
{
return (__m128d) __builtin_ia32_addsubpd ((__v2df)__X, (__v2df)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128d __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hadd_pd (__m128d __X, __m128d __Y)
{
return (__m128d) __builtin_ia32_haddpd ((__v2df)__X, (__v2df)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128d __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hsub_pd (__m128d __X, __m128d __Y)
{
return (__m128d) __builtin_ia32_hsubpd ((__v2df)__X, (__v2df)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128d __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_loaddup_pd (double const *__P)
{
return _mm_load1_pd (__P);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128d __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_movedup_pd (__m128d __X)
{
return _mm_shuffle_pd (__X, __X, _MM_SHUFFLE2 (0,0));
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_lddqu_si128 (__m128i const *__P)
{
return (__m128i) __builtin_ia32_lddqu ((char const *)__P);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE void __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_monitor (void const * __P, unsigned int __E, unsigned int __H)
{
__builtin_ia32_monitor (__P, __E, __H);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE void __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_mwait (unsigned int __E, unsigned int __H)
{
__builtin_ia32_mwait (__E, __H);
}
/* APPLE LOCAL end radar 4152603 */
/* APPLE LOCAL begin nodebug inline 4152603 */
#undef __always_inline__
/* APPLE LOCAL end nodebug inline 4152603 */
#endif /* __SSE3__ */
#endif /* _PMMINTRIN_H_INCLUDED */

View file

@ -0,0 +1 @@
../../../../../include/gcc/darwin/4.2/ppc_intrinsics.h

View file

@ -0,0 +1,836 @@
/* APPLE LOCAL file 5612787 mainline sse4 */
/* Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/* Implemented from the specification included in the Intel C++ Compiler
User Guide and Reference, version 10.0. */
#ifndef _SMMINTRIN_H_INCLUDED
#define _SMMINTRIN_H_INCLUDED
#ifndef __SSE4_1__
# error "SSE4.1 instruction set not enabled"
#else
/* We need definitions from the SSSE3, SSE3, SSE2 and SSE header
files. */
#include <tmmintrin.h>
/* SSE4.1 */
/* Rounding mode macros. */
#define _MM_FROUND_TO_NEAREST_INT 0x00
#define _MM_FROUND_TO_NEG_INF 0x01
#define _MM_FROUND_TO_POS_INF 0x02
#define _MM_FROUND_TO_ZERO 0x03
#define _MM_FROUND_CUR_DIRECTION 0x04
#define _MM_FROUND_RAISE_EXC 0x00
#define _MM_FROUND_NO_EXC 0x08
#define _MM_FROUND_NINT \
(_MM_FROUND_TO_NEAREST_INT | _MM_FROUND_RAISE_EXC)
#define _MM_FROUND_FLOOR \
(_MM_FROUND_TO_NEG_INF | _MM_FROUND_RAISE_EXC)
#define _MM_FROUND_CEIL \
(_MM_FROUND_TO_POS_INF | _MM_FROUND_RAISE_EXC)
#define _MM_FROUND_TRUNC \
(_MM_FROUND_TO_ZERO | _MM_FROUND_RAISE_EXC)
#define _MM_FROUND_RINT \
(_MM_FROUND_CUR_DIRECTION | _MM_FROUND_RAISE_EXC)
#define _MM_FROUND_NEARBYINT \
(_MM_FROUND_CUR_DIRECTION | _MM_FROUND_NO_EXC)
/* APPLE LOCAL begin nodebug inline 4152603 */
#define __always_inline__ __always_inline__, __nodebug__
/* APPLE LOCAL end nodebug inline 4152603 */
/* APPLE LOCAL begin radar 5618945 */
#undef __STATIC_INLINE
#ifdef __GNUC_STDC_INLINE__
#define __STATIC_INLINE __inline
#else
#define __STATIC_INLINE static __inline
#endif
/* APPLE LOCAL end radar 5618945 */
/* Integer blend instructions - select data from 2 sources using
constant/variable mask. */
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_blend_epi16 (__m128i __X, __m128i __Y, const int __M)
{
return (__m128i) __builtin_ia32_pblendw128 ((__v8hi)__X,
(__v8hi)__Y,
__M);
}
#else
#define _mm_blend_epi16(X, Y, M) \
((__m128i) __builtin_ia32_pblendw128 ((__v8hi)(X), (__v8hi)(Y), (M)))
#endif
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_blendv_epi8 (__m128i __X, __m128i __Y, __m128i __M)
{
return (__m128i) __builtin_ia32_pblendvb128 ((__v16qi)__X,
(__v16qi)__Y,
(__v16qi)__M);
}
/* Single precision floating point blend instructions - select data
from 2 sources using constant/variable mask. */
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128 __attribute__((__always_inline__))
_mm_blend_ps (__m128 __X, __m128 __Y, const int __M)
{
return (__m128) __builtin_ia32_blendps ((__v4sf)__X,
(__v4sf)__Y,
__M);
}
#else
#define _mm_blend_ps(X, Y, M) \
((__m128) __builtin_ia32_blendps ((__v4sf)(X), (__v4sf)(Y), (M)))
#endif
__STATIC_INLINE __m128 __attribute__((__always_inline__))
_mm_blendv_ps (__m128 __X, __m128 __Y, __m128 __M)
{
return (__m128) __builtin_ia32_blendvps ((__v4sf)__X,
(__v4sf)__Y,
(__v4sf)__M);
}
/* Double precision floating point blend instructions - select data
from 2 sources using constant/variable mask. */
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128d __attribute__((__always_inline__))
_mm_blend_pd (__m128d __X, __m128d __Y, const int __M)
{
return (__m128d) __builtin_ia32_blendpd ((__v2df)__X,
(__v2df)__Y,
__M);
}
#else
#define _mm_blend_pd(X, Y, M) \
((__m128d) __builtin_ia32_blendpd ((__v2df)(X), (__v2df)(Y), (M)))
#endif
__STATIC_INLINE __m128d __attribute__((__always_inline__))
_mm_blendv_pd (__m128d __X, __m128d __Y, __m128d __M)
{
return (__m128d) __builtin_ia32_blendvpd ((__v2df)__X,
(__v2df)__Y,
(__v2df)__M);
}
/* Dot product instructions with mask-defined summing and zeroing parts
of result. */
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128 __attribute__((__always_inline__))
_mm_dp_ps (__m128 __X, __m128 __Y, const int __M)
{
return (__m128) __builtin_ia32_dpps ((__v4sf)__X,
(__v4sf)__Y,
__M);
}
__STATIC_INLINE __m128d __attribute__((__always_inline__))
_mm_dp_pd (__m128d __X, __m128d __Y, const int __M)
{
return (__m128d) __builtin_ia32_dppd ((__v2df)__X,
(__v2df)__Y,
__M);
}
#else
#define _mm_dp_ps(X, Y, M) \
((__m128) __builtin_ia32_dpps ((__v4sf)(X), (__v4sf)(Y), (M)))
#define _mm_dp_pd(X, Y, M) \
((__m128d) __builtin_ia32_dppd ((__v2df)(X), (__v2df)(Y), (M)))
#endif
/* Packed integer 64-bit comparison, zeroing or filling with ones
corresponding parts of result. */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cmpeq_epi64 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pcmpeqq ((__v2di)__X, (__v2di)__Y);
}
/* Min/max packed integer instructions. */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_min_epi8 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pminsb128 ((__v16qi)__X, (__v16qi)__Y);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_max_epi8 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pmaxsb128 ((__v16qi)__X, (__v16qi)__Y);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_min_epu16 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pminuw128 ((__v8hi)__X, (__v8hi)__Y);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_max_epu16 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pmaxuw128 ((__v8hi)__X, (__v8hi)__Y);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_min_epi32 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pminsd128 ((__v4si)__X, (__v4si)__Y);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_max_epi32 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pmaxsd128 ((__v4si)__X, (__v4si)__Y);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_min_epu32 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pminud128 ((__v4si)__X, (__v4si)__Y);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_max_epu32 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pmaxud128 ((__v4si)__X, (__v4si)__Y);
}
/* Packed integer 32-bit multiplication with truncation of upper
halves of results. */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_mullo_epi32 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pmulld128 ((__v4si)__X, (__v4si)__Y);
}
/* Packed integer 32-bit multiplication of 2 pairs of operands
with two 64-bit results. */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_mul_epi32 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pmuldq128 ((__v4si)__X, (__v4si)__Y);
}
/* Packed integer 128-bit bitwise comparison. Return 1 if
(__V & __M) == 0. */
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_testz_si128 (__m128i __M, __m128i __V)
{
return __builtin_ia32_ptestz128 ((__v2di)__M, (__v2di)__V);
}
/* Packed integer 128-bit bitwise comparison. Return 1 if
(__V & ~__M) == 0. */
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_testc_si128 (__m128i __M, __m128i __V)
{
return __builtin_ia32_ptestc128 ((__v2di)__M, (__v2di)__V);
}
/* Packed integer 128-bit bitwise comparison. Return 1 if
(__V & __M) != 0 && (__V & ~__M) != 0. */
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_testnzc_si128 (__m128i __M, __m128i __V)
{
return __builtin_ia32_ptestnzc128 ((__v2di)__M, (__v2di)__V);
}
/* Macros for packed integer 128-bit comparison intrinsics. */
#define _mm_test_all_zeros(M, V) _mm_testz_si128 ((M), (V))
#define _mm_test_all_ones(V) \
_mm_testc_si128 ((V), _mm_cmpeq_epi32 ((V), (V)))
#define _mm_test_mix_ones_zeros(M, V) _mm_testnzc_si128 ((M), (V))
/* Insert single precision float into packed single precision array
element selected by index N. The bits [7-6] of N define S
index, the bits [5-4] define D index, and bits [3-0] define
zeroing mask for D. */
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128 __attribute__((__always_inline__))
_mm_insert_ps (__m128 __D, __m128 __S, const int __N)
{
return (__m128) __builtin_ia32_insertps128 ((__v4sf)__D,
(__v4sf)__S,
__N);
}
#else
#define _mm_insert_ps(D, S, N) \
((__m128) __builtin_ia32_insertps128 ((__v4sf)(D), (__v4sf)(S), (N)))
#endif
/* Helper macro to create the N value for _mm_insert_ps. */
#define _MM_MK_INSERTPS_NDX(S, D, M) (((S) << 6) | ((D) << 4) | (M))
/* Extract binary representation of single precision float from packed
single precision array element of X selected by index N. */
#ifdef __OPTIMIZE__
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_extract_ps (__m128 __X, const int __N)
{
union { int i; float f; } __tmp;
__tmp.f = __builtin_ia32_vec_ext_v4sf ((__v4sf)__X, __N);
return __tmp.i;
}
#else
#define _mm_extract_ps(X, N) \
(__extension__ \
({ \
union { int i; float f; } __tmp; \
__tmp.f = __builtin_ia32_vec_ext_v4sf ((__v4sf)(X), (N)); \
__tmp.i; \
}) \
)
#endif
/* Extract binary representation of single precision float into
D from packed single precision array element of S selected
by index N. */
#define _MM_EXTRACT_FLOAT(D, S, N) \
{ (D) = __builtin_ia32_vec_ext_v4sf ((__v4sf)(S), (N)); }
/* Extract specified single precision float element into the lower
part of __m128. */
#define _MM_PICK_OUT_PS(X, N) \
_mm_insert_ps (_mm_setzero_ps (), (X), \
_MM_MK_INSERTPS_NDX ((N), 0, 0x0e))
/* Insert integer, S, into packed integer array element of D
selected by index N. */
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_insert_epi8 (__m128i __D, int __S, const int __N)
{
return (__m128i) __builtin_ia32_vec_set_v16qi ((__v16qi)__D,
__S, __N);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_insert_epi32 (__m128i __D, int __S, const int __N)
{
return (__m128i) __builtin_ia32_vec_set_v4si ((__v4si)__D,
__S, __N);
}
#ifdef __x86_64__
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_insert_epi64 (__m128i __D, long long __S, const int __N)
{
return (__m128i) __builtin_ia32_vec_set_v2di ((__v2di)__D,
__S, __N);
}
#endif
#else
#define _mm_insert_epi8(D, S, N) \
((__m128i) __builtin_ia32_vec_set_v16qi ((__v16qi)(D), (S), (N)))
#define _mm_insert_epi32(D, S, N) \
((__m128i) __builtin_ia32_vec_set_v4si ((__v4si)(D), (S), (N)))
#ifdef __x86_64__
#define _mm_insert_epi64(D, S, N) \
((__m128i) __builtin_ia32_vec_set_v2di ((__v2di)(D), (S), (N)))
#endif
#endif
/* Extract integer from packed integer array element of X selected by
index N. */
#ifdef __OPTIMIZE__
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_extract_epi8 (__m128i __X, const int __N)
{
return __builtin_ia32_vec_ext_v16qi ((__v16qi)__X, __N);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_extract_epi32 (__m128i __X, const int __N)
{
return __builtin_ia32_vec_ext_v4si ((__v4si)__X, __N);
}
#ifdef __x86_64__
__STATIC_INLINE long long __attribute__((__always_inline__))
_mm_extract_epi64 (__m128i __X, const int __N)
{
return __builtin_ia32_vec_ext_v2di ((__v2di)__X, __N);
}
#endif
#else
#define _mm_extract_epi8(X, N) \
__builtin_ia32_vec_ext_v16qi ((__v16qi) X, (N))
#define _mm_extract_epi32(X, N) \
__builtin_ia32_vec_ext_v4si ((__v4si) X, (N))
#ifdef __x86_64__
#define _mm_extract_epi64(X, N) \
((long long) __builtin_ia32_vec_ext_v2di ((__v2di)(X), (N)))
#endif
#endif
/* Return horizontal packed word minimum and its index in bits [15:0]
and bits [18:16] respectively. */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_minpos_epu16 (__m128i __X)
{
return (__m128i) __builtin_ia32_phminposuw128 ((__v8hi)__X);
}
/* Packed/scalar double precision floating point rounding. */
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128d __attribute__((__always_inline__))
_mm_round_pd (__m128d __V, const int __M)
{
return (__m128d) __builtin_ia32_roundpd ((__v2df)__V, __M);
}
__STATIC_INLINE __m128d __attribute__((__always_inline__))
_mm_round_sd(__m128d __D, __m128d __V, const int __M)
{
return (__m128d) __builtin_ia32_roundsd ((__v2df)__D,
(__v2df)__V,
__M);
}
#else
#define _mm_round_pd(V, M) \
((__m128d) __builtin_ia32_roundpd ((__v2df)(V), (M)))
#define _mm_round_sd(D, V, M) \
((__m128d) __builtin_ia32_roundsd ((__v2df)(D), (__v2df)(V), (M)))
#endif
/* Packed/scalar single precision floating point rounding. */
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128 __attribute__((__always_inline__))
_mm_round_ps (__m128 __V, const int __M)
{
return (__m128) __builtin_ia32_roundps ((__v4sf)__V, __M);
}
__STATIC_INLINE __m128 __attribute__((__always_inline__))
_mm_round_ss (__m128 __D, __m128 __V, const int __M)
{
return (__m128) __builtin_ia32_roundss ((__v4sf)__D,
(__v4sf)__V,
__M);
}
#else
#define _mm_round_ps(V, M) \
((__m128) __builtin_ia32_roundps ((__v4sf)(V), (M)))
#define _mm_round_ss(D, V, M) \
((__m128) __builtin_ia32_roundss ((__v4sf)(D), (__v4sf)(V), (M)))
#endif
/* Macros for ceil/floor intrinsics. */
#define _mm_ceil_pd(V) _mm_round_pd ((V), _MM_FROUND_CEIL)
#define _mm_ceil_sd(D, V) _mm_round_sd ((D), (V), _MM_FROUND_CEIL)
#define _mm_floor_pd(V) _mm_round_pd((V), _MM_FROUND_FLOOR)
#define _mm_floor_sd(D, V) _mm_round_sd ((D), (V), _MM_FROUND_FLOOR)
#define _mm_ceil_ps(V) _mm_round_ps ((V), _MM_FROUND_CEIL)
#define _mm_ceil_ss(D, V) _mm_round_ss ((D), (V), _MM_FROUND_CEIL)
#define _mm_floor_ps(V) _mm_round_ps ((V), _MM_FROUND_FLOOR)
#define _mm_floor_ss(D, V) _mm_round_ss ((D), (V), _MM_FROUND_FLOOR)
/* Packed integer sign-extension. */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepi8_epi32 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovsxbd128 ((__v16qi)__X);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepi16_epi32 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovsxwd128 ((__v8hi)__X);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepi8_epi64 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovsxbq128 ((__v16qi)__X);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepi32_epi64 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovsxdq128 ((__v4si)__X);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepi16_epi64 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovsxwq128 ((__v8hi)__X);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepi8_epi16 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovsxbw128 ((__v16qi)__X);
}
/* Packed integer zero-extension. */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepu8_epi32 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovzxbd128 ((__v16qi)__X);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepu16_epi32 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovzxwd128 ((__v8hi)__X);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepu8_epi64 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovzxbq128 ((__v16qi)__X);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepu32_epi64 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovzxdq128 ((__v4si)__X);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepu16_epi64 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovzxwq128 ((__v8hi)__X);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cvtepu8_epi16 (__m128i __X)
{
return (__m128i) __builtin_ia32_pmovzxbw128 ((__v16qi)__X);
}
/* Pack 8 double words from 2 operands into 8 words of result with
unsigned saturation. */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_packus_epi32 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_packusdw128 ((__v4si)__X, (__v4si)__Y);
}
/* Sum absolute 8-bit integer difference of adjacent groups of 4
byte integers in the first 2 operands. Starting offsets within
operands are determined by the 3rd mask operand. */
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_mpsadbw_epu8 (__m128i __X, __m128i __Y, const int __M)
{
return (__m128i) __builtin_ia32_mpsadbw128 ((__v16qi)__X,
(__v16qi)__Y, __M);
}
#else
#define _mm_mpsadbw_epu8(X, Y, M) \
((__m128i) __builtin_ia32_mpsadbw128 ((__v16qi)(X), (__v16qi)(Y), (M)))
#endif
/* Load double quadword using non-temporal aligned hint. */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_stream_load_si128 (__m128i *__X)
{
return (__m128i) __builtin_ia32_movntdqa ((__v2di *) __X);
}
#ifdef __SSE4_2__
/* These macros specify the source data format. */
#define SIDD_UBYTE_OPS 0x00
#define SIDD_UWORD_OPS 0x01
#define SIDD_SBYTE_OPS 0x02
#define SIDD_SWORD_OPS 0x03
/* These macros specify the comparison operation. */
#define SIDD_CMP_EQUAL_ANY 0x00
#define SIDD_CMP_RANGES 0x04
#define SIDD_CMP_EQUAL_EACH 0x08
#define SIDD_CMP_EQUAL_ORDERED 0x0c
/* These macros specify the the polarity. */
#define SIDD_POSITIVE_POLARITY 0x00
#define SIDD_NEGATIVE_POLARITY 0x10
#define SIDD_MASKED_POSITIVE_POLARITY 0x20
#define SIDD_MASKED_NEGATIVE_POLARITY 0x30
/* These macros specify the output selection in _mm_cmpXstri (). */
#define SIDD_LEAST_SIGNIFICANT 0x00
#define SIDD_MOST_SIGNIFICANT 0x40
/* These macros specify the output selection in _mm_cmpXstrm (). */
#define SIDD_BIT_MASK 0x00
#define SIDD_UNIT_MASK 0x40
/* Intrinsics for text/string processing. */
#ifdef __OPTIMIZE__
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cmpistrm (__m128i __X, __m128i __Y, const int __M)
{
return (__m128i) __builtin_ia32_pcmpistrm128 ((__v16qi)__X,
(__v16qi)__Y,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpistri (__m128i __X, __m128i __Y, const int __M)
{
return __builtin_ia32_pcmpistri128 ((__v16qi)__X,
(__v16qi)__Y,
__M);
}
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cmpestrm (__m128i __X, int __LX, __m128i __Y, int __LY, const int __M)
{
return (__m128i) __builtin_ia32_pcmpestrm128 ((__v16qi)__X, __LX,
(__v16qi)__Y, __LY,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpestri (__m128i __X, int __LX, __m128i __Y, int __LY, const int __M)
{
return __builtin_ia32_pcmpestri128 ((__v16qi)__X, __LX,
(__v16qi)__Y, __LY,
__M);
}
#else
#define _mm_cmpistrm(X, Y, M) \
((__m128i) __builtin_ia32_pcmpistrm128 ((__v16qi)(X), (__v16qi)(Y), (M)))
#define _mm_cmpistri(X, Y, M) \
__builtin_ia32_pcmpistri128 ((__v16qi)(X), (__v16qi)(Y), (M))
#define _mm_cmpestrm(X, LX, Y, LY, M) \
((__m128i) __builtin_ia32_pcmpestrm128 ((__v16qi)(X), (int)(LX), \
(__v16qi)(Y), (int)(LY), (M)))
#define _mm_cmpestri(X, LX, Y, LY, M) \
__builtin_ia32_pcmpestri128 ((__v16qi)(X), (int)(LX), \
(__v16qi)(Y), (int)(LY), (M))
#endif
/* Intrinsics for text/string processing and reading values of
EFlags. */
#ifdef __OPTIMIZE__
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpistra (__m128i __X, __m128i __Y, const int __M)
{
return __builtin_ia32_pcmpistria128 ((__v16qi)__X,
(__v16qi)__Y,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpistrc (__m128i __X, __m128i __Y, const int __M)
{
return __builtin_ia32_pcmpistric128 ((__v16qi)__X,
(__v16qi)__Y,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpistro (__m128i __X, __m128i __Y, const int __M)
{
return __builtin_ia32_pcmpistrio128 ((__v16qi)__X,
(__v16qi)__Y,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpistrs (__m128i __X, __m128i __Y, const int __M)
{
return __builtin_ia32_pcmpistris128 ((__v16qi)__X,
(__v16qi)__Y,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpistrz (__m128i __X, __m128i __Y, const int __M)
{
return __builtin_ia32_pcmpistriz128 ((__v16qi)__X,
(__v16qi)__Y,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpestra (__m128i __X, int __LX, __m128i __Y, int __LY, const int __M)
{
return __builtin_ia32_pcmpestria128 ((__v16qi)__X, __LX,
(__v16qi)__Y, __LY,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpestrc (__m128i __X, int __LX, __m128i __Y, int __LY, const int __M)
{
return __builtin_ia32_pcmpestric128 ((__v16qi)__X, __LX,
(__v16qi)__Y, __LY,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpestro (__m128i __X, int __LX, __m128i __Y, int __LY, const int __M)
{
return __builtin_ia32_pcmpestrio128 ((__v16qi)__X, __LX,
(__v16qi)__Y, __LY,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpestrs (__m128i __X, int __LX, __m128i __Y, int __LY, const int __M)
{
return __builtin_ia32_pcmpestris128 ((__v16qi)__X, __LX,
(__v16qi)__Y, __LY,
__M);
}
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_cmpestrz (__m128i __X, int __LX, __m128i __Y, int __LY, const int __M)
{
return __builtin_ia32_pcmpestriz128 ((__v16qi)__X, __LX,
(__v16qi)__Y, __LY,
__M);
}
#else
#define _mm_cmpistra(X, Y, M) \
__builtin_ia32_pcmpistria128 ((__v16qi)(X), (__v16qi)(Y), (M))
#define _mm_cmpistrc(X, Y, M) \
__builtin_ia32_pcmpistric128 ((__v16qi)(X), (__v16qi)(Y), (M))
#define _mm_cmpistro(X, Y, M) \
__builtin_ia32_pcmpistrio128 ((__v16qi)(X), (__v16qi)(Y), (M))
#define _mm_cmpistrs(X, Y, M) \
__builtin_ia32_pcmpistris128 ((__v16qi)(X), (__v16qi)(Y), (M))
#define _mm_cmpistrz(X, Y, M) \
__builtin_ia32_pcmpistriz128 ((__v16qi)(X), (__v16qi)(Y), (M))
#define _mm_cmpestra(X, LX, Y, LY, M) \
__builtin_ia32_pcmpestria128 ((__v16qi)(X), (int)(LX), \
(__v16qi)(Y), (int)(LY), (M))
#define _mm_cmpestrc(X, LX, Y, LY, M) \
__builtin_ia32_pcmpestric128 ((__v16qi)(X), (int)(LX), \
(__v16qi)(Y), (int)(LY), (M))
#define _mm_cmpestro(X, LX, Y, LY, M) \
__builtin_ia32_pcmpestrio128 ((__v16qi)(X), (int)(LX), \
(__v16qi)(Y), (int)(LY), (M))
#define _mm_cmpestrs(X, LX, Y, LY, M) \
__builtin_ia32_pcmpestris128 ((__v16qi)(X), (int)(LX), \
(__v16qi)(Y), (int)(LY), (M))
#define _mm_cmpestrz(X, LX, Y, LY, M) \
__builtin_ia32_pcmpestriz128 ((__v16qi)(X), (int)(LX), \
(__v16qi)(Y), (int)(LY), (M))
#endif
/* Packed integer 64-bit comparison, zeroing or filling with ones
corresponding parts of result. */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
_mm_cmpgt_epi64 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pcmpgtq ((__v2di)__X, (__v2di)__Y);
}
/* Calculate a number of bits set to 1. */
__STATIC_INLINE int __attribute__((__always_inline__))
_mm_popcnt_u32 (unsigned int __X)
{
return __builtin_popcount (__X);
}
#ifdef __x86_64__
__STATIC_INLINE long long __attribute__((__always_inline__))
_mm_popcnt_u64 (unsigned long long __X)
{
return __builtin_popcountll (__X);
}
#endif
/* Accumulate CRC32 (polynomial 0x11EDC6F41) value. */
__STATIC_INLINE unsigned int __attribute__((__always_inline__))
_mm_crc32_u8 (unsigned int __C, unsigned char __V)
{
return __builtin_ia32_crc32qi (__C, __V);
}
__STATIC_INLINE unsigned int __attribute__((__always_inline__))
_mm_crc32_u16 (unsigned int __C, unsigned short __V)
{
return __builtin_ia32_crc32hi (__C, __V);
}
__STATIC_INLINE unsigned int __attribute__((__always_inline__))
_mm_crc32_u32 (unsigned int __C, unsigned int __V)
{
return __builtin_ia32_crc32si (__C, __V);
}
#ifdef __x86_64__
__STATIC_INLINE unsigned long long __attribute__((__always_inline__))
_mm_crc32_u64 (unsigned long long __C, unsigned long long __V)
{
return __builtin_ia32_crc32di (__C, __V);
}
#endif
#endif /* __SSE4_2__ */
#endif /* __SSE4_1__ */
/* APPLE LOCAL begin nodebug inline 4152603 */
#undef __always_inline__
/* APPLE LOCAL end nodebug inline 4152603 */
#endif /* _SMMINTRIN_H_INCLUDED */

View file

@ -0,0 +1,133 @@
/* Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/*
* ISO C Standard: 7.15 Variable arguments <stdarg.h>
*/
#ifndef _STDARG_H
#ifndef _ANSI_STDARG_H_
#ifndef __need___va_list
#define _STDARG_H
#define _ANSI_STDARG_H_
#endif /* not __need___va_list */
#undef __need___va_list
/* Define __gnuc_va_list. */
#ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST
typedef __builtin_va_list __gnuc_va_list;
#endif
/* Define the standard macros for the user,
if this invocation was from the user program. */
#ifdef _STDARG_H
#define va_start(v,l) __builtin_va_start(v,l)
#define va_end(v) __builtin_va_end(v)
#define va_arg(v,l) __builtin_va_arg(v,l)
#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L
#define va_copy(d,s) __builtin_va_copy(d,s)
#endif
#define __va_copy(d,s) __builtin_va_copy(d,s)
/* Define va_list, if desired, from __gnuc_va_list. */
/* We deliberately do not define va_list when called from
stdio.h, because ANSI C says that stdio.h is not supposed to define
va_list. stdio.h needs to have access to that data type,
but must not use that name. It should use the name __gnuc_va_list,
which is safe because it is reserved for the implementation. */
#ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */
#undef _VA_LIST
#endif
#ifdef _BSD_VA_LIST
#undef _BSD_VA_LIST
#endif
#if defined(__svr4__) || (defined(_SCO_DS) && !defined(__VA_LIST))
/* SVR4.2 uses _VA_LIST for an internal alias for va_list,
so we must avoid testing it and setting it here.
SVR4 uses _VA_LIST as a flag in stdarg.h, but we should
have no conflict with that. */
#ifndef _VA_LIST_
#define _VA_LIST_
#ifdef __i860__
#ifndef _VA_LIST
#define _VA_LIST va_list
#endif
#endif /* __i860__ */
typedef __gnuc_va_list va_list;
#ifdef _SCO_DS
#define __VA_LIST
#endif
#endif /* _VA_LIST_ */
#else /* not __svr4__ || _SCO_DS */
/* The macro _VA_LIST_ is the same thing used by this file in Ultrix.
But on BSD NET2 we must not test or define or undef it.
(Note that the comments in NET 2's ansi.h
are incorrect for _VA_LIST_--see stdio.h!) */
#if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__) || defined(WINNT)
/* The macro _VA_LIST_DEFINED is used in Windows NT 3.5 */
#ifndef _VA_LIST_DEFINED
/* The macro _VA_LIST is used in SCO Unix 3.2. */
#ifndef _VA_LIST
/* The macro _VA_LIST_T_H is used in the Bull dpx2 */
#ifndef _VA_LIST_T_H
/* The macro __va_list__ is used by BeOS. */
#ifndef __va_list__
typedef __gnuc_va_list va_list;
#endif /* not __va_list__ */
#endif /* not _VA_LIST_T_H */
#endif /* not _VA_LIST */
#endif /* not _VA_LIST_DEFINED */
#if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__))
#define _VA_LIST_
#endif
#ifndef _VA_LIST
#define _VA_LIST
#endif
#ifndef _VA_LIST_DEFINED
#define _VA_LIST_DEFINED
#endif
#ifndef _VA_LIST_T_H
#define _VA_LIST_T_H
#endif
#ifndef __va_list__
#define __va_list__
#endif
#endif /* not _VA_LIST_, except on certain systems */
#endif /* not __svr4__ */
#endif /* _STDARG_H */
#endif /* not _ANSI_STDARG_H_ */
#endif /* not _STDARG_H */

View file

@ -0,0 +1,53 @@
/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/*
* ISO C Standard: 7.16 Boolean type and values <stdbool.h>
*/
#ifndef _STDBOOL_H
#define _STDBOOL_H
#ifndef __cplusplus
#define bool _Bool
#define true 1
#define false 0
#else /* __cplusplus */
/* Supporting <stdbool.h> in C++ is a GCC extension. */
#define _Bool bool
#define bool bool
#define false false
#define true true
#endif /* __cplusplus */
/* Signal that all the definitions are present. */
#define __bool_true_false_are_defined 1
#endif /* stdbool.h */

View file

@ -0,0 +1,419 @@
/* Copyright (C) 1989, 1997, 1998, 1999, 2000, 2002, 2004
Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/*
* ISO C Standard: 7.17 Common definitions <stddef.h>
*/
#if (!defined(_STDDEF_H) && !defined(_STDDEF_H_) && !defined(_ANSI_STDDEF_H) \
&& !defined(__STDDEF_H__)) \
|| defined(__need_wchar_t) || defined(__need_size_t) \
|| defined(__need_ptrdiff_t) || defined(__need_NULL) \
|| defined(__need_wint_t)
/* Any one of these symbols __need_* means that GNU libc
wants us just to define one data type. So don't define
the symbols that indicate this file's entire job has been done. */
#if (!defined(__need_wchar_t) && !defined(__need_size_t) \
&& !defined(__need_ptrdiff_t) && !defined(__need_NULL) \
&& !defined(__need_wint_t))
#define _STDDEF_H
#define _STDDEF_H_
/* snaroff@next.com says the NeXT needs this. */
#define _ANSI_STDDEF_H
/* Irix 5.1 needs this. */
#define __STDDEF_H__
#endif
#ifndef __sys_stdtypes_h
/* This avoids lossage on SunOS but only if stdtypes.h comes first.
There's no way to win with the other order! Sun lossage. */
/* On 4.3bsd-net2, make sure ansi.h is included, so we have
one less case to deal with in the following. */
#if defined (__BSD_NET2__) || defined (____386BSD____) || (defined (__FreeBSD__) && (__FreeBSD__ < 5)) || defined(__NetBSD__)
#include <machine/ansi.h>
#endif
/* On FreeBSD 5, machine/ansi.h does not exist anymore... */
#if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
#include <sys/_types.h>
#endif
/* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
defined if the corresponding type is *not* defined.
FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_ */
#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_)
#if !defined(_SIZE_T_) && !defined(_BSD_SIZE_T_)
#define _SIZE_T
#endif
#if !defined(_PTRDIFF_T_) && !defined(_BSD_PTRDIFF_T_)
#define _PTRDIFF_T
#endif
/* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_
instead of _WCHAR_T_. */
#if !defined(_WCHAR_T_) && !defined(_BSD_WCHAR_T_)
#ifndef _BSD_WCHAR_T_
#define _WCHAR_T
#endif
#endif
/* Undef _FOO_T_ if we are supposed to define foo_t. */
#if defined (__need_ptrdiff_t) || defined (_STDDEF_H_)
#undef _PTRDIFF_T_
#undef _BSD_PTRDIFF_T_
#endif
#if defined (__need_size_t) || defined (_STDDEF_H_)
#undef _SIZE_T_
#undef _BSD_SIZE_T_
#endif
#if defined (__need_wchar_t) || defined (_STDDEF_H_)
#undef _WCHAR_T_
#undef _BSD_WCHAR_T_
#endif
#endif /* defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) */
/* Sequent's header files use _PTRDIFF_T_ in some conflicting way.
Just ignore it. */
#if defined (__sequent__) && defined (_PTRDIFF_T_)
#undef _PTRDIFF_T_
#endif
/* On VxWorks, <type/vxTypesBase.h> may have defined macros like
_TYPE_size_t which will typedef size_t. fixincludes patched the
vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
not defined, and so that defining this macro defines _GCC_SIZE_T.
If we find that the macros are still defined at this point, we must
invoke them so that the type is defined as expected. */
#if defined (_TYPE_ptrdiff_t) && (defined (__need_ptrdiff_t) || defined (_STDDEF_H_))
_TYPE_ptrdiff_t;
#undef _TYPE_ptrdiff_t
#endif
#if defined (_TYPE_size_t) && (defined (__need_size_t) || defined (_STDDEF_H_))
_TYPE_size_t;
#undef _TYPE_size_t
#endif
#if defined (_TYPE_wchar_t) && (defined (__need_wchar_t) || defined (_STDDEF_H_))
_TYPE_wchar_t;
#undef _TYPE_wchar_t
#endif
/* In case nobody has defined these types, but we aren't running under
GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
__WCHAR_TYPE__ have reasonable values. This can happen if the
parts of GCC is compiled by an older compiler, that actually
include gstddef.h, such as collect2. */
/* Signed type of difference of two pointers. */
/* Define this type if we are doing the whole job,
or if we want this type in particular. */
#if defined (_STDDEF_H) || defined (__need_ptrdiff_t)
#ifndef _PTRDIFF_T /* in case <sys/types.h> has defined it. */
#ifndef _T_PTRDIFF_
#ifndef _T_PTRDIFF
#ifndef __PTRDIFF_T
#ifndef _PTRDIFF_T_
#ifndef _BSD_PTRDIFF_T_
#ifndef ___int_ptrdiff_t_h
#ifndef _GCC_PTRDIFF_T
#define _PTRDIFF_T
#define _T_PTRDIFF_
#define _T_PTRDIFF
#define __PTRDIFF_T
#define _PTRDIFF_T_
#define _BSD_PTRDIFF_T_
#define ___int_ptrdiff_t_h
#define _GCC_PTRDIFF_T
#ifndef __PTRDIFF_TYPE__
#define __PTRDIFF_TYPE__ long int
#endif
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#endif /* _GCC_PTRDIFF_T */
#endif /* ___int_ptrdiff_t_h */
#endif /* _BSD_PTRDIFF_T_ */
#endif /* _PTRDIFF_T_ */
#endif /* __PTRDIFF_T */
#endif /* _T_PTRDIFF */
#endif /* _T_PTRDIFF_ */
#endif /* _PTRDIFF_T */
/* If this symbol has done its job, get rid of it. */
#undef __need_ptrdiff_t
#endif /* _STDDEF_H or __need_ptrdiff_t. */
/* Unsigned type of `sizeof' something. */
/* Define this type if we are doing the whole job,
or if we want this type in particular. */
#if defined (_STDDEF_H) || defined (__need_size_t)
#ifndef __size_t__ /* BeOS */
#ifndef __SIZE_T__ /* Cray Unicos/Mk */
#ifndef _SIZE_T /* in case <sys/types.h> has defined it. */
#ifndef _SYS_SIZE_T_H
#ifndef _T_SIZE_
#ifndef _T_SIZE
#ifndef __SIZE_T
#ifndef _SIZE_T_
#ifndef _BSD_SIZE_T_
#ifndef _SIZE_T_DEFINED_
#ifndef _SIZE_T_DEFINED
#ifndef _BSD_SIZE_T_DEFINED_ /* Darwin */
#ifndef _SIZE_T_DECLARED /* FreeBSD 5 */
#ifndef ___int_size_t_h
#ifndef _GCC_SIZE_T
#ifndef _SIZET_
#ifndef __size_t
#define __size_t__ /* BeOS */
#define __SIZE_T__ /* Cray Unicos/Mk */
#define _SIZE_T
#define _SYS_SIZE_T_H
#define _T_SIZE_
#define _T_SIZE
#define __SIZE_T
#define _SIZE_T_
#define _BSD_SIZE_T_
#define _SIZE_T_DEFINED_
#define _SIZE_T_DEFINED
#define _BSD_SIZE_T_DEFINED_ /* Darwin */
#define _SIZE_T_DECLARED /* FreeBSD 5 */
#define ___int_size_t_h
#define _GCC_SIZE_T
#define _SIZET_
#if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
/* __size_t is a typedef on FreeBSD 5!, must not trash it. */
#else
#define __size_t
#endif
#ifndef __SIZE_TYPE__
#define __SIZE_TYPE__ long unsigned int
#endif
#if !(defined (__GNUG__) && defined (size_t))
typedef __SIZE_TYPE__ size_t;
#ifdef __BEOS__
typedef long ssize_t;
#endif /* __BEOS__ */
#endif /* !(defined (__GNUG__) && defined (size_t)) */
#endif /* __size_t */
#endif /* _SIZET_ */
#endif /* _GCC_SIZE_T */
#endif /* ___int_size_t_h */
#endif /* _SIZE_T_DECLARED */
#endif /* _BSD_SIZE_T_DEFINED_ */
#endif /* _SIZE_T_DEFINED */
#endif /* _SIZE_T_DEFINED_ */
#endif /* _BSD_SIZE_T_ */
#endif /* _SIZE_T_ */
#endif /* __SIZE_T */
#endif /* _T_SIZE */
#endif /* _T_SIZE_ */
#endif /* _SYS_SIZE_T_H */
#endif /* _SIZE_T */
#endif /* __SIZE_T__ */
#endif /* __size_t__ */
#undef __need_size_t
#endif /* _STDDEF_H or __need_size_t. */
/* Wide character type.
Locale-writers should change this as necessary to
be big enough to hold unique values not between 0 and 127,
and not (wchar_t) -1, for each defined multibyte character. */
/* Define this type if we are doing the whole job,
or if we want this type in particular. */
#if defined (_STDDEF_H) || defined (__need_wchar_t)
#ifndef __wchar_t__ /* BeOS */
#ifndef __WCHAR_T__ /* Cray Unicos/Mk */
#ifndef _WCHAR_T
#ifndef _T_WCHAR_
#ifndef _T_WCHAR
#ifndef __WCHAR_T
#ifndef _WCHAR_T_
#ifndef _BSD_WCHAR_T_
#ifndef _BSD_WCHAR_T_DEFINED_ /* Darwin */
#ifndef _BSD_RUNE_T_DEFINED_ /* Darwin */
#ifndef _WCHAR_T_DECLARED /* FreeBSD 5 */
#ifndef _WCHAR_T_DEFINED_
#ifndef _WCHAR_T_DEFINED
#ifndef _WCHAR_T_H
#ifndef ___int_wchar_t_h
#ifndef __INT_WCHAR_T_H
#ifndef _GCC_WCHAR_T
#define __wchar_t__ /* BeOS */
#define __WCHAR_T__ /* Cray Unicos/Mk */
#define _WCHAR_T
#define _T_WCHAR_
#define _T_WCHAR
#define __WCHAR_T
#define _WCHAR_T_
#define _BSD_WCHAR_T_
#define _WCHAR_T_DEFINED_
#define _WCHAR_T_DEFINED
#define _WCHAR_T_H
#define ___int_wchar_t_h
#define __INT_WCHAR_T_H
#define _GCC_WCHAR_T
#define _WCHAR_T_DECLARED
/* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_
instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other
symbols in the _FOO_T_ family, stays defined even after its
corresponding type is defined). If we define wchar_t, then we
must undef _WCHAR_T_; for BSD/386 1.1 (and perhaps others), if
we undef _WCHAR_T_, then we must also define rune_t, since
headers like runetype.h assume that if machine/ansi.h is included,
and _BSD_WCHAR_T_ is not defined, then rune_t is available.
machine/ansi.h says, "Note that _WCHAR_T_ and _RUNE_T_ must be of
the same type." */
#ifdef _BSD_WCHAR_T_
#undef _BSD_WCHAR_T_
#ifdef _BSD_RUNE_T_
#if !defined (_ANSI_SOURCE) && !defined (_POSIX_SOURCE)
typedef _BSD_RUNE_T_ rune_t;
#define _BSD_WCHAR_T_DEFINED_
#define _BSD_RUNE_T_DEFINED_ /* Darwin */
#if defined (__FreeBSD__) && (__FreeBSD__ < 5)
/* Why is this file so hard to maintain properly? In contrast to
the comment above regarding BSD/386 1.1, on FreeBSD for as long
as the symbol has existed, _BSD_RUNE_T_ must not stay defined or
redundant typedefs will occur when stdlib.h is included after this file. */
#undef _BSD_RUNE_T_
#endif
#endif
#endif
#endif
/* FreeBSD 5 can't be handled well using "traditional" logic above
since it no longer defines _BSD_RUNE_T_ yet still desires to export
rune_t in some cases... */
#if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
#if !defined (_ANSI_SOURCE) && !defined (_POSIX_SOURCE)
#if __BSD_VISIBLE
#ifndef _RUNE_T_DECLARED
typedef __rune_t rune_t;
#define _RUNE_T_DECLARED
#endif
#endif
#endif
#endif
#ifndef __WCHAR_TYPE__
#define __WCHAR_TYPE__ int
#endif
#ifndef __cplusplus
typedef __WCHAR_TYPE__ wchar_t;
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif /* _WCHAR_T_DECLARED */
#endif /* _BSD_RUNE_T_DEFINED_ */
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif /* __WCHAR_T__ */
#endif /* __wchar_t__ */
#undef __need_wchar_t
#endif /* _STDDEF_H or __need_wchar_t. */
#if defined (__need_wint_t)
#ifndef _WINT_T
#define _WINT_T
#ifndef __WINT_TYPE__
#define __WINT_TYPE__ unsigned int
#endif
typedef __WINT_TYPE__ wint_t;
#endif
#undef __need_wint_t
#endif
/* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
are already defined. */
/* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */
#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_)
/* The references to _GCC_PTRDIFF_T_, _GCC_SIZE_T_, and _GCC_WCHAR_T_
are probably typos and should be removed before 2.8 is released. */
#ifdef _GCC_PTRDIFF_T_
#undef _PTRDIFF_T_
#undef _BSD_PTRDIFF_T_
#endif
#ifdef _GCC_SIZE_T_
#undef _SIZE_T_
#undef _BSD_SIZE_T_
#endif
#ifdef _GCC_WCHAR_T_
#undef _WCHAR_T_
#undef _BSD_WCHAR_T_
#endif
/* The following ones are the real ones. */
#ifdef _GCC_PTRDIFF_T
#undef _PTRDIFF_T_
#undef _BSD_PTRDIFF_T_
#endif
#ifdef _GCC_SIZE_T
#undef _SIZE_T_
#undef _BSD_SIZE_T_
#endif
#ifdef _GCC_WCHAR_T
#undef _WCHAR_T_
#undef _BSD_WCHAR_T_
#endif
#endif /* _ANSI_H_ || _MACHINE_ANSI_H_ */
#endif /* __sys_stdtypes_h */
/* A null pointer constant. */
#if defined (_STDDEF_H) || defined (__need_NULL)
#undef NULL /* in case <stdio.h> has defined it. */
#ifdef __GNUG__
#define NULL __null
#else /* G++ */
#ifndef __cplusplus
#define NULL ((void *)0)
#else /* C++ */
#define NULL 0
#endif /* C++ */
#endif /* G++ */
#endif /* NULL not defined and <stddef.h> or need NULL. */
#undef __need_NULL
#ifdef _STDDEF_H
/* Offset of member MEMBER in a struct of type TYPE. */
#define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER)
#endif /* _STDDEF_H was defined this time */
#endif /* !_STDDEF_H && !_STDDEF_H_ && !_ANSI_STDDEF_H && !__STDDEF_H__
|| __need_XXX was not defined before */

View file

@ -0,0 +1,8 @@
/* syslimits.h stands for the system's own limits.h file.
If we can use it ok unmodified, then we install this text.
If fixincludes fixes it, then the fixed version is installed
instead of this text. */
#define _GCC_NEXT_LIMITS_H /* tell gcc's limits.h to recurse */
/* APPLE LOCAL begin 4401222 */
/* APPLE LOCAL end 4401222 */

View file

@ -0,0 +1,182 @@
/* APPLE LOCAL file mainline 2007-06-12 2872232 */
/* Copyright (C) 2004
Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/*
* ISO C Standard: 7.22 Type-generic math <tgmath.h>
*/
#ifndef _TGMATH_H
#define _TGMATH_H
#include <math.h>
#ifndef __cplusplus
#include <complex.h>
/* Naming convention: generic macros are defining using
__TGMATH_CPLX*, __TGMATH_REAL*, and __TGMATH_CPLX_ONLY. _CPLX
means the generic argument(s) may be real or complex, _REAL means
real only, _CPLX means complex only. If there is no suffix, we are
defining a function of one generic argument. If the suffix is _n
it is a function of n generic arguments. If the suffix is _m_n it
is a function of n arguments, the first m of which are generic. We
only define these macros for values of n and/or m that are needed. */
/* The general rules for generic macros are given in 7.22 paragraphs 1 and 2.
If any generic parameter is complex, we use a complex version. Otherwise
we use a real version. If the real part of any generic parameter is long
double, we use the long double version. Otherwise if the real part of any
generic paramter is double or of integer type, we use the double version.
Otherwise we use the float version. */
#define __tg_cplx(expr) \
__builtin_classify_type(expr) == 9
#define __tg_ldbl(expr) \
__builtin_types_compatible_p(__typeof__(expr), long double)
#define __tg_dbl(expr) \
(__builtin_types_compatible_p(__typeof__(expr), double) \
|| __builtin_classify_type(expr) == 1)
#define __tg_choose(x,f,d,l) \
__builtin_choose_expr(__tg_ldbl(x), l, \
__builtin_choose_expr(__tg_dbl(x), d, \
f))
#define __tg_choose_2(x,y,f,d,l) \
__builtin_choose_expr(__tg_ldbl(x) || __tg_ldbl(y), l, \
__builtin_choose_expr(__tg_dbl(x) || __tg_dbl(y), d, \
f))
#define __tg_choose_3(x,y,z,f,d,l) \
__builtin_choose_expr(__tg_ldbl(x) || __tg_ldbl(y) || __tg_ldbl(z), l, \
__builtin_choose_expr(__tg_dbl(x) || __tg_dbl(y) \
|| __tg_dbl(z), d, \
f))
#define __TGMATH_CPLX(z,R,C) \
__builtin_choose_expr (__tg_cplx(z), \
__tg_choose (__real__(z), C##f(z), (C)(z), C##l(z)), \
/* APPLE LOCAL shorten-64-to-32 4604239 */ \
__tg_choose (z, R##f((float)(z)), (R)(z), R##l(z)))
#define __TGMATH_CPLX_2(z1,z2,R,C) \
__builtin_choose_expr (__tg_cplx(z1) || __tg_cplx(z2), \
__tg_choose_2 (__real__(z1), __real__(z2), \
C##f(z1,z2), (C)(z1,z2), C##l(z1,z2)), \
__tg_choose_2 (z1, z2, \
/* APPLE LOCAL shorten-64-to-32 5909621 */ \
R##f((float)(z1),(float)(z2)), (R)(z1,z2), R##l(z1,z2)))
#define __TGMATH_REAL(x,R) \
/* APPLE LOCAL shorten-64-to-32 5909621 */ \
__tg_choose (x, R##f((float)(x)), (R)(x), R##l(x))
#define __TGMATH_REAL_2(x,y,R) \
/* APPLE LOCAL shorten-64-to-32 4604239 */ \
__tg_choose_2 (x, y, R##f((float)(x),(float)(y)), (R)(x,y), R##l(x,y))
#define __TGMATH_REAL_3(x,y,z,R) \
/* APPLE LOCAL shorten-64-to-32 5909621 */ \
__tg_choose_3 (x, y, z, R##f((float)(x),(float)(y),(float)(z)), (R)(x,y,z), R##l(x,y,z))
#define __TGMATH_REAL_1_2(x,y,R) \
/* APPLE LOCAL shorten-64-to-32 5909621 */ \
__tg_choose (x, R##f((float)(x),y), (R)(x,y), R##l(x,y))
#define __TGMATH_REAL_2_3(x,y,z,R) \
/* APPLE LOCAL shorten-64-to-32 5909621 */ \
__tg_choose_2 (x, y, R##f((float)(x),(float)(y),z), (R)(x,y,z), R##l(x,y,z))
#define __TGMATH_CPLX_ONLY(z,C) \
__tg_choose (__real__(z), C##f(z), (C)(z), C##l(z))
/* Functions defined in both <math.h> and <complex.h> (7.22p4) */
#define acos(z) __TGMATH_CPLX(z, acos, cacos)
#define asin(z) __TGMATH_CPLX(z, asin, casin)
#define atan(z) __TGMATH_CPLX(z, atan, catan)
#define acosh(z) __TGMATH_CPLX(z, acosh, cacosh)
#define asinh(z) __TGMATH_CPLX(z, asinh, casinh)
#define atanh(z) __TGMATH_CPLX(z, atanh, catanh)
#define cos(z) __TGMATH_CPLX(z, cos, ccos)
#define sin(z) __TGMATH_CPLX(z, sin, csin)
#define tan(z) __TGMATH_CPLX(z, tan, ctan)
#define cosh(z) __TGMATH_CPLX(z, cosh, ccosh)
#define sinh(z) __TGMATH_CPLX(z, sinh, csinh)
#define tanh(z) __TGMATH_CPLX(z, tanh, ctanh)
#define exp(z) __TGMATH_CPLX(z, exp, cexp)
#define log(z) __TGMATH_CPLX(z, log, clog)
#define pow(z1,z2) __TGMATH_CPLX_2(z1, z2, pow, cpow)
#define sqrt(z) __TGMATH_CPLX(z, sqrt, csqrt)
#define fabs(z) __TGMATH_CPLX(z, fabs, cabs)
/* Functions defined in <math.h> only (7.22p5) */
#define atan2(x,y) __TGMATH_REAL_2(x, y, atan2)
#define cbrt(x) __TGMATH_REAL(x, cbrt)
#define ceil(x) __TGMATH_REAL(x, ceil)
#define copysign(x,y) __TGMATH_REAL_2(x, y, copysign)
#define erf(x) __TGMATH_REAL(x, erf)
#define erfc(x) __TGMATH_REAL(x, erfc)
#define exp2(x) __TGMATH_REAL(x, exp2)
#define expm1(x) __TGMATH_REAL(x, expm1)
#define fdim(x,y) __TGMATH_REAL_2(x, y, fdim)
#define floor(x) __TGMATH_REAL(x, floor)
#define fma(x,y,z) __TGMATH_REAL_3(x, y, z, fma)
#define fmax(x,y) __TGMATH_REAL_2(x, y, fmax)
#define fmin(x,y) __TGMATH_REAL_2(x, y, fmin)
#define fmod(x,y) __TGMATH_REAL_2(x, y, fmod)
#define frexp(x,y) __TGMATH_REAL_1_2(x, y, frexp)
#define hypot(x,y) __TGMATH_REAL_2(x, y, hypot)
#define ilogb(x) __TGMATH_REAL(x, ilogb)
#define ldexp(x,y) __TGMATH_REAL_1_2(x, y, ldexp)
#define lgamma(x) __TGMATH_REAL(x, lgamma)
#define llrint(x) __TGMATH_REAL(x, llrint)
#define llround(x) __TGMATH_REAL(x, llround)
#define log10(x) __TGMATH_REAL(x, log10)
#define log1p(x) __TGMATH_REAL(x, log1p)
#define log2(x) __TGMATH_REAL(x, log2)
#define logb(x) __TGMATH_REAL(x, logb)
#define lrint(x) __TGMATH_REAL(x, lrint)
#define lround(x) __TGMATH_REAL(x, lround)
#define nearbyint(x) __TGMATH_REAL(x, nearbyint)
#define nextafter(x,y) __TGMATH_REAL_2(x, y, nextafter)
#define nexttoward(x,y) __TGMATH_REAL_1_2(x, y, nexttoward)
#define remainder(x,y) __TGMATH_REAL_2(x, y, remainder)
#define remquo(x,y,z) __TGMATH_REAL_2_3(x, y, z, remquo)
#define rint(x) __TGMATH_REAL(x, rint)
#define round(x) __TGMATH_REAL(x, round)
#define scalbn(x,y) __TGMATH_REAL_1_2(x, y, scalbn)
#define scalbln(x,y) __TGMATH_REAL_1_2(x, y, scalbln)
#define tgamma(x) __TGMATH_REAL(x, tgamma)
#define trunc(x) __TGMATH_REAL(x, trunc)
/* Functions defined in <complex.h> only (7.22p6) */
#define carg(z) __TGMATH_CPLX_ONLY(z, carg)
#define cimag(z) __TGMATH_CPLX_ONLY(z, cimag)
#define conj(z) __TGMATH_CPLX_ONLY(z, conj)
#define cproj(z) __TGMATH_CPLX_ONLY(z, cproj)
#define creal(z) __TGMATH_CPLX_ONLY(z, creal)
#endif /* __cplusplus */
#endif /* _TGMATH_H */

View file

@ -0,0 +1,304 @@
/* APPLE LOCAL file ssse3 4424835 */
/* Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/* Implemented from the specification included in the Intel C++ Compiler
User Guide and Reference, version 9.1. */
#ifndef _TMMINTRIN_H_INCLUDED
#define _TMMINTRIN_H_INCLUDED
#ifdef __SSSE3__
#include <pmmintrin.h>
/* APPLE LOCAL begin nodebug inline */
#define __always_inline__ __always_inline__, __nodebug__
/* APPLE LOCAL end nodebug inline */
/* APPLE LOCAL begin radar 5618945 */
#undef __STATIC_INLINE
#ifdef __GNUC_STDC_INLINE__
#define __STATIC_INLINE __inline
#else
#define __STATIC_INLINE static __inline
#endif
/* APPLE LOCAL end radar 5618945 */
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hadd_epi16 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_phaddw128 ((__v8hi)__X, (__v8hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hadd_epi32 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_phaddd128 ((__v4si)__X, (__v4si)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hadds_epi16 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_phaddsw128 ((__v8hi)__X, (__v8hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hadd_pi16 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_phaddw ((__v4hi)__X, (__v4hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hadd_pi32 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_phaddd ((__v2si)__X, (__v2si)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hadds_pi16 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_phaddsw ((__v4hi)__X, (__v4hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hsub_epi16 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_phsubw128 ((__v8hi)__X, (__v8hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hsub_epi32 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_phsubd128 ((__v4si)__X, (__v4si)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hsubs_epi16 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_phsubsw128 ((__v8hi)__X, (__v8hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hsub_pi16 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_phsubw ((__v4hi)__X, (__v4hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hsub_pi32 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_phsubd ((__v2si)__X, (__v2si)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_hsubs_pi16 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_phsubsw ((__v4hi)__X, (__v4hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_maddubs_epi16 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pmaddubsw128 ((__v16qi)__X, (__v16qi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_maddubs_pi16 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_pmaddubsw ((__v8qi)__X, (__v8qi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_mulhrs_epi16 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pmulhrsw128 ((__v8hi)__X, (__v8hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_mulhrs_pi16 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_pmulhrsw ((__v4hi)__X, (__v4hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_shuffle_epi8 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_pshufb128 ((__v16qi)__X, (__v16qi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_shuffle_pi8 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_pshufb ((__v8qi)__X, (__v8qi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_sign_epi8 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_psignb128 ((__v16qi)__X, (__v16qi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_sign_epi16 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_psignw128 ((__v8hi)__X, (__v8hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_sign_epi32 (__m128i __X, __m128i __Y)
{
return (__m128i) __builtin_ia32_psignd128 ((__v4si)__X, (__v4si)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_sign_pi8 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_psignb ((__v8qi)__X, (__v8qi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_sign_pi16 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_psignw ((__v4hi)__X, (__v4hi)__Y);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_sign_pi32 (__m64 __X, __m64 __Y)
{
return (__m64) __builtin_ia32_psignd ((__v2si)__X, (__v2si)__Y);
}
/* APPLE LOCAL begin 5814283 */
#define _mm_alignr_epi8(__X, __Y, __N) \
((__m128i)__builtin_ia32_palignr128 ((__v2di)(__X), (__v2di)(__Y), (__N) * 8))
/* APPLE LOCAL end 5814283 */
#define _mm_alignr_pi8(__X, __Y, __N) \
((__m64)__builtin_ia32_palignr ((long long) (__X), (long long) (__Y), (__N) * 8))
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_abs_epi8 (__m128i __X)
{
return (__m128i) __builtin_ia32_pabsb128 ((__v16qi)__X);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_abs_epi16 (__m128i __X)
{
return (__m128i) __builtin_ia32_pabsw128 ((__v8hi)__X);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m128i __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_abs_epi32 (__m128i __X)
{
return (__m128i) __builtin_ia32_pabsd128 ((__v4si)__X);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_abs_pi8 (__m64 __X)
{
return (__m64) __builtin_ia32_pabsb ((__v8qi)__X);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_abs_pi16 (__m64 __X)
{
return (__m64) __builtin_ia32_pabsw ((__v4hi)__X);
}
/* APPLE LOCAL begin radar 5618945 */
__STATIC_INLINE __m64 __attribute__((__always_inline__))
/* APPLE LOCAL end radar 5618945 */
_mm_abs_pi32 (__m64 __X)
{
return (__m64) __builtin_ia32_pabsd ((__v2si)__X);
}
/* APPLE LOCAL begin nodebug inline */
#undef __always_inline__
/* APPLE LOCAL end nodebug inline */
#endif /* __SSSE3__ */
#endif /* _TMMINTRIN_H_INCLUDED */

View file

@ -0,0 +1,241 @@
/* Exception handling and frame unwind runtime interface routines.
Copyright (C) 2001, 2003, 2004, 2006 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
/* As a special exception, if you include this header file into source
files compiled by GCC, this header file does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License. */
/* This is derived from the C++ ABI for IA-64. Where we diverge
for cross-architecture compatibility are noted with "@@@". */
#ifndef _UNWIND_H
#define _UNWIND_H
#ifndef HIDE_EXPORTS
#pragma GCC visibility push(default)
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Level 1: Base ABI */
/* @@@ The IA-64 ABI uses uint64 throughout. Most places this is
inefficient for 32-bit and smaller machines. */
typedef unsigned _Unwind_Word __attribute__((__mode__(__word__)));
typedef signed _Unwind_Sword __attribute__((__mode__(__word__)));
#if defined(__ia64__) && defined(__hpux__)
typedef unsigned _Unwind_Ptr __attribute__((__mode__(__word__)));
#else
typedef unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__)));
#endif
typedef unsigned _Unwind_Internal_Ptr __attribute__((__mode__(__pointer__)));
/* @@@ The IA-64 ABI uses a 64-bit word to identify the producer and
consumer of an exception. We'll go along with this for now even on
32-bit machines. We'll need to provide some other option for
16-bit machines and for machines with > 8 bits per byte. */
typedef unsigned _Unwind_Exception_Class __attribute__((__mode__(__DI__)));
/* The unwind interface uses reason codes in several contexts to
identify the reasons for failures or other actions. */
typedef enum
{
_URC_NO_REASON = 0,
_URC_FOREIGN_EXCEPTION_CAUGHT = 1,
_URC_FATAL_PHASE2_ERROR = 2,
_URC_FATAL_PHASE1_ERROR = 3,
_URC_NORMAL_STOP = 4,
_URC_END_OF_STACK = 5,
_URC_HANDLER_FOUND = 6,
_URC_INSTALL_CONTEXT = 7,
_URC_CONTINUE_UNWIND = 8
} _Unwind_Reason_Code;
/* The unwind interface uses a pointer to an exception header object
as its representation of an exception being thrown. In general, the
full representation of an exception object is language- and
implementation-specific, but it will be prefixed by a header
understood by the unwind interface. */
struct _Unwind_Exception;
typedef void (*_Unwind_Exception_Cleanup_Fn) (_Unwind_Reason_Code,
struct _Unwind_Exception *);
struct _Unwind_Exception
{
_Unwind_Exception_Class exception_class;
_Unwind_Exception_Cleanup_Fn exception_cleanup;
_Unwind_Word private_1;
_Unwind_Word private_2;
/* @@@ The IA-64 ABI says that this structure must be double-word aligned.
Taking that literally does not make much sense generically. Instead we
provide the maximum alignment required by any type for the machine. */
} __attribute__((__aligned__));
/* The ACTIONS argument to the personality routine is a bitwise OR of one
or more of the following constants. */
typedef int _Unwind_Action;
#define _UA_SEARCH_PHASE 1
#define _UA_CLEANUP_PHASE 2
#define _UA_HANDLER_FRAME 4
#define _UA_FORCE_UNWIND 8
#define _UA_END_OF_STACK 16
/* This is an opaque type used to refer to a system-specific data
structure used by the system unwinder. This context is created and
destroyed by the system, and passed to the personality routine
during unwinding. */
struct _Unwind_Context;
/* Raise an exception, passing along the given exception object. */
extern _Unwind_Reason_Code _Unwind_RaiseException (struct _Unwind_Exception *);
/* Raise an exception for forced unwinding. */
typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn)
(int, _Unwind_Action, _Unwind_Exception_Class,
struct _Unwind_Exception *, struct _Unwind_Context *, void *);
extern _Unwind_Reason_Code _Unwind_ForcedUnwind (struct _Unwind_Exception *,
_Unwind_Stop_Fn,
void *);
/* Helper to invoke the exception_cleanup routine. */
extern void _Unwind_DeleteException (struct _Unwind_Exception *);
/* Resume propagation of an existing exception. This is used after
e.g. executing cleanup code, and not to implement rethrowing. */
extern void _Unwind_Resume (struct _Unwind_Exception *);
/* @@@ Resume propagation of an FORCE_UNWIND exception, or to rethrow
a normal exception that was handled. */
extern _Unwind_Reason_Code _Unwind_Resume_or_Rethrow (struct _Unwind_Exception *);
/* @@@ Use unwind data to perform a stack backtrace. The trace callback
is called for every stack frame in the call chain, but no cleanup
actions are performed. */
typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn)
(struct _Unwind_Context *, void *);
extern _Unwind_Reason_Code _Unwind_Backtrace (_Unwind_Trace_Fn, void *);
/* These functions are used for communicating information about the unwind
context (i.e. the unwind descriptors and the user register state) between
the unwind library and the personality routine and landing pad. Only
selected registers maybe manipulated. */
extern _Unwind_Word _Unwind_GetGR (struct _Unwind_Context *, int);
extern void _Unwind_SetGR (struct _Unwind_Context *, int, _Unwind_Word);
extern _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *);
extern _Unwind_Ptr _Unwind_GetIPInfo (struct _Unwind_Context *, int *);
extern void _Unwind_SetIP (struct _Unwind_Context *, _Unwind_Ptr);
/* @@@ Retrieve the CFA of the given context. */
extern _Unwind_Word _Unwind_GetCFA (struct _Unwind_Context *);
extern void *_Unwind_GetLanguageSpecificData (struct _Unwind_Context *);
extern _Unwind_Ptr _Unwind_GetRegionStart (struct _Unwind_Context *);
/* The personality routine is the function in the C++ (or other language)
runtime library which serves as an interface between the system unwind
library and language-specific exception handling semantics. It is
specific to the code fragment described by an unwind info block, and
it is always referenced via the pointer in the unwind info block, and
hence it has no ABI-specified name.
Note that this implies that two different C++ implementations can
use different names, and have different contents in the language
specific data area. Moreover, that the language specific data
area contains no version info because name of the function invoked
provides more effective versioning by detecting at link time the
lack of code to handle the different data format. */
typedef _Unwind_Reason_Code (*_Unwind_Personality_Fn)
(int, _Unwind_Action, _Unwind_Exception_Class,
struct _Unwind_Exception *, struct _Unwind_Context *);
/* @@@ The following alternate entry points are for setjmp/longjmp
based unwinding. */
struct SjLj_Function_Context;
extern void _Unwind_SjLj_Register (struct SjLj_Function_Context *);
extern void _Unwind_SjLj_Unregister (struct SjLj_Function_Context *);
extern _Unwind_Reason_Code _Unwind_SjLj_RaiseException
(struct _Unwind_Exception *);
extern _Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind
(struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
extern void _Unwind_SjLj_Resume (struct _Unwind_Exception *);
extern _Unwind_Reason_Code _Unwind_SjLj_Resume_or_Rethrow (struct _Unwind_Exception *);
/* @@@ The following provide access to the base addresses for text
and data-relative addressing in the LDSA. In order to stay link
compatible with the standard ABI for IA-64, we inline these. */
#ifdef __ia64__
#include <stdlib.h>
static inline _Unwind_Ptr
_Unwind_GetDataRelBase (struct _Unwind_Context *_C)
{
/* The GP is stored in R1. */
return _Unwind_GetGR (_C, 1);
}
static inline _Unwind_Ptr
_Unwind_GetTextRelBase (struct _Unwind_Context *_C __attribute__ ((__unused__)))
{
abort ();
return 0;
}
/* @@@ Retrieve the Backing Store Pointer of the given context. */
extern _Unwind_Word _Unwind_GetBSP (struct _Unwind_Context *);
#else
extern _Unwind_Ptr _Unwind_GetDataRelBase (struct _Unwind_Context *);
extern _Unwind_Ptr _Unwind_GetTextRelBase (struct _Unwind_Context *);
#endif
/* @@@ Given an address, return the entry point of the function that
contains it. */
extern void * _Unwind_FindEnclosingFunction (void *pc);
#ifdef __cplusplus
}
#endif
#ifndef HIDE_EXPORTS
#pragma GCC visibility pop
#endif
#endif /* unwind.h */

View file

@ -0,0 +1,7 @@
#ifndef _VARARGS_H
#define _VARARGS_H
#error "GCC no longer implements <varargs.h>."
#error "Revise your code to use <stdarg.h>."
#endif

View file

@ -0,0 +1,3 @@
# This spec file is read by gcc when linking. It is used to specify the
# standard libraries we need in order to link with -fopenmp.
*link_gomp: -lgomp %{static: }

View file

@ -0,0 +1,3 @@
# This spec file is read by gcc when linking. It is used to specify the
# standard libraries we need in order to link with -fopenmp.
*link_gomp: -lgomp %{static: }

Some files were not shown because too many files have changed in this diff Show more