[XviD-devel] [STATUS] For Unix flavors
Marc FD
xvid-devel@xvid.org
Sun, 22 Sep 2002 22:29:34 +0200
> it doesn't work, even with the "\" at the start. msvc appears to have a
problem with braced __asm {} structures in macros, only single-operand
unbraced __asm statements seem permitted.
after a __asm { statement, M$VC++ can't use the \ sign.
for multi - instruction macros use
#define MACRONAME \
__asm { inst1 } \
__asm { inst2 } \
__asm { inst3 } \
[...]
__asm { instn }
note that a __asm { inst1 inst2 inst3 [...] instn } will not work too.
but __asm { inst1 } __asm { inst2 } __asm { inst3 } [...] __asm { instn }
will work
of course, you can remove the braces. but i think it's cleaner that way
the problems lies in the buggy msvc in-line asm parser.
generally, when you need a lot of in-line macros in msvc, you use includes.
but i take good habits : i use nasm now :)