/* gcc -W -Wall -fPIC -c test2.c -o test2.o */ #include static void f(uint8_t *q, uint8_t *p, int y, int x) { asm volatile( "movd %0, %%mm0 \n\t" "movd %1, %%mm1 \n\t" "movd %2, %%mm2 \n\t" "movd %3, %%mm3 \n\t" : "m" (*(uint32_t*)(p + 0*x)), "m" (*(uint32_t*)(p + 1*x)), "m" (*(uint32_t*)(p + 2*x)), "m" (*(uint32_t*)(p + 3*x)) ); asm volatile( "# Lots of stuff going on here \n\t" "movd %%mm0, %0 \n\t" "movd %%mm1, %1 \n\t" "movd %%mm2, %2 \n\t" "movd %%mm3, %3 \n\t" : "=m" (*(uint32_t*)(q + 0*y)), "=m" (*(uint32_t*)(q + 1*y)), "=m" (*(uint32_t*)(q + 2*y)), "=m" (*(uint32_t*)(q + 3*y)) ); }