1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00
FFmpeg/libavutil/x86
Henrik Gramner d1a6cb195f x86: Serialize rdtsc in read_time()
Improves the accuracy of measurements, especially in short sections.

To quote the Intel 64 and IA-32 Architectures Software Developer's Manual:
"The RDTSC instruction is not a serializing instruction. It does not necessarily
wait until all previous instructions have been executed before reading the counter.
Similarly, subsequent instructions may begin execution before the read operation
is performed. If software requires RDTSC to be executed only after all previous
instructions have completed locally, it can either use RDTSCP (if the processor
supports that instruction) or execute the sequence LFENCE;RDTSC."

SSE2 is a requirement for lfence so only use it on SSE2-capable systems.
Prefer lfence;rdtsc over rdtscp since rdtscp is supported on fewer systems.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-09 00:10:13 +02:00
..
asm.h
bswap.h
cpu.c x86: add AV_CPU_FLAG_AVXSLOW flag 2015-05-31 12:07:11 +02:00
cpu.h x86: Add helper macros to check for slow cpuflags 2015-05-31 12:07:11 +02:00
cpuid.asm Update Fiona's name in copyright statements. 2014-07-01 03:26:51 -07:00
emms.asm
emms.h
float_dsp_init.c x86: check for AV_CPU_FLAG_AVXSLOW where useful 2015-05-31 12:07:11 +02:00
float_dsp.asm x86: float dsp: unroll SSE versions 2014-02-20 14:18:05 +01:00
intreadwrite.h
lls_init.c x86: check for AV_CPU_FLAG_AVXSLOW where useful 2015-05-31 12:07:11 +02:00
lls.asm lls/x86: use 3-operator vaddpd in ADDPD_MEM 2013-07-02 10:15:09 +02:00
Makefile x86: lpc: simd av_update_lls 2013-06-29 13:23:57 +02:00
timer.h x86: Serialize rdtsc in read_time() 2015-07-09 00:10:13 +02:00
w64xmmtest.h
x86inc.asm x86inc: Clear __SECT__ 2015-05-28 11:40:15 +02:00
x86util.asm v210enc: Add SIMD optimised 8-bit and 10-bit encoders 2014-12-05 13:03:49 +00:00