summaryrefslogblamecommitdiffstatshomepage
path: root/benchmarks/eminline_noasm.cpp
blob: 0344f074c01e8e3eff7e505ceba0864972496b04 (plain) (tree)




















                                                                   
#include "benchmark/benchmark_api.h"
#include <time.h>
#include "osdcore.h"
#include "osdcomm.h"
#define MAME_NOASM 1
osd_ticks_t osd_ticks(void)
{
	// use the standard library clock function
	return clock();
}
#include "eminline.h"

static void BM_count_leading_zeros_noasm(benchmark::State& state) {
	UINT32 cnt = 0x332533;
	while (state.KeepRunning()) {
		(void)count_leading_zeros(cnt);
		cnt++;
	}
}
// Register the function as a benchmark
BENCHMARK(BM_count_leading_zeros_noasm);