From: Reimar Döffinger Date: Fri, 21 Aug 2009 09:54:28 +0000 (+0000) Subject: Replace #ifdef PIC checks with the more appropriate HAVE_EBX_AVAILABLE/HAVE_7REGS. X-Git-Tag: v0.6~3530 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f2d702e109666ea098077c0037c0860b389a1a30;p=platform%2Fupstream%2Flibav.git Replace #ifdef PIC checks with the more appropriate HAVE_EBX_AVAILABLE/HAVE_7REGS. Originally committed as revision 19676 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/libavcodec/cabac.h b/libavcodec/cabac.h index ea4ac54..2794626 100644 --- a/libavcodec/cabac.h +++ b/libavcodec/cabac.h @@ -637,7 +637,7 @@ static int av_unused get_cabac_bypass(CABACContext *c){ static av_always_inline int get_cabac_bypass_sign(CABACContext *c, int val){ -#if ARCH_X86 && !(defined(PIC) && defined(__GNUC__)) +#if ARCH_X86 && HAVE_EBX_AVAILABLE __asm__ volatile( "movl "RANGE "(%1), %%ebx \n\t" "movl "LOW "(%1), %%eax \n\t" diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c index 71de34c..8c0da0a 100644 --- a/libavcodec/msmpeg4.c +++ b/libavcodec/msmpeg4.c @@ -31,6 +31,7 @@ #include "dsputil.h" #include "mpegvideo.h" #include "msmpeg4.h" +#include "libavutil/x86_cpu.h" /* * You can also call this codec : MPEG4 with a twist ! @@ -647,7 +648,7 @@ static inline int msmpeg4_pred_dc(MpegEncContext * s, int n, necessitate to modify mpegvideo.c. The problem comes from the fact they decided to store the quantized DC (which would lead to problems if Q could vary !) */ -#if ARCH_X86 && !defined PIC +#if ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE __asm__ volatile( "movl %3, %%eax \n\t" "shrl $1, %%eax \n\t"