Commit Graph

5 Commits

Author SHA1 Message Date
Martin Storsjö
7ec2354c38 x86: Remove inline MMX assembly that clobbers the FPU state
These inline implementations of AV_COPY64, AV_SWAP64 and AV_ZERO64
are known to clobber the FPU state - which has to be restored
with the 'emms' instruction afterwards.

This was known and signaled with the FF_COPY_SWAP_ZERO_USES_MMX
define, which calling code seems to have been supposed to check,
in order to call emms_c() after using them. See
0b1972d409,
29c4c0886d and
df215e5758 for history on earlier
fixes in the same area.

However, new code can use these AV_*64() macros without knowing
about the need to call emms_c().

Just get rid of these dangerous inline assembly snippets; this
doesn't make any difference for 64 bit architectures anyway.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-02-09 23:55:52 +02:00
Andreas Rheinhardt
29c4c0886d avutil/x86/intreadwrite: Add ability to detect whether MMX code is used
It can be used to call emms_c() only when needed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-11 21:08:04 +02:00
Måns Rullgård
2ed6f39944 Replace many includes of libavutil/common.h with what is actually needed
This reduces the number of false dependencies on header files and
speeds up compilation.

Originally committed as revision 22407 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-09 17:39:19 +00:00
Måns Rullgård
9c9a0840d0 Add lots of missing includes
Originally committed as revision 22337 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 18:43:52 +00:00
Alexander Strange
f6d0390657 Add macros for 64- and 128-bit write-combining optimization to intreadwrite.h.
Add x86 implementation using MMX/SSE.

Originally committed as revision 21281 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 10:24:33 +00:00