Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
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
Linshizhi
ffmpeg.wasm-core
Commits
07b28702
Commit
07b28702
authored
Jul 07, 2012
by
Ronald S. Bultje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86/timer: implement an intrinsic-based version for rdtsc (AV_READ_TIME).
parent
25b51b2c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
configure
configure
+3
-0
timer.h
libavutil/x86/timer.h
+8
-0
No files found.
configure
View file @
07b28702
...
@@ -1121,6 +1121,7 @@ HAVE_LIST="
...
@@ -1121,6 +1121,7 @@ HAVE_LIST="
netinet_sctp_h
netinet_sctp_h
poll_h
poll_h
posix_memalign
posix_memalign
rdtsc
round
round
roundf
roundf
sched_getaffinity
sched_getaffinity
...
@@ -2642,6 +2643,8 @@ check_cc <<EOF && enable inline_asm
...
@@ -2642,6 +2643,8 @@ check_cc <<EOF && enable inline_asm
void foo(void) { __asm__ volatile ("" ::); }
void foo(void) { __asm__ volatile ("" ::); }
EOF
EOF
check_code cc intrin.h
"__rdtsc()"
&&
enable
rdtsc
_restrict
=
_restrict
=
for
restrict_keyword
in
restrict __restrict__ __restrict
;
do
for
restrict_keyword
in
restrict __restrict__ __restrict
;
do
check_cc
<<
EOF
&& _restrict=
$restrict_keyword
&& break
check_cc
<<
EOF
&& _restrict=
$restrict_keyword
&& break
...
...
libavutil/x86/timer.h
View file @
07b28702
...
@@ -23,6 +23,8 @@
...
@@ -23,6 +23,8 @@
#include <stdint.h>
#include <stdint.h>
#if HAVE_INLINE_ASM
#define AV_READ_TIME read_time
#define AV_READ_TIME read_time
static
inline
uint64_t
read_time
(
void
)
static
inline
uint64_t
read_time
(
void
)
...
@@ -32,4 +34,10 @@ static inline uint64_t read_time(void)
...
@@ -32,4 +34,10 @@ static inline uint64_t read_time(void)
return
((
uint64_t
)
d
<<
32
)
+
a
;
return
((
uint64_t
)
d
<<
32
)
+
a
;
}
}
#elif HAVE_RDTSC
#define AV_READ_TIME __rdtsc
#endif
/* HAVE_INLINE_ASM */
#endif
/* AVUTIL_X86_TIMER_H */
#endif
/* AVUTIL_X86_TIMER_H */
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