#endif
end = s + src_size;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*s):"memory");
+ __asm__ volatile(PREFETCH" %0"::"m"(*s):"memory");
mm_end = end - 23;
- asm volatile("movq %0, %%mm7"::"m"(mask32):"memory");
+ __asm__ volatile("movq %0, %%mm7"::"m"(mask32):"memory");
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movd %1, %%mm0 \n\t"
"punpckldq 3%1, %%mm0 \n\t"
dest += 32;
s += 24;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
#endif
end = s + src_size;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*s):"memory");
+ __asm__ volatile(PREFETCH" %0"::"m"(*s):"memory");
mm_end = end - 31;
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movq %1, %%mm0 \n\t"
"movq 8%1, %%mm1 \n\t"
dest += 24;
s += 32;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
const uint8_t *mm_end;
end = s + src_size;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*s));
- asm volatile("movq %0, %%mm4"::"m"(mask15s));
+ __asm__ volatile(PREFETCH" %0"::"m"(*s));
+ __asm__ volatile("movq %0, %%mm4"::"m"(mask15s));
mm_end = end - 15;
while (s<mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movq %1, %%mm0 \n\t"
"movq 8%1, %%mm2 \n\t"
d+=16;
s+=16;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
mm_end = end - 3;
while (s < mm_end)
const uint8_t *mm_end;
end = s + src_size;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*s));
- asm volatile("movq %0, %%mm7"::"m"(mask15rg));
- asm volatile("movq %0, %%mm6"::"m"(mask15b));
+ __asm__ volatile(PREFETCH" %0"::"m"(*s));
+ __asm__ volatile("movq %0, %%mm7"::"m"(mask15rg));
+ __asm__ volatile("movq %0, %%mm6"::"m"(mask15b));
mm_end = end - 15;
while (s<mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movq %1, %%mm0 \n\t"
"movq 8%1, %%mm2 \n\t"
d+=16;
s+=16;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
mm_end = end - 3;
while (s < mm_end)
#ifdef HAVE_MMX
mm_end = end - 15;
#if 1 //is faster only if multiplies are reasonably fast (FIXME figure out on which CPUs this is faster, on Athlon it is slightly faster)
- asm volatile(
+ __asm__ volatile(
"movq %3, %%mm5 \n\t"
"movq %4, %%mm6 \n\t"
"movq %5, %%mm7 \n\t"
: "r" (mm_end), "m" (mask3216g), "m" (mask3216br), "m" (mul3216)
);
#else
- asm volatile(PREFETCH" %0"::"m"(*src):"memory");
- asm volatile(
+ __asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
+ __asm__ volatile(
"movq %0, %%mm7 \n\t"
"movq %1, %%mm6 \n\t"
::"m"(red_16mask),"m"(green_16mask));
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movd %1, %%mm0 \n\t"
"movd 4%1, %%mm3 \n\t"
s += 16;
}
#endif
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*src):"memory");
- asm volatile(
+ __asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
+ __asm__ volatile(
"movq %0, %%mm7 \n\t"
"movq %1, %%mm6 \n\t"
::"m"(red_16mask),"m"(green_16mask));
mm_end = end - 15;
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movd %1, %%mm0 \n\t"
"movd 4%1, %%mm3 \n\t"
d += 4;
s += 16;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
#ifdef HAVE_MMX
mm_end = end - 15;
#if 1 //is faster only if multiplies are reasonably fast (FIXME figure out on which CPUs this is faster, on Athlon it is slightly faster)
- asm volatile(
+ __asm__ volatile(
"movq %3, %%mm5 \n\t"
"movq %4, %%mm6 \n\t"
"movq %5, %%mm7 \n\t"
: "r" (mm_end), "m" (mask3215g), "m" (mask3216br), "m" (mul3215)
);
#else
- asm volatile(PREFETCH" %0"::"m"(*src):"memory");
- asm volatile(
+ __asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
+ __asm__ volatile(
"movq %0, %%mm7 \n\t"
"movq %1, %%mm6 \n\t"
::"m"(red_15mask),"m"(green_15mask));
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movd %1, %%mm0 \n\t"
"movd 4%1, %%mm3 \n\t"
s += 16;
}
#endif
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*src):"memory");
- asm volatile(
+ __asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
+ __asm__ volatile(
"movq %0, %%mm7 \n\t"
"movq %1, %%mm6 \n\t"
::"m"(red_15mask),"m"(green_15mask));
mm_end = end - 15;
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movd %1, %%mm0 \n\t"
"movd 4%1, %%mm3 \n\t"
d += 4;
s += 16;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*src):"memory");
- asm volatile(
+ __asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
+ __asm__ volatile(
"movq %0, %%mm7 \n\t"
"movq %1, %%mm6 \n\t"
::"m"(red_16mask),"m"(green_16mask));
mm_end = end - 11;
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movd %1, %%mm0 \n\t"
"movd 3%1, %%mm3 \n\t"
d += 4;
s += 12;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*src):"memory");
- asm volatile(
+ __asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
+ __asm__ volatile(
"movq %0, %%mm7 \n\t"
"movq %1, %%mm6 \n\t"
::"m"(red_16mask),"m"(green_16mask));
mm_end = end - 15;
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movd %1, %%mm0 \n\t"
"movd 3%1, %%mm3 \n\t"
d += 4;
s += 12;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*src):"memory");
- asm volatile(
+ __asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
+ __asm__ volatile(
"movq %0, %%mm7 \n\t"
"movq %1, %%mm6 \n\t"
::"m"(red_15mask),"m"(green_15mask));
mm_end = end - 11;
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movd %1, %%mm0 \n\t"
"movd 3%1, %%mm3 \n\t"
d += 4;
s += 12;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*src):"memory");
- asm volatile(
+ __asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
+ __asm__ volatile(
"movq %0, %%mm7 \n\t"
"movq %1, %%mm6 \n\t"
::"m"(red_15mask),"m"(green_15mask));
mm_end = end - 15;
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movd %1, %%mm0 \n\t"
"movd 3%1, %%mm3 \n\t"
d += 4;
s += 12;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
const uint16_t *s = (const uint16_t*)src;
end = s + src_size/2;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*s):"memory");
+ __asm__ volatile(PREFETCH" %0"::"m"(*s):"memory");
mm_end = end - 7;
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movq %1, %%mm0 \n\t"
"movq %1, %%mm1 \n\t"
:"m"(*s),"m"(mask15b),"m"(mask15g),"m"(mask15r), "m"(mmx_null)
:"memory");
/* borrowed 32 to 24 */
- asm volatile(
+ __asm__ volatile(
"movq %%mm0, %%mm4 \n\t"
"movq %%mm3, %%mm5 \n\t"
"movq %%mm6, %%mm0 \n\t"
d += 24;
s += 8;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*s):"memory");
+ __asm__ volatile(PREFETCH" %0"::"m"(*s):"memory");
mm_end = end - 7;
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movq %1, %%mm0 \n\t"
"movq %1, %%mm1 \n\t"
:"m"(*s),"m"(mask16b),"m"(mask16g),"m"(mask16r),"m"(mmx_null)
:"memory");
/* borrowed 32 to 24 */
- asm volatile(
+ __asm__ volatile(
"movq %%mm0, %%mm4 \n\t"
"movq %%mm3, %%mm5 \n\t"
"movq %%mm6, %%mm0 \n\t"
d += 24;
s += 8;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*s):"memory");
- asm volatile("pxor %%mm7,%%mm7 \n\t":::"memory");
+ __asm__ volatile(PREFETCH" %0"::"m"(*s):"memory");
+ __asm__ volatile("pxor %%mm7,%%mm7 \n\t":::"memory");
mm_end = end - 3;
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movq %1, %%mm0 \n\t"
"movq %1, %%mm1 \n\t"
d += 16;
s += 4;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
const uint16_t *s = (const uint16_t*)src;
end = s + src_size/2;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*s):"memory");
- asm volatile("pxor %%mm7,%%mm7 \n\t":::"memory");
+ __asm__ volatile(PREFETCH" %0"::"m"(*s):"memory");
+ __asm__ volatile("pxor %%mm7,%%mm7 \n\t":::"memory");
mm_end = end - 3;
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movq %1, %%mm0 \n\t"
"movq %1, %%mm1 \n\t"
d += 16;
s += 4;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
const uint8_t *s = src-idx;
uint8_t *d = dst-idx;
#ifdef HAVE_MMX
- asm volatile(
+ __asm__ volatile(
"test %0, %0 \n\t"
"jns 2f \n\t"
PREFETCH" (%1, %0) \n\t"
unsigned i;
#ifdef HAVE_MMX
long mmx_size= 23 - src_size;
- asm volatile (
+ __asm__ volatile (
"test %%"REG_a", %%"REG_a" \n\t"
"jns 2f \n\t"
"movq "MANGLE(mask24r)", %%mm5 \n\t"
: "r" (src-mmx_size), "r"(dst-mmx_size)
);
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
if (mmx_size==23) return; //finished, was multiple of 8
{
#ifdef HAVE_MMX
//FIXME handle 2 lines at once (fewer prefetches, reuse some chroma, but very likely memory-limited anyway)
- asm volatile(
+ __asm__ volatile(
"xor %%"REG_a", %%"REG_a" \n\t"
ASMALIGN(4)
"1: \n\t"
y2 = yc2[n]; \
u = uc[n]; \
v = vc[n]; \
- asm("unpkbw %1, %0" : "=r"(y1) : "r"(y1)); \
- asm("unpkbw %1, %0" : "=r"(y2) : "r"(y2)); \
- asm("unpkbl %1, %0" : "=r"(u) : "r"(u)); \
- asm("unpkbl %1, %0" : "=r"(v) : "r"(v)); \
+ __asm__("unpkbw %1, %0" : "=r"(y1) : "r"(y1)); \
+ __asm__("unpkbw %1, %0" : "=r"(y2) : "r"(y2)); \
+ __asm__("unpkbl %1, %0" : "=r"(u) : "r"(u)); \
+ __asm__("unpkbl %1, %0" : "=r"(v) : "r"(v)); \
yuv1 = (u << 8) + (v << 24); \
yuv2 = yuv1 + y2; \
yuv1 += y1; \
uint64_t y1, y2, yuv1, yuv2;
uint64_t u, v;
/* Prefetch */
- asm("ldq $31,64(%0)" :: "r"(yc));
- asm("ldq $31,64(%0)" :: "r"(yc2));
- asm("ldq $31,64(%0)" :: "r"(uc));
- asm("ldq $31,64(%0)" :: "r"(vc));
+ __asm__("ldq $31,64(%0)" :: "r"(yc));
+ __asm__("ldq $31,64(%0)" :: "r"(yc2));
+ __asm__("ldq $31,64(%0)" :: "r"(uc));
+ __asm__("ldq $31,64(%0)" :: "r"(vc));
pl2yuy2(0);
pl2yuy2(1);
dst += dstStride;
}
#ifdef HAVE_MMX
-asm( EMMS" \n\t"
+__asm__( EMMS" \n\t"
SFENCE" \n\t"
:::"memory");
#endif
{
#ifdef HAVE_MMX
//FIXME handle 2 lines at once (fewer prefetches, reuse some chroma, but very likely memory-limited anyway)
- asm volatile(
+ __asm__ volatile(
"xor %%"REG_a", %%"REG_a" \n\t"
ASMALIGN(4)
"1: \n\t"
dst += dstStride;
}
#ifdef HAVE_MMX
-asm( EMMS" \n\t"
+__asm__( EMMS" \n\t"
SFENCE" \n\t"
:::"memory");
#endif
for (y=0; y<height; y+=2)
{
#ifdef HAVE_MMX
- asm volatile(
+ __asm__ volatile(
"xor %%"REG_a", %%"REG_a" \n\t"
"pcmpeqw %%mm7, %%mm7 \n\t"
"psrlw $8, %%mm7 \n\t" // FF,00,FF,00...
ydst += lumStride;
src += srcStride;
- asm volatile(
+ __asm__ volatile(
"xor %%"REG_a", %%"REG_a" \n\t"
ASMALIGN(4)
"1: \n\t"
src += srcStride;
}
#ifdef HAVE_MMX
-asm volatile( EMMS" \n\t"
+__asm__ volatile( EMMS" \n\t"
SFENCE" \n\t"
:::"memory");
#endif
for (y=1; y<srcHeight; y++){
#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
const long mmxSize= srcWidth&~15;
- asm volatile(
+ __asm__ volatile(
"mov %4, %%"REG_a" \n\t"
"1: \n\t"
"movq (%0, %%"REG_a"), %%mm0 \n\t"
#endif
#ifdef HAVE_MMX
-asm volatile( EMMS" \n\t"
+__asm__ volatile( EMMS" \n\t"
SFENCE" \n\t"
:::"memory");
#endif
for (y=0; y<height; y+=2)
{
#ifdef HAVE_MMX
- asm volatile(
+ __asm__ volatile(
"xorl %%eax, %%eax \n\t"
"pcmpeqw %%mm7, %%mm7 \n\t"
"psrlw $8, %%mm7 \n\t" // FF,00,FF,00...
ydst += lumStride;
src += srcStride;
- asm volatile(
+ __asm__ volatile(
"xorl %%eax, %%eax \n\t"
ASMALIGN(4)
"1: \n\t"
src += srcStride;
}
#ifdef HAVE_MMX
-asm volatile( EMMS" \n\t"
+__asm__ volatile( EMMS" \n\t"
SFENCE" \n\t"
:::"memory");
#endif
long i;
for (i=0; i<2; i++)
{
- asm volatile(
+ __asm__ volatile(
"mov %2, %%"REG_a" \n\t"
"movq "MANGLE(ff_bgr2YCoeff)", %%mm6 \n\t"
"movq "MANGLE(ff_w1111)", %%mm5 \n\t"
src += srcStride;
}
src -= srcStride*2;
- asm volatile(
+ __asm__ volatile(
"mov %4, %%"REG_a" \n\t"
"movq "MANGLE(ff_w1111)", %%mm5 \n\t"
"movq "MANGLE(ff_bgr2UCoeff)", %%mm6 \n\t"
src += srcStride*2;
}
- asm volatile( EMMS" \n\t"
+ __asm__ volatile( EMMS" \n\t"
SFENCE" \n\t"
:::"memory");
#else
#ifdef HAVE_MMX
#ifdef HAVE_SSE2
- asm(
+ __asm__(
"xor %%"REG_a", %%"REG_a" \n\t"
"1: \n\t"
PREFETCH" 64(%1, %%"REG_a") \n\t"
: "memory", "%"REG_a""
);
#else
- asm(
+ __asm__(
"xor %%"REG_a", %%"REG_a" \n\t"
"1: \n\t"
PREFETCH" 64(%1, %%"REG_a") \n\t"
src2 += src2Stride;
}
#ifdef HAVE_MMX
- asm(
+ __asm__(
EMMS" \n\t"
SFENCE" \n\t"
::: "memory"
long y,x,w,h;
w=width/2; h=height/2;
#ifdef HAVE_MMX
- asm volatile(
+ __asm__ volatile(
PREFETCH" %0 \n\t"
PREFETCH" %1 \n\t"
::"m"(*(src1+srcStride1)),"m"(*(src2+srcStride2)):"memory");
#ifdef HAVE_MMX
for (;x<w-31;x+=32)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movq %1, %%mm0 \n\t"
"movq 8%1, %%mm2 \n\t"
#ifdef HAVE_MMX
for (;x<w-31;x+=32)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movq %1, %%mm0 \n\t"
"movq 8%1, %%mm2 \n\t"
for (;x<w;x++) d[2*x]=d[2*x+1]=s2[x];
}
#ifdef HAVE_MMX
- asm(
+ __asm__(
EMMS" \n\t"
SFENCE" \n\t"
::: "memory"
#ifdef HAVE_MMX
for (;x<w-7;x+=8)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32(%1, %0) \n\t"
PREFETCH" 32(%2, %0) \n\t"
PREFETCH" 32(%3, %0) \n\t"
}
}
#ifdef HAVE_MMX
- asm(
+ __asm__(
EMMS" \n\t"
SFENCE" \n\t"
::: "memory"
#endif
#define YSCALEYUV2YV12X(x, offset, dest, width) \
- asm volatile(\
+ __asm__ volatile(\
"xor %%"REG_a", %%"REG_a" \n\t"\
"movq "VROUNDER_OFFSET"(%0), %%mm3 \n\t"\
"movq %%mm3, %%mm4 \n\t"\
);
#define YSCALEYUV2YV12X_ACCURATE(x, offset, dest, width) \
- asm volatile(\
+ __asm__ volatile(\
"lea " offset "(%0), %%"REG_d" \n\t"\
"xor %%"REG_a", %%"REG_a" \n\t"\
"pxor %%mm4, %%mm4 \n\t"\
: "%eax", "%ebx", "%ecx", "%edx", "%esi"
*/
#define YSCALEYUV2PACKEDX \
- asm volatile(\
+ __asm__ volatile(\
"xor %%"REG_a", %%"REG_a" \n\t"\
ASMALIGN(4)\
"nop \n\t"\
);
#define YSCALEYUV2PACKEDX_ACCURATE \
- asm volatile(\
+ __asm__ volatile(\
"xor %%"REG_a", %%"REG_a" \n\t"\
ASMALIGN(4)\
"nop \n\t"\
if (c->flags & SWS_ACCURATE_RND){
while(p--){
- asm volatile(
+ __asm__ volatile(
YSCALEYUV2YV121_ACCURATE
:: "r" (src[p]), "r" (dst[p] + counter[p]),
"g" (-counter[p])
}
}else{
while(p--){
- asm volatile(
+ __asm__ volatile(
YSCALEYUV2YV121
:: "r" (src[p]), "r" (dst[p] + counter[p]),
"g" (-counter[p])
{
#ifdef HAVE_MMX
case PIX_FMT_RGB32:
- asm volatile(
+ __asm__ volatile(
FULL_YSCALEYUV2RGB
);
break;
case PIX_FMT_BGR24:
- asm volatile(
+ __asm__ volatile(
FULL_YSCALEYUV2RGB
);
break;
case PIX_FMT_BGR555:
- asm volatile(
+ __asm__ volatile(
FULL_YSCALEYUV2RGB
#ifdef DITHER1XBPP
);
break;
case PIX_FMT_BGR565:
- asm volatile(
+ __asm__ volatile(
FULL_YSCALEYUV2RGB
#ifdef DITHER1XBPP
{
//Note 8280 == DSTW_OFFSET but the preprocessor can't handle that there :(
case PIX_FMT_RGB32:
- asm volatile(
+ __asm__ volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
);
return;
case PIX_FMT_BGR24:
- asm volatile(
+ __asm__ volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
);
return;
case PIX_FMT_RGB555:
- asm volatile(
+ __asm__ volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
);
return;
case PIX_FMT_RGB565:
- asm volatile(
+ __asm__ volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
);
return;
case PIX_FMT_YUYV422:
- asm volatile(
+ __asm__ volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
switch(dstFormat)
{
case PIX_FMT_RGB32:
- asm volatile(
+ __asm__ volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
);
return;
case PIX_FMT_BGR24:
- asm volatile(
+ __asm__ volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
);
return;
case PIX_FMT_RGB555:
- asm volatile(
+ __asm__ volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
);
return;
case PIX_FMT_RGB565:
- asm volatile(
+ __asm__ volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
);
return;
case PIX_FMT_YUYV422:
- asm volatile(
+ __asm__ volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
switch(dstFormat)
{
case PIX_FMT_RGB32:
- asm volatile(
+ __asm__ volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
);
return;
case PIX_FMT_BGR24:
- asm volatile(
+ __asm__ volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
);
return;
case PIX_FMT_RGB555:
- asm volatile(
+ __asm__ volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
);
return;
case PIX_FMT_RGB565:
- asm volatile(
+ __asm__ volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
);
return;
case PIX_FMT_YUYV422:
- asm volatile(
+ __asm__ volatile(
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
"mov %4, %%"REG_b" \n\t"
"push %%"REG_BP" \n\t"
static inline void RENAME(yuy2ToY)(uint8_t *dst, uint8_t *src, long width, uint32_t *unused)
{
#ifdef HAVE_MMX
- asm volatile(
+ __asm__ volatile(
"movq "MANGLE(bm01010101)", %%mm2 \n\t"
"mov %0, %%"REG_a" \n\t"
"1: \n\t"
static inline void RENAME(yuy2ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, long width, uint32_t *unused)
{
#ifdef HAVE_MMX
- asm volatile(
+ __asm__ volatile(
"movq "MANGLE(bm01010101)", %%mm4 \n\t"
"mov %0, %%"REG_a" \n\t"
"1: \n\t"
static inline void RENAME(uyvyToY)(uint8_t *dst, uint8_t *src, long width, uint32_t *unused)
{
#ifdef HAVE_MMX
- asm volatile(
+ __asm__ volatile(
"mov %0, %%"REG_a" \n\t"
"1: \n\t"
"movq (%1, %%"REG_a",2), %%mm0 \n\t"
static inline void RENAME(uyvyToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, long width, uint32_t *unused)
{
#ifdef HAVE_MMX
- asm volatile(
+ __asm__ volatile(
"movq "MANGLE(bm01010101)", %%mm4 \n\t"
"mov %0, %%"REG_a" \n\t"
"1: \n\t"
{
if(srcFormat == PIX_FMT_BGR24){
- asm volatile(
+ __asm__ volatile(
"movq "MANGLE(ff_bgr24toY1Coeff)", %%mm5 \n\t"
"movq "MANGLE(ff_bgr24toY2Coeff)", %%mm6 \n\t"
:
);
}else{
- asm volatile(
+ __asm__ volatile(
"movq "MANGLE(ff_rgb24toY1Coeff)", %%mm5 \n\t"
"movq "MANGLE(ff_rgb24toY2Coeff)", %%mm6 \n\t"
:
);
}
- asm volatile(
+ __asm__ volatile(
"movq "MANGLE(ff_bgr24toYOffset)", %%mm4 \n\t"
"mov %2, %%"REG_a" \n\t"
"pxor %%mm7, %%mm7 \n\t"
static inline void RENAME(bgr24ToUV_mmx)(uint8_t *dstU, uint8_t *dstV, uint8_t *src, long width, int srcFormat)
{
- asm volatile(
+ __asm__ volatile(
"movq 24+%4, %%mm6 \n\t"
"mov %3, %%"REG_a" \n\t"
"pxor %%mm7, %%mm7 \n\t"
filter-= counter*2;
filterPos-= counter/2;
dst-= counter/2;
- asm volatile(
+ __asm__ volatile(
#if defined(PIC)
"push %%"REG_b" \n\t"
#endif
filter-= counter*4;
filterPos-= counter/2;
dst-= counter/2;
- asm volatile(
+ __asm__ volatile(
#if defined(PIC)
"push %%"REG_b" \n\t"
#endif
//filter-= counter*filterSize/2;
filterPos-= counter/2;
dst-= counter/2;
- asm volatile(
+ __asm__ volatile(
"pxor %%mm7, %%mm7 \n\t"
ASMALIGN(4)
"1: \n\t"
#endif
if (canMMX2BeUsed)
{
- asm volatile(
+ __asm__ volatile(
#if defined(PIC)
"mov %%"REG_b", %5 \n\t"
#endif
long xInc_shr16 = xInc >> 16;
uint16_t xInc_mask = xInc & 0xffff;
//NO MMX just normal asm ...
- asm volatile(
+ __asm__ volatile(
"xor %%"REG_a", %%"REG_a" \n\t" // i
"xor %%"REG_d", %%"REG_d" \n\t" // xx
"xorl %%ecx, %%ecx \n\t" // 2*xalpha
#endif
if (canMMX2BeUsed)
{
- asm volatile(
+ __asm__ volatile(
#if defined(PIC)
"mov %%"REG_b", %6 \n\t"
#endif
#endif /* HAVE_MMX2 */
long xInc_shr16 = (long) (xInc >> 16);
uint16_t xInc_mask = xInc & 0xffff;
- asm volatile(
+ __asm__ volatile(
"xor %%"REG_a", %%"REG_a" \n\t" // i
"xor %%"REG_d", %%"REG_d" \n\t" // xx
"xorl %%ecx, %%ecx \n\t" // 2*xalpha
}
#ifdef HAVE_MMX
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
/* store changed local vars back in the context */
c->dstY= dstY;
h_size= (c->dstW+7)&~7;
if(h_size*2 > FFABS(dstStride[0])) h_size-=8;
- asm volatile ("pxor %mm4, %mm4;" /* zero mm4 */ );
+ __asm__ volatile ("pxor %mm4, %mm4;" /* zero mm4 */ );
//printf("%X %X %X %X %X %X %X %X %X %X\n", (int)&c->redDither, (int)&c->blueDither, (int)src[0], (int)src[1], (int)src[2], (int)dst[0],
//srcStride[0],srcStride[1],srcStride[2],dstStride[0]);
for (y= 0; y<srcSliceH; y++ ) {
c->redDither= ff_dither8[(y+1)&1];
/* This MMX assembly code deals with a SINGLE scan line at a time,
* it converts 8 pixels in each iteration. */
- asm volatile (
+ __asm__ volatile (
/* load data for start of next scan line */
"movd (%2, %0), %%mm0;" /* Load 4 Cb 00 00 00 00 u3 u2 u1 u0 */
"movd (%3, %0), %%mm1;" /* Load 4 Cr 00 00 00 00 v3 v2 v1 v0 */
);
}
- asm volatile (EMMS);
+ __asm__ volatile (EMMS);
return srcSliceH;
}
h_size= (c->dstW+7)&~7;
if(h_size*2 > FFABS(dstStride[0])) h_size-=8;
- asm volatile ("pxor %mm4, %mm4;" /* zero mm4 */ );
+ __asm__ volatile ("pxor %mm4, %mm4;" /* zero mm4 */ );
//printf("%X %X %X %X %X %X %X %X %X %X\n", (int)&c->redDither, (int)&c->blueDither, (int)src[0], (int)src[1], (int)src[2], (int)dst[0],
//srcStride[0],srcStride[1],srcStride[2],dstStride[0]);
for (y= 0; y<srcSliceH; y++ ) {
c->redDither= ff_dither8[(y+1)&1];
/* This MMX assembly code deals with a SINGLE scan line at a time,
* it converts 8 pixels in each iteration. */
- asm volatile (
+ __asm__ volatile (
/* load data for start of next scan line */
"movd (%2, %0), %%mm0;" /* Load 4 Cb 00 00 00 00 u3 u2 u1 u0 */
"movd (%3, %0), %%mm1;" /* Load 4 Cr 00 00 00 00 v3 v2 v1 v0 */
);
}
- asm volatile (EMMS);
+ __asm__ volatile (EMMS);
return srcSliceH;
}
h_size= (c->dstW+7)&~7;
if(h_size*3 > FFABS(dstStride[0])) h_size-=8;
- asm volatile ("pxor %mm4, %mm4;" /* zero mm4 */ );
+ __asm__ volatile ("pxor %mm4, %mm4;" /* zero mm4 */ );
for (y= 0; y<srcSliceH; y++ ) {
uint8_t *image = dst[0] + (y+srcSliceY)*dstStride[0];
/* This MMX assembly code deals with a SINGLE scan line at a time,
* it converts 8 pixels in each iteration. */
- asm volatile (
+ __asm__ volatile (
/* load data for start of next scan line */
"movd (%2, %0), %%mm0;" /* Load 4 Cb 00 00 00 00 u3 u2 u1 u0 */
"movd (%3, %0), %%mm1;" /* Load 4 Cr 00 00 00 00 v3 v2 v1 v0 */
);
}
- asm volatile (EMMS);
+ __asm__ volatile (EMMS);
return srcSliceH;
}
h_size= (c->dstW+7)&~7;
if(h_size*4 > FFABS(dstStride[0])) h_size-=8;
- asm volatile ("pxor %mm4, %mm4;" /* zero mm4 */ );
+ __asm__ volatile ("pxor %mm4, %mm4;" /* zero mm4 */ );
for (y= 0; y<srcSliceH; y++ ) {
uint8_t *image = dst[0] + (y+srcSliceY)*dstStride[0];
/* This MMX assembly code deals with a SINGLE scan line at a time,
* it converts 8 pixels in each iteration. */
- asm volatile (
+ __asm__ volatile (
/* load data for start of next scan line */
"movd (%2, %0), %%mm0;" /* Load 4 Cb 00 00 00 00 u3 u2 u1 u0 */
"movd (%3, %0), %%mm1;" /* Load 4 Cr 00 00 00 00 v3 v2 v1 v0 */
);
}
- asm volatile (EMMS);
+ __asm__ volatile (EMMS);
return srcSliceH;
}