changeset 121:69714d5e1561 libavutil

Protect code that uses CMOV instructions with HAVE_CMOV, Make configure set CMOV_IS_FAST on arches on which cmov has a low latency (typically non-Netburst based processor)
author gpoirier
date Fri, 20 Oct 2006 17:53:19 +0000
parents f42a6347df1d
children 82d8cdd0191c
files common.h internal.h
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/common.h	Wed Oct 11 23:17:58 2006 +0000
+++ b/common.h	Fri Oct 20 17:53:19 2006 +0000
@@ -238,7 +238,7 @@
 /* median of 3 */
 static inline int mid_pred(int a, int b, int c)
 {
-#if (defined(ARCH_X86) && __CPU__ >= 686 || defined(ARCH_X86_64)) && !defined(RUNTIME_CPUDETECT)
+#if HAVE_CMOV
     int i=b;
     asm volatile(
         "cmp    %2, %1 \n\t"
--- a/internal.h	Wed Oct 11 23:17:58 2006 +0000
+++ b/internal.h	Fri Oct 20 17:53:19 2006 +0000
@@ -168,7 +168,7 @@
             level= (level^mask)-mask;
 #endif
 
-#if __CPU__ >= 686 && !defined(RUNTIME_CPUDETECT)
+#ifdef HAVE_CMOV
 #define COPY3_IF_LT(x,y,a,b,c,d)\
 asm volatile (\
     "cmpl %0, %3        \n\t"\