From cc24a339d8c0517259084b5c178d784626ba965c Mon Sep 17 00:00:00 2001 From: ImJezze Date: Sun, 21 Feb 2016 11:48:45 +0100 Subject: Merge remote-tracking branch 'refs/remotes/mamedev/master' Second attempt --- benchmarks/eminline_noasm.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 benchmarks/eminline_noasm.cpp (limited to 'benchmarks/eminline_noasm.cpp') diff --git a/benchmarks/eminline_noasm.cpp b/benchmarks/eminline_noasm.cpp new file mode 100644 index 00000000000..43c9e36b020 --- /dev/null +++ b/benchmarks/eminline_noasm.cpp @@ -0,0 +1,24 @@ +// license:BSD-3-Clause +// copyright-holders:Miodrag Milanovic + +#include "benchmark/benchmark_api.h" +#include +#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); -- cgit v1.2.3-70-g09d2