summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-10-16 18:59:27 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-10-16 18:59:27 +0000
commit6b52a2e974ba3c3065d13a16cc2fa69f96745d0d (patch)
treedac114864d767dcc442978838b4b3449af30010b /libmpcodecs
parent629db77d89d6bdead91fd18faa6445632a750e94 (diff)
downloadmpv-6b52a2e974ba3c3065d13a16cc2fa69f96745d0d.tar.bz2
mpv-6b52a2e974ba3c3065d13a16cc2fa69f96745d0d.tar.xz
Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
Neither variant is valid C99 syntax, but __asm__ is the most portable variant. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27788 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/dec_video.c4
-rw-r--r--libmpcodecs/pullup.c6
-rw-r--r--libmpcodecs/vf_decimate.c2
-rw-r--r--libmpcodecs/vf_divtc.c2
-rw-r--r--libmpcodecs/vf_eq.c4
-rw-r--r--libmpcodecs/vf_eq2.c4
-rw-r--r--libmpcodecs/vf_filmdint.c22
-rw-r--r--libmpcodecs/vf_fspp.c16
-rw-r--r--libmpcodecs/vf_halfpack.c4
-rw-r--r--libmpcodecs/vf_ilpack.c6
-rw-r--r--libmpcodecs/vf_ivtc.c4
-rw-r--r--libmpcodecs/vf_noise.c10
-rw-r--r--libmpcodecs/vf_pp7.c6
-rw-r--r--libmpcodecs/vf_sab.c2
-rw-r--r--libmpcodecs/vf_scale.c2
-rw-r--r--libmpcodecs/vf_spp.c10
-rw-r--r--libmpcodecs/vf_tfields.c16
-rw-r--r--libmpcodecs/vf_unsharp.c4
-rw-r--r--libmpcodecs/vf_uspp.c4
-rw-r--r--libmpcodecs/vf_yadif.c6
20 files changed, 67 insertions, 67 deletions
diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c
index 0a76fc06bb..3c31a01a7b 100644
--- a/libmpcodecs/dec_video.c
+++ b/libmpcodecs/dec_video.c
@@ -374,10 +374,10 @@ void *decode_video(sh_video_t *sh_video, unsigned char *start, int in_size,
// some codecs are broken, and doesn't restore MMX state :(
// it happens usually with broken/damaged files.
if (gCpuCaps.has3DNow) {
- __asm __volatile ("femms\n\t":::"memory");
+ __asm__ __volatile ("femms\n\t":::"memory");
}
else if (gCpuCaps.hasMMX) {
- __asm __volatile ("emms\n\t":::"memory");
+ __asm__ __volatile ("emms\n\t":::"memory");
}
#endif
diff --git a/libmpcodecs/pullup.c b/libmpcodecs/pullup.c
index b5229052a4..f71bf790ce 100644
--- a/libmpcodecs/pullup.c
+++ b/libmpcodecs/pullup.c
@@ -14,7 +14,7 @@
static int diff_y_mmx(unsigned char *a, unsigned char *b, int s)
{
int ret;
- asm volatile (
+ __asm__ volatile (
"movl $4, %%ecx \n\t"
"pxor %%mm4, %%mm4 \n\t"
"pxor %%mm7, %%mm7 \n\t"
@@ -61,7 +61,7 @@ static int diff_y_mmx(unsigned char *a, unsigned char *b, int s)
static int licomb_y_mmx(unsigned char *a, unsigned char *b, int s)
{
int ret;
- asm volatile (
+ __asm__ volatile (
"movl $4, %%ecx \n\t"
"pxor %%mm6, %%mm6 \n\t"
"pxor %%mm7, %%mm7 \n\t"
@@ -150,7 +150,7 @@ static int licomb_y_mmx(unsigned char *a, unsigned char *b, int s)
static int var_y_mmx(unsigned char *a, unsigned char *b, int s)
{
int ret;
- asm volatile (
+ __asm__ volatile (
"movl $3, %%ecx \n\t"
"pxor %%mm4, %%mm4 \n\t"
"pxor %%mm7, %%mm7 \n\t"
diff --git a/libmpcodecs/vf_decimate.c b/libmpcodecs/vf_decimate.c
index fd591bdca3..72d7e8ad19 100644
--- a/libmpcodecs/vf_decimate.c
+++ b/libmpcodecs/vf_decimate.c
@@ -23,7 +23,7 @@ struct vf_priv_s {
static int diff_MMX(unsigned char *old, unsigned char *new, int os, int ns)
{
volatile short out[4];
- asm (
+ __asm__ (
"movl $8, %%ecx \n\t"
"pxor %%mm4, %%mm4 \n\t"
"pxor %%mm7, %%mm7 \n\t"
diff --git a/libmpcodecs/vf_divtc.c b/libmpcodecs/vf_divtc.c
index 6c97463f4b..d06169cac0 100644
--- a/libmpcodecs/vf_divtc.c
+++ b/libmpcodecs/vf_divtc.c
@@ -37,7 +37,7 @@ struct vf_priv_s
static int diff_MMX(unsigned char *old, unsigned char *new, int os, int ns)
{
volatile short out[4];
- asm (
+ __asm__ (
"movl $8, %%ecx \n\t"
"pxor %%mm4, %%mm4 \n\t"
"pxor %%mm7, %%mm7 \n\t"
diff --git a/libmpcodecs/vf_eq.c b/libmpcodecs/vf_eq.c
index 0c910b0556..97d4270af6 100644
--- a/libmpcodecs/vf_eq.c
+++ b/libmpcodecs/vf_eq.c
@@ -44,7 +44,7 @@ static void process_MMX(unsigned char *dest, int dstride, unsigned char *src, in
contvec[0] = contvec[1] = contvec[2] = contvec[3] = contrast;
while (h--) {
- asm volatile (
+ __asm__ volatile (
"movq (%5), %%mm3 \n\t"
"movq (%6), %%mm4 \n\t"
"pxor %%mm0, %%mm0 \n\t"
@@ -82,7 +82,7 @@ static void process_MMX(unsigned char *dest, int dstride, unsigned char *src, in
src += sstep;
dest += dstep;
}
- asm volatile ( "emms \n\t" ::: "memory" );
+ __asm__ volatile ( "emms \n\t" ::: "memory" );
}
#endif
diff --git a/libmpcodecs/vf_eq2.c b/libmpcodecs/vf_eq2.c
index dbe751fbca..b3a501719f 100644
--- a/libmpcodecs/vf_eq2.c
+++ b/libmpcodecs/vf_eq2.c
@@ -130,7 +130,7 @@ void affine_1d_MMX (eq2_param_t *par, unsigned char *dst, unsigned char *src,
dstep = dstride - w;
while (h-- > 0) {
- asm volatile (
+ __asm__ volatile (
"movq (%5), %%mm3 \n\t"
"movq (%6), %%mm4 \n\t"
"pxor %%mm0, %%mm0 \n\t"
@@ -170,7 +170,7 @@ void affine_1d_MMX (eq2_param_t *par, unsigned char *dst, unsigned char *src,
dst += dstep;
}
- asm volatile ( "emms \n\t" ::: "memory" );
+ __asm__ volatile ( "emms \n\t" ::: "memory" );
}
#endif
diff --git a/libmpcodecs/vf_filmdint.c b/libmpcodecs/vf_filmdint.c
index 2fea3897b1..2658153c27 100644
--- a/libmpcodecs/vf_filmdint.c
+++ b/libmpcodecs/vf_filmdint.c
@@ -368,13 +368,13 @@ block_metrics_faster_c(unsigned char *a, unsigned char *b, int as, int bs,
#define MEQ(X,Y) ((X).even == (Y).even && (X).odd == (Y).odd && (X).temp == (Y).temp && (X).noise == (Y).noise)
#define BLOCK_METRICS_TEMPLATE() \
- asm volatile("pxor %mm7, %mm7\n\t" /* The result is colleted in mm7 */ \
+ __asm__ volatile("pxor %mm7, %mm7\n\t" /* The result is colleted in mm7 */ \
"pxor %mm6, %mm6\n\t" /* Temp to stay at 0 */ \
); \
a -= as; \
b -= bs; \
do { \
- asm volatile( \
+ __asm__ volatile( \
"movq (%0,%2), %%mm0\n\t" \
"movq (%1,%3), %%mm1\n\t" /* mm1 = even */ \
PSADBW(%%mm1, %%mm0, %%mm4, %%mm6) \
@@ -439,7 +439,7 @@ block_metrics_3dnow(unsigned char *a, unsigned char *b, int as, int bs,
static const unsigned long long ones = 0x0101010101010101ull;
BLOCK_METRICS_TEMPLATE();
- asm volatile("movq %%mm7, %0\n\temms" : "=m" (tm));
+ __asm__ volatile("movq %%mm7, %0\n\temms" : "=m" (tm));
get_block_stats(&tm, p, s);
#endif
return tm;
@@ -471,7 +471,7 @@ block_metrics_mmx2(unsigned char *a, unsigned char *b, int as, int bs,
#ifdef DEBUG
struct frame_stats ts = *s;
#endif
- asm volatile("prefetcht0 (%0,%2)\n\t"
+ __asm__ volatile("prefetcht0 (%0,%2)\n\t"
"prefetcht0 (%1,%3)\n\t" :
: "r" (a), "r" (b),
"r" (prefetch_line * as), "r" (prefetch_line * bs));
@@ -479,7 +479,7 @@ block_metrics_mmx2(unsigned char *a, unsigned char *b, int as, int bs,
BLOCK_METRICS_TEMPLATE();
s->num_blocks++;
- asm volatile(
+ __asm__ volatile(
"movq %3, %%mm0\n\t"
"movq %%mm7, %%mm1\n\t"
"psubusw %%mm0, %%mm1\n\t"
@@ -525,7 +525,7 @@ block_metrics_mmx2(unsigned char *a, unsigned char *b, int as, int bs,
s->interlaced_high += interlaced >> 16;
s->interlaced_low += interlaced;
} else {
- asm volatile(
+ __asm__ volatile(
"pcmpeqw %%mm0, %%mm0\n\t" /* -1 */
"psubw %%mm0, %%mm4\n\t"
"psubw %%mm0, %%mm5\n\t"
@@ -539,7 +539,7 @@ block_metrics_mmx2(unsigned char *a, unsigned char *b, int as, int bs,
: "=m" (s->tiny), "=m" (s->low), "=m" (s->high)
);
- asm volatile(
+ __asm__ volatile(
"pshufw $0, %2, %%mm0\n\t"
"psubusw %%mm7, %%mm0\n\t"
"pcmpeqw %%mm6, %%mm0\n\t" /* 0 if below sad_thres */
@@ -556,7 +556,7 @@ block_metrics_mmx2(unsigned char *a, unsigned char *b, int as, int bs,
);
}
- asm volatile(
+ __asm__ volatile(
"movq %%mm7, (%1)\n\t"
PMAXUW((%0), %%mm7)
"movq %%mm7, (%0)\n\t"
@@ -597,7 +597,7 @@ dint_copy_line_mmx2(unsigned char *dst, unsigned char *a, long bos,
#else
unsigned long len = (w+7) >> 3;
int ret;
- asm volatile (
+ __asm__ volatile (
"pxor %%mm6, %%mm6 \n\t" /* deinterlaced pixel counter */
"movd %0, %%mm7 \n\t"
"punpcklbw %%mm7, %%mm7 \n\t"
@@ -607,7 +607,7 @@ dint_copy_line_mmx2(unsigned char *dst, unsigned char *a, long bos,
: "rm" (t)
);
do {
- asm volatile (
+ __asm__ volatile (
"movq (%0), %%mm0\n\t"
"movq (%0,%3,2), %%mm1\n\t"
"movq %%mm0, (%2)\n\t"
@@ -639,7 +639,7 @@ dint_copy_line_mmx2(unsigned char *dst, unsigned char *a, long bos,
dst += 8;
} while (--len);
- asm volatile ("pxor %%mm7, %%mm7 \n\t"
+ __asm__ volatile ("pxor %%mm7, %%mm7 \n\t"
"psadbw %%mm6, %%mm7 \n\t"
"movd %%mm7, %0 \n\t"
"emms \n\t"
diff --git a/libmpcodecs/vf_fspp.c b/libmpcodecs/vf_fspp.c
index a04d851de5..d865d7210c 100644
--- a/libmpcodecs/vf_fspp.c
+++ b/libmpcodecs/vf_fspp.c
@@ -187,7 +187,7 @@ static void store_slice_mmx(uint8_t *dst, int16_t *src, long dst_stride, long sr
width = (width+7)&~7;
dst_stride-=width;
//src_stride=(src_stride-width)*2;
- asm volatile(
+ __asm__ volatile(
"mov %5, %%"REG_d" \n\t"
"mov %6, %%"REG_S" \n\t"
"mov %7, %%"REG_D" \n\t"
@@ -255,7 +255,7 @@ static void store_slice2_mmx(uint8_t *dst, int16_t *src, long dst_stride, long s
width = (width+7)&~7;
dst_stride-=width;
//src_stride=(src_stride-width)*2;
- asm volatile(
+ __asm__ volatile(
"mov %5, %%"REG_d" \n\t"
"mov %6, %%"REG_S" \n\t"
"mov %7, %%"REG_D" \n\t"
@@ -318,7 +318,7 @@ static void store_slice2_mmx(uint8_t *dst, int16_t *src, long dst_stride, long s
static void mul_thrmat_mmx(struct vf_priv_s *p, int q)
{
uint64_t *adr=&p->threshold_mtx_noq[0];
- asm volatile(
+ __asm__ volatile(
"movd %0, %%mm7 \n\t"
"add $8*8*2, %%"REG_D" \n\t"
"movq 0*8(%%"REG_S"), %%mm0 \n\t"
@@ -558,10 +558,10 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
}
#ifdef HAVE_MMX
- if(gCpuCaps.hasMMX) asm volatile ("emms\n\t");
+ if(gCpuCaps.hasMMX) __asm__ volatile ("emms\n\t");
#endif
#ifdef HAVE_MMX2
- if(gCpuCaps.hasMMX2) asm volatile ("sfence\n\t");
+ if(gCpuCaps.hasMMX2) __asm__ volatile ("sfence\n\t");
#endif
return vf_next_put_image(vf,dmpi, pts);
}
@@ -868,7 +868,7 @@ static void column_fidct_c(int16_t* thr_adr, DCTELEM *data, DCTELEM *output, int
static void column_fidct_mmx(int16_t* thr_adr, DCTELEM *data, DCTELEM *output, int cnt)
{
uint64_t __attribute__((aligned(8))) temps[4];
- asm volatile(
+ __asm__ volatile(
ASMALIGN(4)
"1: \n\t"
"movq "DCTSIZE_S"*0*2(%%"REG_S"), %%mm1 \n\t"
@@ -1669,7 +1669,7 @@ static void row_idct_mmx (DCTELEM* workspace,
int16_t* output_adr, int output_stride, int cnt)
{
uint64_t __attribute__((aligned(8))) temps[4];
- asm volatile(
+ __asm__ volatile(
"lea (%%"REG_a",%%"REG_a",2), %%"REG_d" \n\t"
"1: \n\t"
"movq "DCTSIZE_S"*0*2(%%"REG_S"), %%mm0 \n\t"
@@ -1935,7 +1935,7 @@ static void row_fdct_c(DCTELEM *data, const uint8_t *pixels, int line_size, int
static void row_fdct_mmx(DCTELEM *data, const uint8_t *pixels, int line_size, int cnt)
{
uint64_t __attribute__((aligned(8))) temps[4];
- asm volatile(
+ __asm__ volatile(
"lea (%%"REG_a",%%"REG_a",2), %%"REG_d" \n\t"
"6: \n\t"
"movd (%%"REG_S"), %%mm0 \n\t"
diff --git a/libmpcodecs/vf_halfpack.c b/libmpcodecs/vf_halfpack.c
index cb8cc28fc4..344de2f0fb 100644
--- a/libmpcodecs/vf_halfpack.c
+++ b/libmpcodecs/vf_halfpack.c
@@ -37,7 +37,7 @@ static void halfpack_MMX(unsigned char *dst, unsigned char *src[3],
vinc = srcstride[2] - w/2;
for (h/=2; h; h--) {
- asm (
+ __asm__ (
"pxor %%mm0, %%mm0 \n\t"
ASMALIGN(4)
"1: \n\t"
@@ -99,7 +99,7 @@ static void halfpack_MMX(unsigned char *dst, unsigned char *src[3],
v += vinc;
dst += dstinc;
}
- asm volatile ( "emms \n\t" ::: "memory" );
+ __asm__ volatile ( "emms \n\t" ::: "memory" );
}
#endif
diff --git a/libmpcodecs/vf_ilpack.c b/libmpcodecs/vf_ilpack.c
index 67e14dd0cf..8b5fe1ceb4 100644
--- a/libmpcodecs/vf_ilpack.c
+++ b/libmpcodecs/vf_ilpack.c
@@ -61,7 +61,7 @@ static void pack_li_1_C(unsigned char *dst, unsigned char *y,
static void pack_nn_MMX(unsigned char *dst, unsigned char *y,
unsigned char *u, unsigned char *v, int w)
{
- asm volatile (""
+ __asm__ volatile (""
ASMALIGN(4)
"1: \n\t"
"movq (%0), %%mm1 \n\t"
@@ -91,7 +91,7 @@ static void pack_nn_MMX(unsigned char *dst, unsigned char *y,
static void pack_li_0_MMX(unsigned char *dst, unsigned char *y,
unsigned char *u, unsigned char *v, int w, int us, int vs)
{
- asm volatile (""
+ __asm__ volatile (""
"push %%"REG_BP" \n\t"
#ifdef ARCH_X86_64
"mov %6, %%"REG_BP" \n\t"
@@ -199,7 +199,7 @@ static void pack_li_0_MMX(unsigned char *dst, unsigned char *y,
static void pack_li_1_MMX(unsigned char *dst, unsigned char *y,
unsigned char *u, unsigned char *v, int w, int us, int vs)
{
- asm volatile (""
+ __asm__ volatile (""
"push %%"REG_BP" \n\t"
#ifdef ARCH_X86_64
"mov %6, %%"REG_BP" \n\t"
diff --git a/libmpcodecs/vf_ivtc.c b/libmpcodecs/vf_ivtc.c
index b6db4c18a8..5d9859068f 100644
--- a/libmpcodecs/vf_ivtc.c
+++ b/libmpcodecs/vf_ivtc.c
@@ -46,7 +46,7 @@ static void block_diffs_MMX(struct metrics *m, unsigned char *old, unsigned char
int i;
short out[24]; // output buffer for the partial metrics from the mmx code
- asm (
+ __asm__ (
"movl $4, %%ecx \n\t"
"pxor %%mm4, %%mm4 \n\t" // 4 even difference sums
"pxor %%mm5, %%mm5 \n\t" // 4 odd difference sums
@@ -105,7 +105,7 @@ static void block_diffs_MMX(struct metrics *m, unsigned char *old, unsigned char
m->o = out[4]+out[5]+out[6]+out[7];
m->d = m->e + m->o;
- asm (
+ __asm__ (
// First loop to measure first four columns
"movl $4, %%ecx \n\t"
"pxor %%mm4, %%mm4 \n\t" // Past spacial noise
diff --git a/libmpcodecs/vf_noise.c b/libmpcodecs/vf_noise.c
index 2ffaa76f52..88c577a32e 100644
--- a/libmpcodecs/vf_noise.c
+++ b/libmpcodecs/vf_noise.c
@@ -150,7 +150,7 @@ static inline void lineNoise_MMX(uint8_t *dst, uint8_t *src, int8_t *noise, int
long mmx_len= len&(~7);
noise+=shift;
- asm volatile(
+ __asm__ volatile(
"mov %3, %%"REG_a" \n\t"
"pcmpeqb %%mm7, %%mm7 \n\t"
"psllw $15, %%mm7 \n\t"
@@ -179,7 +179,7 @@ static inline void lineNoise_MMX2(uint8_t *dst, uint8_t *src, int8_t *noise, int
long mmx_len= len&(~7);
noise+=shift;
- asm volatile(
+ __asm__ volatile(
"mov %3, %%"REG_a" \n\t"
"pcmpeqb %%mm7, %%mm7 \n\t"
"psllw $15, %%mm7 \n\t"
@@ -220,7 +220,7 @@ static inline void lineNoise_C(uint8_t *dst, uint8_t *src, int8_t *noise, int le
static inline void lineNoiseAvg_MMX(uint8_t *dst, uint8_t *src, int len, int8_t **shift){
long mmx_len= len&(~7);
- asm volatile(
+ __asm__ volatile(
"mov %5, %%"REG_a" \n\t"
ASMALIGN(4)
"1: \n\t"
@@ -357,10 +357,10 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
vf_clone_mpi_attributes(dmpi, mpi);
#ifdef HAVE_MMX
- if(gCpuCaps.hasMMX) asm volatile ("emms\n\t");
+ if(gCpuCaps.hasMMX) __asm__ volatile ("emms\n\t");
#endif
#ifdef HAVE_MMX2
- if(gCpuCaps.hasMMX2) asm volatile ("sfence\n\t");
+ if(gCpuCaps.hasMMX2) __asm__ volatile ("sfence\n\t");
#endif
return vf_next_put_image(vf,dmpi, pts);
diff --git a/libmpcodecs/vf_pp7.c b/libmpcodecs/vf_pp7.c
index 81ebbb4df8..2e3fe3d61e 100644
--- a/libmpcodecs/vf_pp7.c
+++ b/libmpcodecs/vf_pp7.c
@@ -157,7 +157,7 @@ static void dctB_c(DCTELEM *dst, DCTELEM *src){
#ifdef HAVE_MMX
static void dctB_mmx(DCTELEM *dst, DCTELEM *src){
- asm volatile (
+ __asm__ volatile (
"movq (%0), %%mm0 \n\t"
"movq 1*4*2(%0), %%mm1 \n\t"
"paddw 6*4*2(%0), %%mm0 \n\t"
@@ -398,10 +398,10 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
}
#ifdef HAVE_MMX
- if(gCpuCaps.hasMMX) asm volatile ("emms\n\t");
+ if(gCpuCaps.hasMMX) __asm__ volatile ("emms\n\t");
#endif
#ifdef HAVE_MMX2
- if(gCpuCaps.hasMMX2) asm volatile ("sfence\n\t");
+ if(gCpuCaps.hasMMX2) __asm__ volatile ("sfence\n\t");
#endif
return vf_next_put_image(vf,dmpi, pts);
diff --git a/libmpcodecs/vf_sab.c b/libmpcodecs/vf_sab.c
index 9d81f44e67..676b4bf4b0 100644
--- a/libmpcodecs/vf_sab.c
+++ b/libmpcodecs/vf_sab.c
@@ -140,7 +140,7 @@ static int config(struct vf_instance_s* vf,
unsigned int flags, unsigned int outfmt){
int sw, sh;
-//asm volatile("emms\n\t");
+//__asm__ volatile("emms\n\t");
allocStuff(&vf->priv->luma, width, height);
getSubSampleFactors(&sw, &sh, outfmt);
diff --git a/libmpcodecs/vf_scale.c b/libmpcodecs/vf_scale.c
index 2fdbb77c7c..6ed49901c3 100644
--- a/libmpcodecs/vf_scale.c
+++ b/libmpcodecs/vf_scale.c
@@ -558,7 +558,7 @@ void sws_getFlagsAndFilterFromCmdLine(int *flags, SwsFilter **srcFilterParam, Sw
#ifdef ARCH_X86
if(gCpuCaps.hasMMX)
- asm volatile("emms\n\t"::: "memory"); //FIXME this shouldnt be required but it IS (even for non mmx versions)
+ __asm__ volatile("emms\n\t"::: "memory"); //FIXME this should not be required but it IS (even for non-MMX versions)
#endif
if(firstTime)
{
diff --git a/libmpcodecs/vf_spp.c b/libmpcodecs/vf_spp.c
index 77abc19441..0f6867473a 100644
--- a/libmpcodecs/vf_spp.c
+++ b/libmpcodecs/vf_spp.c
@@ -153,7 +153,7 @@ static void hardthresh_mmx(DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *pe
threshold1= qp*((1<<4) - bias) - 1;
- asm volatile(
+ __asm__ volatile(
#define REQUANT_CORE(dst0, dst1, dst2, dst3, src0, src1, src2, src3) \
"movq " #src0 ", %%mm0 \n\t"\
"movq " #src1 ", %%mm1 \n\t"\
@@ -221,7 +221,7 @@ static void softthresh_mmx(DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *pe
threshold1= qp*((1<<4) - bias) - 1;
- asm volatile(
+ __asm__ volatile(
#undef REQUANT_CORE
#define REQUANT_CORE(dst0, dst1, dst2, dst3, src0, src1, src2, src3) \
"movq " #src0 ", %%mm0 \n\t"\
@@ -334,7 +334,7 @@ static void store_slice_mmx(uint8_t *dst, int16_t *src, int dst_stride, int src_
for(y=0; y<height; y++){
uint8_t *dst1= dst;
int16_t *src1= src;
- asm volatile(
+ __asm__ volatile(
"movq (%3), %%mm3 \n\t"
"movq (%3), %%mm4 \n\t"
"movd %4, %%mm2 \n\t"
@@ -500,10 +500,10 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
}
#ifdef HAVE_MMX
- if(gCpuCaps.hasMMX) asm volatile ("emms\n\t");
+ if(gCpuCaps.hasMMX) __asm__ volatile ("emms\n\t");
#endif
#ifdef HAVE_MMX2
- if(gCpuCaps.hasMMX2) asm volatile ("sfence\n\t");
+ if(gCpuCaps.hasMMX2) __asm__ volatile ("sfence\n\t");
#endif
return vf_next_put_image(vf,dmpi, pts);
diff --git a/libmpcodecs/vf_tfields.c b/libmpcodecs/vf_tfields.c
index b95b4f83ef..e70799a0fa 100644
--- a/libmpcodecs/vf_tfields.c
+++ b/libmpcodecs/vf_tfields.c
@@ -58,7 +58,7 @@ static void qpel_li_3DNOW(unsigned char *d, unsigned char *s, int w, int h, int
s += ss;
}
for (i=h-1; i; i--) {
- asm volatile(
+ __asm__ volatile(
"1: \n\t"
"movq (%%"REG_S"), %%mm0 \n\t"
"movq (%%"REG_S",%%"REG_a"), %%mm1 \n\t"
@@ -78,7 +78,7 @@ static void qpel_li_3DNOW(unsigned char *d, unsigned char *s, int w, int h, int
s += ss;
}
if (!up) fast_memcpy(d, s, w);
- asm volatile("emms \n\t" : : : "memory");
+ __asm__ volatile("emms \n\t" : : : "memory");
}
#endif
@@ -94,7 +94,7 @@ static void qpel_li_MMX2(unsigned char *d, unsigned char *s, int w, int h, int d
s += ss;
}
for (i=h-1; i; i--) {
- asm volatile(
+ __asm__ volatile(
"pxor %%mm7, %%mm7 \n\t"
"2: \n\t"
"movq (%%"REG_S"), %%mm0 \n\t"
@@ -115,7 +115,7 @@ static void qpel_li_MMX2(unsigned char *d, unsigned char *s, int w, int h, int d
s += ss;
}
if (!up) fast_memcpy(d, s, w);
- asm volatile("emms \n\t" : : : "memory");
+ __asm__ volatile("emms \n\t" : : : "memory");
}
#endif
@@ -131,7 +131,7 @@ static void qpel_li_MMX(unsigned char *d, unsigned char *s, int w, int h, int ds
s += ss;
}
for (i=h-1; i; i--) {
- asm volatile(
+ __asm__ volatile(
"pxor %%mm7, %%mm7 \n\t"
"3: \n\t"
"movq (%%"REG_S"), %%mm0 \n\t"
@@ -165,7 +165,7 @@ static void qpel_li_MMX(unsigned char *d, unsigned char *s, int w, int h, int ds
s += ss;
}
if (!up) fast_memcpy(d, s, w);
- asm volatile("emms \n\t" : : : "memory");
+ __asm__ volatile("emms \n\t" : : : "memory");
}
static void qpel_4tap_MMX(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up)
@@ -185,7 +185,7 @@ static void qpel_4tap_MMX(unsigned char *d, unsigned char *s, int w, int h, int
d[j] = (s[j+ssd] + 3*s[j])>>2;
d += ds; s += ss;
for (i=h-3; i; i--) {
- asm volatile(
+ __asm__ volatile(
"pxor %%mm0, %%mm0 \n\t"
"movq (%%"REG_d"), %%mm4 \n\t"
"movq 8(%%"REG_d"), %%mm5 \n\t"
@@ -245,7 +245,7 @@ static void qpel_4tap_MMX(unsigned char *d, unsigned char *s, int w, int h, int
d[j] = (s[j+ssd] + 3*s[j])>>2;
d += ds; s += ss;
if (!up) fast_memcpy(d, s, w);
- asm volatile("emms \n\t" : : : "memory");
+ __asm__ volatile("emms \n\t" : : : "memory");
}
#endif
diff --git a/libmpcodecs/vf_unsharp.c b/libmpcodecs/vf_unsharp.c
index aed1a2e98f..a2efd29b15 100644
--- a/libmpcodecs/vf_unsharp.c
+++ b/libmpcodecs/vf_unsharp.c
@@ -194,11 +194,11 @@ static int put_image( struct vf_instance_s* vf, mp_image_t *mpi, double pts) {
#ifdef HAVE_MMX
if(gCpuCaps.hasMMX)
- asm volatile ("emms\n\t");
+ __asm__ volatile ("emms\n\t");
#endif
#ifdef HAVE_MMX2
if(gCpuCaps.hasMMX2)
- asm volatile ("sfence\n\t");
+ __asm__ volatile ("sfence\n\t");
#endif
return vf_next_put_image( vf, dmpi, pts);
diff --git a/libmpcodecs/vf_uspp.c b/libmpcodecs/vf_uspp.c
index 3a05a37fbd..c1d100d5fa 100644
--- a/libmpcodecs/vf_uspp.c
+++ b/libmpcodecs/vf_uspp.c
@@ -292,10 +292,10 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
}
#ifdef HAVE_MMX
- if(gCpuCaps.hasMMX) asm volatile ("emms\n\t");
+ if(gCpuCaps.hasMMX) __asm__ volatile ("emms\n\t");
#endif
#ifdef HAVE_MMX2
- if(gCpuCaps.hasMMX2) asm volatile ("sfence\n\t");
+ if(gCpuCaps.hasMMX2) __asm__ volatile ("sfence\n\t");
#endif
return vf_next_put_image(vf,dmpi, pts);
diff --git a/libmpcodecs/vf_yadif.c b/libmpcodecs/vf_yadif.c
index 5b39738693..066d2873b9 100644
--- a/libmpcodecs/vf_yadif.c
+++ b/libmpcodecs/vf_yadif.c
@@ -142,7 +142,7 @@ static void filter_line_mmx2(struct vf_priv_s *p, uint8_t *dst, uint8_t *prev, u
#define FILTER\
for(x=0; x<w; x+=4){\
- asm volatile(\
+ __asm__ volatile(\
"pxor %%mm7, %%mm7 \n\t"\
LOAD4("(%[cur],%[mrefs])", %%mm0) /* c = cur[x-refs] */\
LOAD4("(%[cur],%[prefs])", %%mm1) /* e = cur[x+refs] */\
@@ -259,7 +259,7 @@ static void filter_line_mmx2(struct vf_priv_s *p, uint8_t *dst, uint8_t *prev, u
[pb1] "m"(pb_1),\
[mode] "g"(mode)\
);\
- asm volatile("movd %%mm1, %0" :"=m"(*dst));\
+ __asm__ volatile("movd %%mm1, %0" :"=m"(*dst));\
dst += 4;\
prev+= 4;\
cur += 4;\
@@ -370,7 +370,7 @@ static void filter(struct vf_priv_s *p, uint8_t *dst[3], int dst_stride[3], int
}
}
#if defined(HAVE_MMX) && defined(NAMED_ASM_ARGS)
- if(gCpuCaps.hasMMX2) asm volatile("emms \n\t" : : : "memory");
+ if(gCpuCaps.hasMMX2) __asm__ volatile("emms \n\t" : : : "memory");
#endif
}