summaryrefslogtreecommitdiffstatshomepage
path: root/benchmarks/eminline_noasm.cpp
blob: 43c9e36b02027f0d92128fb26cc87cf9f093ceae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// license:BSD-3-Clause
// copyright-holders:Miodrag Milanovic

#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);