[x264-devel] x86-32: use simple nop codes for <= sse

Ronald S. Bultje git at videolan.org
Wed Feb 27 00:18:02 CET 2013


x264 | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Wed Jan 30 09:48:14 2013 -0800| [ba5ce76f7506b5f3d083a9eda8c4705e192f15ff] | committer: Jason Garrett-Glaser

x86-32: use simple nop codes for <= sse

The "CentaurHauls family 6 model 9 stepping 8" family of CPUs (flags:
fpu vme de pse tsc msr cx8 sep mtrr pge mov pat mmx fxsr sse up rng
rng_en ace ace_en) SIGILLs on long nop codes.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=ba5ce76f7506b5f3d083a9eda8c4705e192f15ff
---

 common/x86/x86inc.asm |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/common/x86/x86inc.asm b/common/x86/x86inc.asm
index f45bdb4..153883c 100644
--- a/common/x86/x86inc.asm
+++ b/common/x86/x86inc.asm
@@ -735,6 +735,7 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits
 ; All subsequent functions (up to the next INIT_CPUFLAGS) is built for the specified cpu.
 ; You shouldn't need to invoke this macro directly, it's a subroutine for INIT_MMX &co.
 %macro INIT_CPUFLAGS 0-2
+    CPU amdnop
     %if %0 >= 1
         %xdefine cpuname %1
         %assign cpuflags cpuflags_%1
@@ -756,6 +757,9 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits
         %elifidn %1, sse3
             %define movu lddqu
         %endif
+        %if ARCH_X86_64 == 0 && notcpuflag(sse2)
+            CPU basicnop
+        %endif
     %else
         %xdefine SUFFIX
         %undef cpuname



More information about the x264-devel mailing list