diff options
author | 2019-03-26 11:13:37 +1100 | |
---|---|---|
committer | 2019-03-26 11:13:37 +1100 | |
commit | 97b67170277437131adf6ed4d60139c172529e4f (patch) | |
tree | 7a5cbf608f191075f1612b1af15832c206a3fe2d /src/lib/netlist/plib/pconfig.h | |
parent | b380514764cf857469bae61c11143a19f79a74c5 (diff) |
(nw) Clean up the mess on master
This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and
c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at
598cd5227223c3b04ca31f0dbc1981256d9ea3ff.
Before pushing, please check that what you're about to push is sane.
Check your local commit log and ensure there isn't anything out-of-place
before pushing to mainline. When things like this happen, it wastes
everyone's time. I really don't need this in a week when real work⢠is
busting my balls and I'm behind where I want to be with preparing for
MAME release.
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 //============================================================ |