--- Zhang Tao warmice@sina.com wrote:
Hi, Can someone tell me how to change the following statement so it can be compliled in VC++?
# define mad_f_mul(x, y) \ ({ mad_fixed64hi_t __hi; \ mad_fixed64lo_t __lo; \ asm ("imull %3" \ : "=a" (__lo), "=d" (__hi) \ : "%a" (x), "rm" (y)); \ mad_f_scale64(__hi, __lo); \ })
There are 2 main reasons why this will not compile with VC++. Firstly because it is a 'statement expression' (a gcc specific thing which I don't think exists in VC++), and secondly because it uses the gcc syntax for including inline assembler.
The easiest way to get things working is to use FPM_64BIT rather than FPM_INTEL which will cause mad_f_mul to be defined as a regular macro, and not use any inline assembler.
What platform are you planning to run the compiled code on ? If its PC, then maybe one of the floating point mp3 decoders might be a better choice than mad ??
Andre --
____________________________________________________________ Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie