ffmpeg/libavutil
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
..
aarch64
arm
avr32
bfin
mips
ppc
sh4
tomi
x86
Makefile
adler32.c
adler32.h
aes.c
aes.h
atomic.c
atomic.h
atomic_gcc.h
atomic_suncc.h
atomic_win32.h
attributes.h
audio_fifo.c
audio_fifo.h
audioconvert.h
avassert.h
avstring.c
avstring.h
avutil.h
base64.c
base64.h
blowfish.c
blowfish.h
bswap.h
buffer.c
buffer.h
buffer_internal.h
channel_layout.c
channel_layout.h
colorspace.h
common.h
cpu.c
cpu.h
cpu_internal.h
crc.c
crc.h
des.c
des.h
dict.c
dict.h
display.c
display.h
downmix_info.c
downmix_info.h
error.c
error.h
eval.c
eval.h
fifo.c
fifo.h
file.c
file.h
file_open.c
float_dsp.c
float_dsp.h
frame.c
frame.h
hmac.c
hmac.h
imgutils.c
imgutils.h
internal.h
intfloat.h
intmath.c
intmath.h
intreadwrite.h
lfg.c
lfg.h
libavutil.v
libm.h
lls.c
lls.h
log.c
log.h
log2_tab.c
lzo.c
lzo.h
macros.h
mathematics.c
mathematics.h
md5.c
md5.h
mem.c
mem.h
old_pix_fmts.h
opt.c
opt.h
parseutils.c
parseutils.h
pixdesc.c
pixdesc.h
pixfmt.h
random_seed.c
random_seed.h
rational.c
rational.h
rc4.c
rc4.h
replaygain.h
samplefmt.c
samplefmt.h
sha.c
sha.h
stereo3d.c
stereo3d.h
thread.h
time.c
time.h
time_internal.h
timer.h
tree.c
tree.h
utils.c
version.h
wchar_filename.h
xtea.c
xtea.h