]> git.videolan.org Git - x264.git/commitdiff
x86-32: use simple nop codes for <= sse
authorRonald S. Bultje <rsbultje@gmail.com>
Wed, 30 Jan 2013 17:48:14 +0000 (09:48 -0800)
committerJason Garrett-Glaser <jason@x264.com>
Mon, 25 Feb 2013 20:14:04 +0000 (12:14 -0800)
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.

common/x86/x86inc.asm

index f45bdb4ec64b2b17852897daf9a2330d1b60d610..153883cd14eaa1b513ec72ef0c8cfc502397ffc7 100644 (file)
@@ -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