mirror of
https://github.com/google/benchmark.git
synced 2025-04-17 23:12:30 +08:00
Add CycleTimer implementation for M68K architecture (#1050)
As per discussions in here [1], LLVM is going to get backend support on Motorola 68000 series CPUs (a.k.a M68K or M680x0). So it's necessary to add CycleTimer implementation here, which is simply using `gettimeofday` same as MIPS. This fixes #1049 [1] https://reviews.llvm.org/D88389
This commit is contained in:
parent
2d9bfe1ef8
commit
ffe1342eb2
1
AUTHORS
1
AUTHORS
@ -55,3 +55,4 @@ Stripe, Inc.
|
||||
Yixuan Qiu <yixuanq@gmail.com>
|
||||
Yusuke Suzuki <utatane.tea@gmail.com>
|
||||
Zbigniew Skowron <zbychs@gmail.com>
|
||||
Min-Yih Hsu <yihshyng223@gmail.com>
|
||||
|
@ -77,3 +77,4 @@ Tom Madams <tom.ej.madams@gmail.com> <tmadams@google.com>
|
||||
Yixuan Qiu <yixuanq@gmail.com>
|
||||
Yusuke Suzuki <utatane.tea@gmail.com>
|
||||
Zbigniew Skowron <zbychs@gmail.com>
|
||||
Min-Yih Hsu <yihshyng223@gmail.com>
|
||||
|
@ -161,7 +161,7 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, nullptr);
|
||||
return static_cast<int64_t>(tv.tv_sec) * 1000000 + tv.tv_usec;
|
||||
#elif defined(__mips__)
|
||||
#elif defined(__mips__) || defined(__m68k__)
|
||||
// mips apparently only allows rdtsc for superusers, so we fall
|
||||
// back to gettimeofday. It's possible clock_gettime would be better.
|
||||
struct timeval tv;
|
||||
|
Loading…
Reference in New Issue
Block a user