Porting assembly from MinGW to Visual Studio .NET 2005
Posted on 2007-03-22
I got some C code that compiles perfectly under MinGW. I tried to port the code to compile under Visual Studio .NET 2005 and was able to do that easily until I encountered some assembly code which Visual Studio .NET 2005 did not understand the way it was written. Please see an example of the assembly code i'm referring to:
static void avg_pixels8_mmx(uint8_t *block, const uint8_t *pixels, int line_size, int h)
"movq %0, %%mm0 \n\t"
"movq %1, %%mm1 \n\t"
PAVGB(%%mm0, %%mm1, %%mm2, %%mm6)
"movq %%mm2, %0 \n\t"
pixels += line_size;
block += line_size;
I know that the answer to this question is not made of few words. I'm OK if someone can direct me to a good tutorial that addresses porting assembly code from MinGW to MS Visual Studio compiler family. This is not the first time I deal with assembly code inside C, actually I have written some my self, but my experience in this area is all based on MS VS IDE.