Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
docs: change code blocks from "shell" to "console"
[vpp.git]
/
src
/
vppinfra
/
time.h
diff --git
a/src/vppinfra/time.h
b/src/vppinfra/time.h
index
39bc188
..
ced9677
100644
(file)
--- a/
src/vppinfra/time.h
+++ b/
src/vppinfra/time.h
@@
-174,6
+174,16
@@
clib_cpu_time_now (void)
return ((u64) h << 32) | l;
}
return ((u64) h << 32) | l;
}
+#elif defined(_mips) && __mips == 64
+
+always_inline u64
+clib_cpu_time_now (void)
+{
+ u64 result;
+ asm volatile ("rdhwr %0,$31\n":"=r" (result));
+ return result;
+}
+
#else
#error "don't know how to read CPU time stamp"
#else
#error "don't know how to read CPU time stamp"