[FFmpeg-cvslog] Use intel compliant CDQ instead of CLTD in inline asm.
Matt Oliver
git at videolan.org
Sun Mar 30 23:42:16 CEST 2014
ffmpeg | branch: master | Matt Oliver <protogonoi at gmail.com> | Sun Mar 30 12:34:49 2014 +1100| [0f2588d7e5d2bc92c0a61e8d3e32e90722d98a8e] | committer: Michael Niedermayer
Use intel compliant CDQ instead of CLTD in inline asm.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0f2588d7e5d2bc92c0a61e8d3e32e90722d98a8e
---
libavcodec/x86/cabac.h | 4 ++--
libavcodec/x86/mathops.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavcodec/x86/cabac.h b/libavcodec/x86/cabac.h
index 0a68b7b..a1c489e 100644
--- a/libavcodec/x86/cabac.h
+++ b/libavcodec/x86/cabac.h
@@ -219,7 +219,7 @@ static av_always_inline int get_cabac_bypass_sign_x86(CABACContext *c, int val)
"shl $17, %k1 \n\t"
"add %%eax, %%eax \n\t"
"sub %k1, %%eax \n\t"
- "cltd \n\t"
+ "cdq \n\t"
"and %%edx, %k1 \n\t"
"add %k1, %%eax \n\t"
"xor %%edx, %%ecx \n\t"
@@ -266,7 +266,7 @@ static av_always_inline int get_cabac_bypass_x86(CABACContext *c)
"shl $17, %k1 \n\t"
"add %%eax, %%eax \n\t"
"sub %k1, %%eax \n\t"
- "cltd \n\t"
+ "cdq \n\t"
"and %%edx, %k1 \n\t"
"add %k1, %%eax \n\t"
"inc %%edx \n\t"
diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h
index 9c48afe..1f049c0 100644
--- a/libavcodec/x86/mathops.h
+++ b/libavcodec/x86/mathops.h
@@ -100,7 +100,7 @@ __asm__ volatile(\
#endif /* HAVE_I686 */
#define MASK_ABS(mask, level) \
- __asm__ ("cltd \n\t" \
+ __asm__ ("cdq \n\t" \
"xorl %1, %0 \n\t" \
"subl %1, %0 \n\t" \
: "+a"(level), "=&d"(mask))
More information about the ffmpeg-cvslog
mailing list