Skip to content

Commit f3a8307

Browse files
committed
[test-suite] Add C-SKY Support in benchmark
Use gettimeofday to get the number of cycles since power-on in CSKY backend. Differential Revision: https://reviews.llvm.org/D100926
1 parent 19d530e commit f3a8307

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MicroBenchmarks/libs/benchmark/src/cycleclock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
173173
struct timeval tv;
174174
gettimeofday(&tv, nullptr);
175175
return static_cast<int64_t>(tv.tv_sec) * 1000000 + tv.tv_usec;
176-
#elif defined(__loongarch__)
176+
#elif defined(__loongarch__) || defined(__csky__)
177177
struct timeval tv;
178178
gettimeofday(&tv, nullptr);
179179
return static_cast<int64_t>(tv.tv_sec) * 1000000 + tv.tv_usec;

0 commit comments

Comments
 (0)