Commit 7073e9fc authored by Måns Rullgård's avatar Måns Rullgård

rename CMOV_IS_FAST to HAVE_FAST_CMOV and simplify configure

Originally committed as revision 7729 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 1ac9331a
...@@ -480,6 +480,7 @@ HAVE_LIST=' ...@@ -480,6 +480,7 @@ HAVE_LIST='
dev_video_bktr_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h
dlfcn_h dlfcn_h
dlopen dlopen
fast_cmov
freetype2 freetype2
gprof gprof
imlib2 imlib2
...@@ -589,7 +590,7 @@ cpu="generic" ...@@ -589,7 +590,7 @@ cpu="generic"
powerpc_perf="no" powerpc_perf="no"
mmx="default" mmx="default"
cmov="no" cmov="no"
cmov_is_fast="no" fast_cmov="no"
armv5te="default" armv5te="default"
armv6="default" armv6="default"
iwmmxt="default" iwmmxt="default"
...@@ -1367,13 +1368,13 @@ if test $cpu != "generic"; then ...@@ -1367,13 +1368,13 @@ if test $cpu != "generic"; then
i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64|k8|opteron|athlon-fx|core2) i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64|k8|opteron|athlon-fx|core2)
add_cflags "-march=$cpu" add_cflags "-march=$cpu"
cmov="yes" cmov="yes"
cmov_is_fast="yes" fast_cmov="yes"
;; ;;
# targets that do support conditional mov but on which it's slow # targets that do support conditional mov but on which it's slow
pentium4|prescott|nocona) pentium4|prescott|nocona)
add_cflags "-march=$cpu" add_cflags "-march=$cpu"
cmov="yes" cmov="yes"
cmov_is_fast="no" fast_cmov="no"
;; ;;
sparc64) sparc64)
add_cflags "-mcpu=v9" add_cflags "-mcpu=v9"
...@@ -1859,7 +1860,7 @@ echo "big-endian $bigendian" ...@@ -1859,7 +1860,7 @@ echo "big-endian $bigendian"
if test $arch = "x86_32" -o $arch = "x86_64"; then if test $arch = "x86_32" -o $arch = "x86_64"; then
echo "MMX enabled $mmx" echo "MMX enabled $mmx"
echo "CMOV enabled $cmov" echo "CMOV enabled $cmov"
echo "CMOV is fast $cmov_is_fast" echo "CMOV is fast $fast_cmov"
fi fi
if test $arch = "armv4l"; then if test $arch = "armv4l"; then
echo "ARMv5TE enabled $armv5te" echo "ARMv5TE enabled $armv5te"
...@@ -1999,10 +2000,6 @@ fi ...@@ -1999,10 +2000,6 @@ fi
if enabled mmx; then if enabled mmx; then
echo "#define __CPU__ 586" >> $TMPH echo "#define __CPU__ 586" >> $TMPH
fi fi
if enabled cmov_is_fast; then
echo "TARGET_CMOV_IS_FAST=yes" >> config.mak
echo "#define CMOV_IS_FAST 1" >> $TMPH
fi
if enabled sdl; then if enabled sdl; then
echo "SDL_LIBS=`"${SDL_CONFIG}" --libs`" >> config.mak echo "SDL_LIBS=`"${SDL_CONFIG}" --libs`" >> config.mak
......
...@@ -462,7 +462,7 @@ static int av_always_inline get_cabac_inline(CABACContext *c, uint8_t * const st ...@@ -462,7 +462,7 @@ static int av_always_inline get_cabac_inline(CABACContext *c, uint8_t * const st
#else /* BRANCHLESS_CABAC_DECODER */ #else /* BRANCHLESS_CABAC_DECODER */
#if defined CMOV_IS_FAST #if defined HAVE_FAST_CMOV
#define BRANCHLESS_GET_CABAC_UPDATE(ret, cabac, statep, low, lowword, range, tmp, tmpbyte)\ #define BRANCHLESS_GET_CABAC_UPDATE(ret, cabac, statep, low, lowword, range, tmp, tmpbyte)\
"mov "tmp" , %%ecx \n\t"\ "mov "tmp" , %%ecx \n\t"\
"shl $17 , "tmp" \n\t"\ "shl $17 , "tmp" \n\t"\
...@@ -472,7 +472,7 @@ static int av_always_inline get_cabac_inline(CABACContext *c, uint8_t * const st ...@@ -472,7 +472,7 @@ static int av_always_inline get_cabac_inline(CABACContext *c, uint8_t * const st
"and %%ecx , "tmp" \n\t"\ "and %%ecx , "tmp" \n\t"\
"sub "tmp" , "low" \n\t"\ "sub "tmp" , "low" \n\t"\
"xor %%ecx , "ret" \n\t" "xor %%ecx , "ret" \n\t"
#else /* CMOV_IS_FAST */ #else /* HAVE_FAST_CMOV */
#define BRANCHLESS_GET_CABAC_UPDATE(ret, cabac, statep, low, lowword, range, tmp, tmpbyte)\ #define BRANCHLESS_GET_CABAC_UPDATE(ret, cabac, statep, low, lowword, range, tmp, tmpbyte)\
"mov "tmp" , %%ecx \n\t"\ "mov "tmp" , %%ecx \n\t"\
"shl $17 , "tmp" \n\t"\ "shl $17 , "tmp" \n\t"\
...@@ -485,7 +485,7 @@ static int av_always_inline get_cabac_inline(CABACContext *c, uint8_t * const st ...@@ -485,7 +485,7 @@ static int av_always_inline get_cabac_inline(CABACContext *c, uint8_t * const st
"and "tmp" , %%ecx \n\t"\ "and "tmp" , %%ecx \n\t"\
"sub %%ecx , "low" \n\t"\ "sub %%ecx , "low" \n\t"\
"xor "tmp" , "ret" \n\t" "xor "tmp" , "ret" \n\t"
#endif /* CMOV_IS_FAST */ #endif /* HAVE_FAST_CMOV */
#define BRANCHLESS_GET_CABAC(ret, cabac, statep, low, lowword, range, tmp, tmpbyte)\ #define BRANCHLESS_GET_CABAC(ret, cabac, statep, low, lowword, range, tmp, tmpbyte)\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment