From: Jason Garrett-Glaser Date: Mon, 18 Jan 2010 23:50:06 +0000 (-0800) Subject: Fix crash on new AMD M300 and similar CPUs X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=bef4e3e601970c9bfd0c94d6621f100cf015e1f8;p=x264.git Fix crash on new AMD M300 and similar CPUs Apparently these CPUs have SSE4a, but not misaligned SSE. --- diff --git a/common/cpu.c b/common/cpu.c index 8bfd21f8..2715652b 100644 --- a/common/cpu.c +++ b/common/cpu.c @@ -143,13 +143,17 @@ uint32_t x264_cpu_detect( void ) if( ecx&0x00000040 ) /* SSE4a */ { cpu |= X264_CPU_SSE2_IS_FAST; - cpu |= X264_CPU_SSE_MISALIGN; cpu |= X264_CPU_LZCNT; cpu |= X264_CPU_SHUFFLE_IS_FAST; - x264_cpu_mask_misalign_sse(); } else cpu |= X264_CPU_SSE2_IS_SLOW; + + if( ecx&0x00000080 ) /* Misalign SSE */ + { + cpu |= X264_CPU_SSE_MISALIGN; + x264_cpu_mask_misalign_sse(); + } } }