Skip to content
Snippets Groups Projects
Commit 7e14b808 authored by Reimar Döffinger's avatar Reimar Döffinger
Browse files

Use cltd instead of cdq asm mnemonic, ICC and gcc support both, but

SunStudio 12 only supports the former.

Originally committed as revision 12275 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 48026fbe
No related branches found
No related tags found
No related merge requests found
...@@ -327,7 +327,7 @@ static inline void renorm_cabac_decoder_once(CABACContext *c){ ...@@ -327,7 +327,7 @@ static inline void renorm_cabac_decoder_once(CABACContext *c){
//P3:665 athlon:517 //P3:665 athlon:517
asm( asm(
"lea -0x100(%0), %%eax \n\t" "lea -0x100(%0), %%eax \n\t"
"cdq \n\t" "cltd \n\t"
"mov %0, %%eax \n\t" "mov %0, %%eax \n\t"
"and %%edx, %0 \n\t" "and %%edx, %0 \n\t"
"and %1, %%edx \n\t" "and %1, %%edx \n\t"
...@@ -599,7 +599,7 @@ static int get_cabac_bypass(CABACContext *c){ ...@@ -599,7 +599,7 @@ static int get_cabac_bypass(CABACContext *c){
"shl $17, %%ebx \n\t" "shl $17, %%ebx \n\t"
"add %%eax, %%eax \n\t" "add %%eax, %%eax \n\t"
"sub %%ebx, %%eax \n\t" "sub %%ebx, %%eax \n\t"
"cdq \n\t" "cltd \n\t"
"and %%edx, %%ebx \n\t" "and %%edx, %%ebx \n\t"
"add %%ebx, %%eax \n\t" "add %%ebx, %%eax \n\t"
"test %%ax, %%ax \n\t" "test %%ax, %%ax \n\t"
...@@ -646,7 +646,7 @@ static av_always_inline int get_cabac_bypass_sign(CABACContext *c, int val){ ...@@ -646,7 +646,7 @@ static av_always_inline int get_cabac_bypass_sign(CABACContext *c, int val){
"shl $17, %%ebx \n\t" "shl $17, %%ebx \n\t"
"add %%eax, %%eax \n\t" "add %%eax, %%eax \n\t"
"sub %%ebx, %%eax \n\t" "sub %%ebx, %%eax \n\t"
"cdq \n\t" "cltd \n\t"
"and %%edx, %%ebx \n\t" "and %%edx, %%ebx \n\t"
"add %%ebx, %%eax \n\t" "add %%ebx, %%eax \n\t"
"xor %%edx, %%ecx \n\t" "xor %%edx, %%ecx \n\t"
......
...@@ -205,7 +205,7 @@ static inline unsigned int ff_sqrt(unsigned int a) ...@@ -205,7 +205,7 @@ static inline unsigned int ff_sqrt(unsigned int a)
#if defined(ARCH_X86) #if defined(ARCH_X86)
#define MASK_ABS(mask, level)\ #define MASK_ABS(mask, level)\
asm volatile(\ asm volatile(\
"cdq \n\t"\ "cltd \n\t"\
"xorl %1, %0 \n\t"\ "xorl %1, %0 \n\t"\
"subl %1, %0 \n\t"\ "subl %1, %0 \n\t"\
: "+a" (level), "=&d" (mask)\ : "+a" (level), "=&d" (mask)\
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment