summaryrefslogtreecommitdiff
path: root/libavcodec/cabac.h
diff options
context:
space:
mode:
authorDiego Pettenò <flameeyes@gmail.com>2008-10-16 13:34:09 +0000
committerDiego Pettenò <flameeyes@gmail.com>2008-10-16 13:34:09 +0000
commitbe449fca79a3b0394143f0a77c99784e65868d9f (patch)
tree5c5b2bbfe648467292b30cc501265e556acab101 /libavcodec/cabac.h
parenta14b362fc650a5e036d413033d9709a526662d89 (diff)
Convert asm keyword into __asm__.
Neither the asm() nor the __asm__() keyword is part of the C99 standard, but while GCC accepts the former in C89 syntax, it is not accepted in C99 unless GNU extensions are turned on (with -fasm). The latter form is accepted in any syntax as an extension (without requiring further command-line options). Sun Studio C99 compiler also does not accept asm() while accepting __asm__(), albeit reporting warnings that it's not valid C99 syntax. Originally committed as revision 15627 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/cabac.h')
-rw-r--r--libavcodec/cabac.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/libavcodec/cabac.h b/libavcodec/cabac.h
index 16185ee705..e012727054 100644
--- a/libavcodec/cabac.h
+++ b/libavcodec/cabac.h
@@ -304,7 +304,7 @@ static inline void renorm_cabac_decoder_once(CABACContext *c){
int temp;
#if 0
//P3:683 athlon:475
- asm(
+ __asm__(
"lea -0x100(%0), %2 \n\t"
"shr $31, %2 \n\t" //FIXME 31->63 for x86-64
"shl %%cl, %0 \n\t"
@@ -313,7 +313,7 @@ static inline void renorm_cabac_decoder_once(CABACContext *c){
);
#elif 0
//P3:680 athlon:474
- asm(
+ __asm__(
"cmp $0x100, %0 \n\t"
"setb %%cl \n\t" //FIXME 31->63 for x86-64
"shl %%cl, %0 \n\t"
@@ -323,7 +323,7 @@ static inline void renorm_cabac_decoder_once(CABACContext *c){
#elif 1
int temp2;
//P3:665 athlon:517
- asm(
+ __asm__(
"lea -0x100(%0), %%eax \n\t"
"cltd \n\t"
"mov %0, %%eax \n\t"
@@ -336,7 +336,7 @@ static inline void renorm_cabac_decoder_once(CABACContext *c){
#elif 0
int temp2;
//P3:673 athlon:509
- asm(
+ __asm__(
"cmp $0x100, %0 \n\t"
"sbb %%edx, %%edx \n\t"
"mov %0, %%eax \n\t"
@@ -349,7 +349,7 @@ static inline void renorm_cabac_decoder_once(CABACContext *c){
#else
int temp2;
//P3:677 athlon:511
- asm(
+ __asm__(
"cmp $0x100, %0 \n\t"
"lea (%0, %0), %%eax \n\t"
"lea (%1, %1), %%edx \n\t"
@@ -385,7 +385,7 @@ static av_always_inline int get_cabac_inline(CABACContext *c, uint8_t * const st
int bit;
#ifndef BRANCHLESS_CABAC_DECODER
- asm volatile(
+ __asm__ volatile(
"movzbl (%1), %0 \n\t"
"movl "RANGE "(%2), %%ebx \n\t"
"movl "RANGE "(%2), %%edx \n\t"
@@ -524,7 +524,7 @@ static av_always_inline int get_cabac_inline(CABACContext *c, uint8_t * const st
"add "tmp" , "low" \n\t"\
"1: \n\t"
- asm volatile(
+ __asm__ volatile(
"movl "RANGE "(%2), %%esi \n\t"
"movl "LOW "(%2), %%ebx \n\t"
BRANCHLESS_GET_CABAC("%0", "%2", "(%1)", "%%ebx", "%%bx", "%%esi", "%%edx", "%%dl")
@@ -591,7 +591,7 @@ static int av_unused get_cabac(CABACContext *c, uint8_t * const state){
static int av_unused get_cabac_bypass(CABACContext *c){
#if 0 //not faster
int bit;
- asm volatile(
+ __asm__ volatile(
"movl "RANGE "(%1), %%ebx \n\t"
"movl "LOW "(%1), %%eax \n\t"
"shl $17, %%ebx \n\t"
@@ -638,7 +638,7 @@ static int av_unused get_cabac_bypass(CABACContext *c){
static av_always_inline int get_cabac_bypass_sign(CABACContext *c, int val){
#if defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__))
- asm volatile(
+ __asm__ volatile(
"movl "RANGE "(%1), %%ebx \n\t"
"movl "LOW "(%1), %%eax \n\t"
"shl $17, %%ebx \n\t"