Changeset View
Changeset View
Standalone View
Standalone View
libraries/source/nvtt/src/extern/poshlib/posh.h
Show First 20 Lines • Show All 200 Lines • ▼ Show 20 Lines | Metrowerks: | ||||
- __MC68K__ | - __MC68K__ | ||||
- macintosh when compiling for MacOS | - macintosh when compiling for MacOS | ||||
- __INTEL__ for x86 targets | - __INTEL__ for x86 targets | ||||
- __POWERPC__ | - __POWERPC__ | ||||
LLVM: | LLVM: | ||||
- __llvm__ | - __llvm__ | ||||
- __clang__ | - __clang__ | ||||
MCST LCC (eLbrus Compiler Collection): | |||||
- __LCC__ | |||||
- __MCST__ | |||||
- __e2k__: on MCST E2K (Elbrus 2000) processor platforms | |||||
- __sparc__ and __sparc: on MCST R (SPARC v9) processor platforms | |||||
*/ | */ | ||||
/* | /* | ||||
** ---------------------------------------------------------------------------- | ** ---------------------------------------------------------------------------- | ||||
** Include <limits.h> optionally | ** Include <limits.h> optionally | ||||
** ---------------------------------------------------------------------------- | ** ---------------------------------------------------------------------------- | ||||
*/ | */ | ||||
#ifdef POSH_USE_LIMITS_H | #ifdef POSH_USE_LIMITS_H | ||||
▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | |||||
# define POSH_COMPILER_DEC 1 | # define POSH_COMPILER_DEC 1 | ||||
#endif | #endif | ||||
#if defined __WATCOMC__ | #if defined __WATCOMC__ | ||||
# define POSH_COMPILER_STRING "Watcom C/C++" | # define POSH_COMPILER_STRING "Watcom C/C++" | ||||
# define POSH_COMPILER_WATCOM 1 | # define POSH_COMPILER_WATCOM 1 | ||||
#endif | #endif | ||||
#if defined __LCC__ && defined __MCST__ | |||||
# define POSH_COMPILER_STRING "MCST LCC" | |||||
# define POSH_COMPILER_MCST_LCC 1 | |||||
#endif | |||||
#if !defined POSH_COMPILER_STRING | #if !defined POSH_COMPILER_STRING | ||||
# define POSH_COMPILER_STRING "Unknown compiler" | # define POSH_COMPILER_STRING "Unknown compiler" | ||||
#endif | #endif | ||||
/* | /* | ||||
** ---------------------------------------------------------------------------- | ** ---------------------------------------------------------------------------- | ||||
** Determine target operating system | ** Determine target operating system | ||||
** ---------------------------------------------------------------------------- | ** ---------------------------------------------------------------------------- | ||||
▲ Show 20 Lines • Show All 237 Lines • ▼ Show 20 Lines | |||||
# define POSH_CPU_STRING "AXP" | # define POSH_CPU_STRING "AXP" | ||||
#endif | #endif | ||||
#if defined __hppa || defined hppa | #if defined __hppa || defined hppa | ||||
# define POSH_CPU_HPPA 1 | # define POSH_CPU_HPPA 1 | ||||
# define POSH_CPU_STRING "PA-RISC" | # define POSH_CPU_STRING "PA-RISC" | ||||
#endif | #endif | ||||
#if defined __e2k__ | |||||
# define POSH_CPU_E2K 1 | |||||
# define POSH_CPU_STRING "MCST E2K" | |||||
#endif | |||||
#if !defined POSH_CPU_STRING | #if !defined POSH_CPU_STRING | ||||
# error POSH cannot determine target CPU | # error POSH cannot determine target CPU | ||||
# define POSH_CPU_STRING "Unknown" /* this is here for Doxygen's benefit */ | # define POSH_CPU_STRING "Unknown" /* this is here for Doxygen's benefit */ | ||||
#endif | #endif | ||||
/* | /* | ||||
** ----------------------------------------------------------------------------- | ** ----------------------------------------------------------------------------- | ||||
** Attempt to autodetect building for embedded on Sony PS2 | ** Attempt to autodetect building for embedded on Sony PS2 | ||||
▲ Show 20 Lines • Show All 121 Lines • ▼ Show 20 Lines | |||||
** ---------------------------------------------------------------------------- | ** ---------------------------------------------------------------------------- | ||||
** Try to infer endianess. Basically we just go through the CPUs we know are | ** Try to infer endianess. Basically we just go through the CPUs we know are | ||||
** little endian, and assume anything that isn't one of those is big endian. | ** little endian, and assume anything that isn't one of those is big endian. | ||||
** As a sanity check, we also do this with operating systems we know are | ** As a sanity check, we also do this with operating systems we know are | ||||
** little endian, such as Windows. Some processors are bi-endian, such as | ** little endian, such as Windows. Some processors are bi-endian, such as | ||||
** the MIPS series, so we have to be careful about those. | ** the MIPS series, so we have to be careful about those. | ||||
** ---------------------------------------------------------------------------- | ** ---------------------------------------------------------------------------- | ||||
*/ | */ | ||||
#if defined POSH_CPU_X86 || defined POSH_CPU_AXP || defined POSH_CPU_STRONGARM || defined POSH_CPU_AARCH64 || defined POSH_OS_WIN32 || defined POSH_OS_WINCE || defined __MIPSEL__ || defined __ORDER_LITTLE_ENDIAN__ | #if defined POSH_CPU_X86 || defined POSH_CPU_AXP || defined POSH_CPU_STRONGARM || defined POSH_CPU_AARCH64 || defined POSH_CPU_E2K || defined POSH_OS_WIN32 || defined POSH_OS_WINCE || defined __MIPSEL__ || defined __ORDER_LITTLE_ENDIAN__ | ||||
# define POSH_ENDIAN_STRING "little" | # define POSH_ENDIAN_STRING "little" | ||||
# define POSH_LITTLE_ENDIAN 1 | # define POSH_LITTLE_ENDIAN 1 | ||||
#else | #else | ||||
# define POSH_ENDIAN_STRING "big" | # define POSH_ENDIAN_STRING "big" | ||||
# define POSH_BIG_ENDIAN 1 | # define POSH_BIG_ENDIAN 1 | ||||
#endif | #endif | ||||
#if defined FORCE_DOXYGEN | #if defined FORCE_DOXYGEN | ||||
Show All 11 Lines | |||||
** ---------------------------------------------------------------------------- | ** ---------------------------------------------------------------------------- | ||||
** 64-bit Integer | ** 64-bit Integer | ||||
** | ** | ||||
** We don't require 64-bit support, nor do we emulate its functionality, we | ** We don't require 64-bit support, nor do we emulate its functionality, we | ||||
** simply export it if it's available. Since we can't count on <limits.h> | ** simply export it if it's available. Since we can't count on <limits.h> | ||||
** for 64-bit support, we ignore the POSH_USE_LIMITS_H directive. | ** for 64-bit support, we ignore the POSH_USE_LIMITS_H directive. | ||||
** ---------------------------------------------------------------------------- | ** ---------------------------------------------------------------------------- | ||||
*/ | */ | ||||
#if defined ( __LP64__ ) || defined ( __powerpc64__ ) || defined POSH_CPU_SPARC64 | #if defined ( __LP64__ ) || defined ( __powerpc64__ ) || defined POSH_CPU_SPARC64 || defined POSH_CPU_E2K | ||||
# define POSH_64BIT_INTEGER 1 | # define POSH_64BIT_INTEGER 1 | ||||
typedef long posh_i64_t; | typedef long posh_i64_t; | ||||
typedef unsigned long posh_u64_t; | typedef unsigned long posh_u64_t; | ||||
# define POSH_I64( x ) ((posh_i64_t)x) | # define POSH_I64( x ) ((posh_i64_t)x) | ||||
# define POSH_U64( x ) ((posh_u64_t)x) | # define POSH_U64( x ) ((posh_u64_t)x) | ||||
# define POSH_I64_PRINTF_PREFIX "l" | # define POSH_I64_PRINTF_PREFIX "l" | ||||
#elif defined _MSC_VER || defined __BORLANDC__ || defined __WATCOMC__ || ( defined __alpha && defined __DECC ) | #elif defined _MSC_VER || defined __BORLANDC__ || defined __WATCOMC__ || ( defined __alpha && defined __DECC ) | ||||
# define POSH_64BIT_INTEGER 1 | # define POSH_64BIT_INTEGER 1 | ||||
▲ Show 20 Lines • Show All 152 Lines • ▼ Show 20 Lines | |||||
#if defined POSH_CPU_AXP && ( defined POSH_OS_TRU64 || defined POSH_OS_LINUX ) | #if defined POSH_CPU_AXP && ( defined POSH_OS_TRU64 || defined POSH_OS_LINUX ) | ||||
# define POSH_64BIT_POINTER 1 | # define POSH_64BIT_POINTER 1 | ||||
#endif | #endif | ||||
#if defined POSH_CPU_X86_64 && defined POSH_OS_LINUX | #if defined POSH_CPU_X86_64 && defined POSH_OS_LINUX | ||||
# define POSH_64BIT_POINTER 1 | # define POSH_64BIT_POINTER 1 | ||||
#endif | #endif | ||||
#if defined POSH_CPU_SPARC64 || defined POSH_OS_WIN64 || defined __64BIT__ || defined __LP64 || defined _LP64 || defined __LP64__ || defined _ADDR64 || defined _CRAYC | #if defined POSH_CPU_SPARC64 || defined POSH_CPU_E2K || defined POSH_OS_WIN64 || defined __64BIT__ || defined __LP64 || defined _LP64 || defined __LP64__ || defined _ADDR64 || defined _CRAYC | ||||
# define POSH_64BIT_POINTER 1 | # define POSH_64BIT_POINTER 1 | ||||
#endif | #endif | ||||
#if defined POSH_64BIT_POINTER | #if defined POSH_64BIT_POINTER | ||||
POSH_COMPILE_TIME_ASSERT( posh_64bit_pointer, sizeof( void * ) == 8 ); | POSH_COMPILE_TIME_ASSERT( posh_64bit_pointer, sizeof( void * ) == 8 ); | ||||
#elif !defined FORCE_DOXYGEN | #elif !defined FORCE_DOXYGEN | ||||
/* if this assertion is hit then you're on a system that either has 64-bit | /* if this assertion is hit then you're on a system that either has 64-bit | ||||
addressing and we didn't catch it, or you're on a system with 16-bit | addressing and we didn't catch it, or you're on a system with 16-bit | ||||
▲ Show 20 Lines • Show All 149 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator