Use fewer macros in x86-optimized mlpdsp.

Fixes compilation on 32-bit llvm which didn't allow a cast in an m operand.

Originally committed as revision 19086 to svn://svn.ffmpeg.org/ffmpeg/trunk
release/0.6
Ramiro Polla 16 years ago
parent 007c47e8b9
commit 989b7181ac
  1. 29
      libavcodec/x86/mlpdsp.c

@ -75,11 +75,6 @@ static const void *iirtable[5] = { &ff_mlp_iirorder_0, &ff_mlp_iirorder_1,
#define RESULT "%%rsi" #define RESULT "%%rsi"
#define RESULT32 "%%esi" #define RESULT32 "%%esi"
#define READVAL "r"
#define RDWRVAL "+r"
#define COUNTER "c"
#define ECXUSED
#else /* if ARCH_X86_32 */ #else /* if ARCH_X86_32 */
#define MLPMUL(label, offset, offs, offc) \ #define MLPMUL(label, offset, offs, offc) \
@ -106,11 +101,6 @@ static const void *iirtable[5] = { &ff_mlp_iirorder_0, &ff_mlp_iirorder_1,
#define RESULT "%%eax" #define RESULT "%%eax"
#define RESULT32 "%%eax" #define RESULT32 "%%eax"
#define READVAL "m"
#define RDWRVAL "+m"
#define COUNTER "m"
#define ECXUSED , "ecx"
#endif /* !ARCH_X86_64 */ #endif /* !ARCH_X86_64 */
#define BINC AV_STRINGIFY(4* MAX_CHANNELS) #define BINC AV_STRINGIFY(4* MAX_CHANNELS)
@ -164,19 +154,20 @@ static void mlp_filter_channel_x86(int32_t *state, const int32_t *coeff,
: /* 0*/"+r"(state), : /* 0*/"+r"(state),
/* 1*/"+r"(coeff), /* 1*/"+r"(coeff),
/* 2*/"+r"(sample_buffer), /* 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 #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]) , /* 8*/"r"((int64_t)coeff[0])
, /* 9*/"r"((int64_t)coeff[1]) , /* 9*/"r"((int64_t)coeff[1])
, /*10*/"r"((int64_t)coeff[2]) , /*10*/"r"((int64_t)coeff[2])
#endif /* ARCH_X86_64 */ : "rax", "rdx", "rsi"
: REG_a, REG_d, REG_S #else /* ARCH_X86_32 */
ECXUSED /* 3*/"+m"(blocksize)
: /* 4*/"m"( mask), /* 5*/"m"(firjump),
/* 6*/"m"(iirjump) , /* 7*/"m"(filter_shift)
: "eax", "edx", "esi", "ecx"
#endif /* !ARCH_X86_64 */
); );
} }

Loading…
Cancel
Save