Mercurial > libavcodec.hg
changeset 9791:de4a8f76b1b9 libavcodec
Use fewer macros in x86-optimized mlpdsp.
Fixes compilation on 32-bit llvm which didn't allow a cast in an m operand.
author | ramiro |
---|---|
date | Wed, 03 Jun 2009 23:48:28 +0000 |
parents | 3fbd5452cbd1 |
children | 05ea4942df9b |
files | x86/mlpdsp.c |
diffstat | 1 files changed, 10 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/x86/mlpdsp.c Wed Jun 03 19:24:51 2009 +0000 +++ b/x86/mlpdsp.c Wed Jun 03 23:48:28 2009 +0000 @@ -75,11 +75,6 @@ #define RESULT "%%rsi" #define RESULT32 "%%esi" -#define READVAL "r" -#define RDWRVAL "+r" -#define COUNTER "c" -#define ECXUSED - #else /* if ARCH_X86_32 */ #define MLPMUL(label, offset, offs, offc) \ @@ -106,11 +101,6 @@ #define RESULT "%%eax" #define RESULT32 "%%eax" -#define READVAL "m" -#define RDWRVAL "+m" -#define COUNTER "m" -#define ECXUSED , "ecx" - #endif /* !ARCH_X86_64 */ #define BINC AV_STRINGIFY(4* MAX_CHANNELS) @@ -164,19 +154,20 @@ : /* 0*/"+r"(state), /* 1*/"+r"(coeff), /* 2*/"+r"(sample_buffer), - /* 3*/RDWRVAL(blocksize) - : - /* 4*/READVAL((x86_reg)mask), - /* 5*/READVAL(firjump), - /* 6*/READVAL(iirjump), - /* 7*/COUNTER(filter_shift) #if ARCH_X86_64 + /* 3*/"+r"(blocksize) + : /* 4*/"r"((x86_reg)mask), /* 5*/"r"(firjump), + /* 6*/"r"(iirjump) , /* 7*/"c"(filter_shift) , /* 8*/"r"((int64_t)coeff[0]) , /* 9*/"r"((int64_t)coeff[1]) , /*10*/"r"((int64_t)coeff[2]) -#endif /* ARCH_X86_64 */ - : REG_a, REG_d, REG_S - ECXUSED + : "rax", "rdx", "rsi" +#else /* ARCH_X86_32 */ + /* 3*/"+m"(blocksize) + : /* 4*/"m"( mask), /* 5*/"m"(firjump), + /* 6*/"m"(iirjump) , /* 7*/"m"(filter_shift) + : "eax", "edx", "esi", "ecx" +#endif /* !ARCH_X86_64 */ ); }