Added 32-bit/64-bit architecture macro.

This commit is contained in:
bkaradzic
2012-05-31 19:28:19 -07:00
parent 9e19969b27
commit 5fa567a871

View File

@@ -20,6 +20,9 @@
#define BX_CPU_PPC 0
#define BX_CPU_X86 0
#define BX_ARCH_32BIT 0
#define BX_ARCH_64BIT 0
#define BX_CPU_ENDIAN_BIG 0
#define BX_CPU_ENDIAN_LITTLE 0
@@ -75,6 +78,14 @@
# define BX_CACHE_LINE_SIZE 64
#endif //
#if defined(__x86_64__) || defined(_M_X64) || defined(__64BIT__) || defined(__powerpc64__) || defined(__ppc64__)
# undef BX_ARCH_64BIT
# define BX_ARCH_64BIT 1
#else
# undef BX_ARCH_32BIT
# define BX_ARCH_32BIT 1
#endif //
#if BX_CPU_PPC
# undef BX_CPU_ENDIAN_BIG
# define BX_CPU_ENDIAN_BIG 1