1、Itanium
A.K.A.: IA64
Developer: Intel
Processors: Itanium, Itanium 2, Itanium 2 9000/9100/9300, etc.
代码:
#if defined(__ia64) || defined(__itanium__) || defined(_M_IA64)
/* Itanium -------------------------------------------------- */
#endif
2、POWER
A.K.A.: PowerPC
Developer: IBM, Freescale
Processors: PowerPC, POWER 1/2/3/4/5/6/7, G1, G2, G3, G4, G5, etc.
代码:
#if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__)
/* POWER ---------------------------------------------------- */
#if defined(__powerpc64__) || defined(__ppc64__) || defined(__PPC64__) || \
defined(__64BIT__) || defined(_LP64) || defined(__LP64__)
/* POWER 64-bit --------------------------------------------- */
#else
/* POWER 32-bit --------------------------------------------- */
#endif
#endif
3、SPARC
Developer: Oracle, Fujitsu, Sun
Processors: UltraSPARC I/II/III/IV/T1/T2, SPARC T3/T4, etc.
代码:
#if defined(__sparc)
/* SPARC ---------------------------------------------------- */
#endif
4、x86、x86-64
A.K.A. (32-bit): IA-32, i386, x86, x86-32
A.K.A. (64-bit): AMD64, EM64T, IA-32e, Intel64, x64, x86-64
Developers: AMD, Intel
Processors: Athlon, Atom, Core, Core 2, Core i3/i5/i7, Opteron, Pentium, Phenom, Sempron, Turion, etc.
代码:
#if defined(__x86_64__) || defined(_M_X64)
/* x86 64-bit ----------------------------------------------- */
#elif defined(__i386) || defined(_M_IX86)
/* x86 32-bit ----------------------------------------------- */
#endif