mirror of
https://github.com/isar/libmdbx.git
synced 2025-10-06 01:02:20 +08:00
mdbx: add neutral __ia32__ and __amd64__ marcos.
This commit is contained in:
@@ -127,6 +127,7 @@ bool hex2data(const char *hex_begin, const char *hex_end, void *ptr,
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/* TODO: replace my 'libmera' fomr t1ha. */
|
||||
uint64_t entropy_ticks(void) {
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#if defined(__ia64__)
|
||||
@@ -165,8 +166,7 @@ uint64_t entropy_ticks(void) {
|
||||
#endif /* arch selector */
|
||||
#endif /* __GNUC__ || __clang__ */
|
||||
|
||||
#if defined(__e2k__) || defined(__elbrus__) || defined(_M_IX86) || \
|
||||
defined(_M_X64) || defined(__x86_64__) || defined(__i386__)
|
||||
#if defined(__e2k__) || defined(__ia32__)
|
||||
return __rdtsc();
|
||||
#elif defined(_WIN32) || defined(_WIN64) || defined(_WINDOWS)
|
||||
LARGE_INTEGER PerformanceCount;
|
||||
|
@@ -274,7 +274,7 @@ static __inline void memory_barrier(void) {
|
||||
#elif defined(__INTEL_COMPILER) /* LY: Intel Compiler may mimic GCC and MSC */
|
||||
#if defined(__ia64__) || defined(__ia64) || defined(_M_IA64)
|
||||
__mf();
|
||||
#elif defined(__i386__) || defined(__x86_64__)
|
||||
#elif defined(__ia32__)
|
||||
_mm_mfence();
|
||||
#else
|
||||
#error "Unknown target for Intel Compiler, please report to us."
|
||||
@@ -293,8 +293,7 @@ static __inline void memory_barrier(void) {
|
||||
}
|
||||
|
||||
static __inline void cpu_relax() {
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || \
|
||||
defined(_M_X64)
|
||||
#if defined(__ia32__)
|
||||
_mm_pause();
|
||||
#elif defined(_WIN32) || defined(_WIN64) || defined(_WINDOWS) || \
|
||||
defined(YieldProcessor)
|
||||
|
Reference in New Issue
Block a user