From c0474786d6358580dd847dd5b3bfe7f2a5465ab1 Mon Sep 17 00:00:00 2001 From: Fiona Glaser Date: Mon, 18 Jan 2010 15:50:06 -0800 Subject: [PATCH] Fix crash on new AMD M300 and similar CPUs Apparently these CPUs have SSE4a, but not misaligned SSE. --- common/cpu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/cpu.c b/common/cpu.c index 757163d2..0f0bd781 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(); + } } } -- 2.40.0