fixed benchmarks build and cleanup U64 and S64 macro definition, it is now in standard (nw)

This commit is contained in:
Miodrag Milanovic 2016-10-22 14:32:36 +02:00
parent ab9fd24fbb
commit 346a42383e
3 changed files with 2 additions and 10 deletions

View File

@ -3,7 +3,7 @@
#include "osdcore.h"
#include "eminline.h"
static void BM_count_leading_zeros_native(benchmark::State& state) {
UINT32 cnt = 0x332533;
uint32_t cnt = 0x332533;
while (state.KeepRunning()) {
(void)count_leading_zeros(cnt);
cnt++;

View File

@ -11,7 +11,7 @@ osd_ticks_t osd_ticks(void)
#include "eminline.h"
static void BM_count_leading_zeros_noasm(benchmark::State& state) {
UINT32 cnt = 0x332533;
uint32_t cnt = 0x332533;
while (state.KeepRunning()) {
(void)count_leading_zeros(cnt);
cnt++;

View File

@ -89,21 +89,13 @@ using std::int64_t;
#define FALSE 0
#endif
/***************************************************************************
FUNDAMENTAL MACROS
***************************************************************************/
/* U64 and S64 are used to wrap long integer constants. */
#if defined(__GNUC__) || defined(_MSC_VER)
#define U64(val) val##ULL
#define S64(val) val##LL
#else
#define U64(val) val
#define S64(val) val
#endif
/* Concatenate/extract 32-bit halves of 64-bit values */
constexpr uint64_t concat_64(uint32_t hi, uint32_t lo) { return (uint64_t(hi) << 32) | uint32_t(lo); }