Mercurial > pub > dyncall > dyncall
comparison autovar/autovar_ARCH.h @ 0:3e629dc19168
initial from svn dyncall-1745
author | Daniel Adler |
---|---|
date | Thu, 19 Mar 2015 22:24:28 +0100 |
parents | |
children | 8449fa6dabc7 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3e629dc19168 |
---|---|
1 /* | |
2 | |
3 Package: dyncall | |
4 Library: autovar | |
5 File: autovar/autovar_ARCH.h | |
6 Description: | |
7 License: | |
8 | |
9 Copyright (c) 2011-2015 Daniel Adler <dadler@uni-goettingen.de>, | |
10 Tassilo Philipp <tphilipp@potion-studios.com> | |
11 | |
12 Permission to use, copy, modify, and distribute this software for any | |
13 purpose with or without fee is hereby granted, provided that the above | |
14 copyright notice and this permission notice appear in all copies. | |
15 | |
16 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
17 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
18 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
19 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
20 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
21 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
22 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
23 | |
24 */ | |
25 | |
26 #ifndef AUTOVAR_ARCH_H | |
27 #define AUTOVAR_ARCH_H | |
28 | |
29 /* Check architecture. */ | |
30 #if defined(_M_IX86) || defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) || defined(__386__) || defined(__i386) | |
31 # define ARCH_X86 | |
32 #elif defined(_M_X64_) || defined(_M_AMD64) || defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) | |
33 # define ARCH_X64 | |
34 #elif defined(_M_IA64) || defined(__ia64__) | |
35 # define ARCH_IA64 | |
36 #elif defined(_M_PPC) || defined(__powerpc__) || defined(__powerpc) || defined(__POWERPC__) || defined(__ppc__) || defined(__power__) | |
37 # if defined(__ppc64__) || defined(_ARCH_PPC64) || defined(__power64__) || defined(__powerpc64__) | |
38 # define ARCH_PPC64 | |
39 # else | |
40 # define ARCH_PPC | |
41 # endif | |
42 #elif defined(__mips64__) || defined(__mips64) | |
43 # define ARCH_MIPS64 | |
44 #elif defined(_M_MRX000) || defined(__mips__) || defined(__mips) || defined(_mips) | |
45 # define ARCH_MIPS | |
46 #elif defined(__arm__) | |
47 # define ARCH_ARM | |
48 # if defined(__thumb__) | |
49 # define ARCH_THUMB | |
50 # endif | |
51 #elif defined(__sh__) | |
52 # define ARCH_SH | |
53 #elif defined(__sparcv9) || defined(__sparc64__) || ( defined(__sparc) && defined(__arch64__) ) | |
54 # define ARCH_SPARC64 | |
55 #elif defined(__sparc) | |
56 # define ARCH_SPARC | |
57 #endif | |
58 | |
59 #endif /* AUTOVAR_ARCH_H */ |