diff options
Diffstat (limited to 'src/lib/netlist/plib/pconfig.h')
-rw-r--r-- | src/lib/netlist/plib/pconfig.h | 51 |
1 files changed, 38 insertions, 13 deletions
diff --git a/src/lib/netlist/plib/pconfig.h b/src/lib/netlist/plib/pconfig.h index 0200c305ecd..d66b342f815 100644 --- a/src/lib/netlist/plib/pconfig.h +++ b/src/lib/netlist/plib/pconfig.h @@ -21,18 +21,46 @@ * if PHAS_RDTSCP == 1 */ #ifndef PUSE_ACCURATE_STATS -#define PUSE_ACCURATE_STATS (1) +#define PUSE_ACCURATE_STATS (0) #endif /* * Set this to one if you want to use 128 bit int for ptime. - * This is for tests only. + * This is about 5% slower on a kaby lake processor. */ #ifndef PHAS_INT128 #define PHAS_INT128 (0) #endif +/* + * Set this to one if you want to use aligned storage optimizations. + */ + +#ifndef USE_ALIGNED_OPTIMIZATIONS +#define USE_ALIGNED_OPTIMIZATIONS (0) +#endif + +#define USE_ALIGNED_ALLOCATION (USE_ALIGNED_OPTIMIZATIONS) +#define USE_ALIGNED_HINTS (USE_ALIGNED_OPTIMIZATIONS) +/* + * Standard alignment macros + */ + +#define PALIGN_CACHELINE (64) +#define PALIGN_VECTOROPT (64) + +#define PALIGNAS_CACHELINE() PALIGNAS(PALIGN_CACHELINE) +#define PALIGNAS_VECTOROPT() PALIGNAS(PALIGN_VECTOROPT) + +/* Breaks mame build on windows due to -Wattribute + * FIXME: no error on cross-compile - need further checks */ +#if defined(_WIN32) && defined(__GNUC__) +#define PALIGNAS(x) +#else +#define PALIGNAS(x) alignas(x) +#endif + /*============================================================ * Check for CPP Version * @@ -47,6 +75,13 @@ * *============================================================*/ +#ifndef NVCCBUILD +#define NVCCBUILD (0) +#endif + +#if NVCCBUILD +#define C14CONSTEXPR +#else #if __cplusplus == 201103L #define C14CONSTEXPR #elif __cplusplus == 201402L @@ -58,6 +93,7 @@ #else #error "C++ version not supported" #endif +#endif #ifndef PHAS_INT128 #define PHAS_INT128 (0) @@ -68,17 +104,6 @@ typedef __uint128_t UINT128; typedef __int128_t INT128; #endif -#if defined(__GNUC__) -#ifdef RESTRICT -#undef RESTRICT -#endif -#define RESTRICT __restrict__ -#define ATTR_UNUSED __attribute__((__unused__)) -#else -#define RESTRICT -#define ATTR_UNUSED -#endif - //============================================================ // Standard defines //============================================================ |