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 dsputil: Make dsputil selectable 2013-04-10 11:04:05 +03:00
bswap.h x86: place some inline asm under #if HAVE_INLINE_ASM 2012-06-25 13:23:12 +01:00
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 x86: Add a Yasm-based emms() replacement 2013-01-18 22:02:13 +01:00
emms.h avutil: Ensure that emms_c is always defined, even on non-x86 2013-02-14 19:29:04 +01:00
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 Replace FFmpeg with Libav in licence headers 2011-03-19 13:33:20 +00:00
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 Add more missing includes after removing the implicit common.h 2012-08-16 10:49:54 +03:00
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