Skip to content

Commit

Permalink
Add loongarch64 support in toku_time
Browse files Browse the repository at this point in the history
  • Loading branch information
qiangxuhui authored and rschu1ze committed Jul 13, 2024
1 parent 36dbb33 commit 4fc59e2
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ static inline tokutime_t toku_time_now(void) {
uint64_t cycles;
asm volatile("rdcycle %0" : "=r"(cycles));
return cycles;
#elif defined(__loongarch64)
uint64_t result;
asm volatile ("rdtime.d %0,$r0" : "=r" (result));
return result;
#else
#error No timer implementation for this platform
#endif
Expand Down

0 comments on commit 4fc59e2

Please sign in to comment.