Subversion Repositories QNX 8.QNX8 IFS tool

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
26 pmbaty 1
/* ACC -- Automatic Compiler Configuration
2
 
3
   Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
4
   All Rights Reserved.
5
 
6
   This software is a copyrighted work licensed under the terms of
7
   the GNU General Public License. Please consult the file "ACC_LICENSE"
8
   for details.
9
 
10
   Markus F.X.J. Oberhumer
11
   <markus@oberhumer.com>
12
   http://www.oberhumer.com/
13
 */
14
 
15
 
16
/*
17
 * CPU architecture - exactly one of:
18
 *
19
 *   ACC_ARCH_UNKNOWN       [default]
20
 *   ACC_ARCH_ALPHA
21
 *   ACC_ARCH_AMD64         aka x86-64 or ia32e
22
 *   ACC_ARCH_C166
23
 *   ACC_ARCH_IA16          Intel Architecture (8088, 8086, 80186, 80286)
24
 *   ACC_ARCH_IA32          Intel Architecture (80386+)
25
 *   ACC_ARCH_IA64          Intel Architecture (Itanium)
26
 *   ACC_ARCH_M68K          Motorola 680x0
27
 *   ACC_ARCH_MCS251
28
 *   ACC_ARCH_MCS51
29
 *   ACC_ARCH_PPC64         Power PC
30
 *   ACC_ARCH_SPARC64
31
 *
32
 * Optionally define one of:
33
 *   ACC_ENDIAN_LITTLE_ENDIAN
34
 *   ACC_ENDIAN_BIG_ENDIAN
35
 *
36
 * Note that this list is not exhaustive - actually we only really care
37
 * about architectures which allow unaligned memory access at reasonable
38
 * speed (for the moment this means IA16, IA32 and AMD64).
39
 */
40
 
41
#if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
42
#  define ACC_ARCH_IA16             1
43
#  define ACC_INFO_ARCH             "ia16"
44
#elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)
45
#  define ACC_ARCH_AMD64            1
46
#  define ACC_INFO_ARCH             "amd64"
47
#elif (UINT_MAX <= ACC_0xffffL) && defined(__AVR__)
48
#  define ACC_ARCH_AVR              1
49
#  define ACC_INFO_ARCH             "avr"
50
#elif (UINT_MAX == ACC_0xffffL) && defined(__C166__)
51
#  define ACC_ARCH_C166             1
52
#  define ACC_INFO_ARCH             "c166"
53
#elif (UINT_MAX == ACC_0xffffL) && defined(__C251__)
54
#  define ACC_ARCH_MCS251           1
55
#  define ACC_INFO_ARCH             "mcs-251"
56
#elif (UINT_MAX == ACC_0xffffL) && defined(__C51__)
57
#  define ACC_ARCH_MCS51            1
58
#  define ACC_INFO_ARCH             "mcs-51"
59
#elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386)
60
#  define ACC_ARCH_IA32             1
61
#  define ACC_INFO_ARCH             "ia32"
62
#elif (ACC_CC_ZORTECHC && defined(__I86__))
63
#  define ACC_ARCH_IA32             1
64
#  define ACC_INFO_ARCH             "ia32"
65
#elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64)
66
#  define ACC_ARCH_IA64             1
67
#  define ACC_INFO_ARCH             "ia64"
68
#elif (ACC_OS_DOS32 && ACC_CC_HIGHC) && defined(_I386)
69
#  define ACC_ARCH_IA32             1
70
#  define ACC_INFO_ARCH             "ia32"
71
#elif (ACC_OS_DOS32 || ACC_OS_OS2)
72
#  error "missing define for CPU architecture"
73
#elif (ACC_OS_WIN32)
74
#  error "missing define for CPU architecture"
75
#elif (ACC_OS_WIN64)
76
/* #  error "missing define for CPU architecture" */
77
#elif (ACC_OS_TOS) || defined(__m68000__)
78
#  define ACC_ARCH_M68K             1
79
#  define ACC_INFO_ARCH             "m68k"
80
#elif defined(__alpha__) || defined(__alpha)
81
#  define ACC_ARCH_ALPHA            1
82
#  define ACC_INFO_ARCH             "alpha"
83
#elif defined(__ppc64__) || defined(__ppc64)
84
#  define ACC_ARCH_PPC64            1
85
#  define ACC_INFO_ARCH             "ppc64"
86
#elif defined(__sparc64__) || defined(__sparc64)
87
#  define ACC_ARCH_SPARC64          1
88
#  define ACC_INFO_ARCH             "sparc64"
89
#else
90
#  define ACC_ARCH_UNKNOWN          1
91
#  define ACC_INFO_ARCH             "unknown"
92
#endif
93
 
94
 
95
#if (ACC_ARCH_AMD64 || ACC_ARCH_IA16 || ACC_ARCH_IA32)
96
#  define ACC_ENDIAN_LITTLE_ENDIAN  1
97
#  define ACC_INFO_ENDIAN           "little-endian"
98
#elif (ACC_ARCH_M68K)
99
#  define ACC_ENDIAN_BIG_ENDIAN     1
100
#  define ACC_INFO_ENDIAN           "big-endian"
101
#endif
102
 
103
 
104
#if (ACC_ARCH_IA16)
105
#  if (UINT_MAX != ACC_0xffffL)
106
#    error "this should not happen"
107
#  endif
108
#  if (ULONG_MAX != ACC_0xffffffffL)
109
#    error "this should not happen"
110
#  endif
111
#endif
112
#if (ACC_ARCH_IA32)
113
#  if (UINT_MAX != ACC_0xffffffffL)
114
#    error "this should not happen"
115
#  endif
116
#  if (ULONG_MAX != ACC_0xffffffffL)
117
#    error "this should not happen"
118
#  endif
119
#endif
120
 
121
 
122
/*
123
vi:ts=4:et
124
*/