Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
benchmark
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
benchmark
Commits
f90215f1
Unverified
Commit
f90215f1
authored
Jun 08, 2021
by
huajingyun
Committed by
GitHub
Jun 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for new architecture loongarch (#1173)
parent
34240912
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
cycleclock.h
src/cycleclock.h
+4
-0
No files found.
src/cycleclock.h
View file @
f90215f1
...
@@ -173,6 +173,10 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
...
@@ -173,6 +173,10 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
struct
timeval
tv
;
struct
timeval
tv
;
gettimeofday
(
&
tv
,
nullptr
);
gettimeofday
(
&
tv
,
nullptr
);
return
static_cast
<
int64_t
>
(
tv
.
tv_sec
)
*
1000000
+
tv
.
tv_usec
;
return
static_cast
<
int64_t
>
(
tv
.
tv_sec
)
*
1000000
+
tv
.
tv_usec
;
#elif defined(__loongarch__)
struct
timeval
tv
;
gettimeofday
(
&
tv
,
nullptr
);
return
static_cast
<
int64_t
>
(
tv
.
tv_sec
)
*
1000000
+
tv
.
tv_usec
;
#elif defined(__s390__) // Covers both s390 and s390x.
#elif defined(__s390__) // Covers both s390 and s390x.
// Return the CPU clock.
// Return the CPU clock.
uint64_t
tsc
;
uint64_t
tsc
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment