Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2008-05-09 01:11:24 +0400
committerRamiro Polla <ramiro.polla@gmail.com>2008-05-09 01:11:24 +0400
commit40d0e665d09aca5918c0b70b7045f32fae71f3eb (patch)
tree90a376cb30c157bbb7b682d62a5c776e4a8917f0 /libavcodec/i386/motion_est_mmx.c
parent35027eddf3113fa8a0e0c72aad12c9ac6a9a5228 (diff)
Do not misuse long as the size of a register in x86.
typedef x86_reg as the appropriate size and use it instead. Originally committed as revision 13081 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/i386/motion_est_mmx.c')
-rw-r--r--libavcodec/i386/motion_est_mmx.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/libavcodec/i386/motion_est_mmx.c b/libavcodec/i386/motion_est_mmx.c
index 888d891d94..df75b6e153 100644
--- a/libavcodec/i386/motion_est_mmx.c
+++ b/libavcodec/i386/motion_est_mmx.c
@@ -34,7 +34,7 @@ DECLARE_ASM_CONST(8, uint64_t, bone)= 0x0101010101010101LL;
static inline void sad8_1_mmx(uint8_t *blk1, uint8_t *blk2, int stride, int h)
{
- long len= -(stride*h);
+ x86_reg len= -(stride*h);
asm volatile(
ASMALIGN(4)
"1: \n\t"
@@ -64,7 +64,7 @@ static inline void sad8_1_mmx(uint8_t *blk1, uint8_t *blk2, int stride, int h)
"add %3, %%"REG_a" \n\t"
" js 1b \n\t"
: "+a" (len)
- : "r" (blk1 - len), "r" (blk2 - len), "r" ((long)stride)
+ : "r" (blk1 - len), "r" (blk2 - len), "r" ((x86_reg)stride)
);
}
@@ -84,7 +84,7 @@ static inline void sad8_1_mmx2(uint8_t *blk1, uint8_t *blk2, int stride, int h)
"sub $2, %0 \n\t"
" jg 1b \n\t"
: "+r" (h), "+r" (blk1), "+r" (blk2)
- : "r" ((long)stride)
+ : "r" ((x86_reg)stride)
);
}
@@ -106,7 +106,7 @@ static int sad16_sse2(void *v, uint8_t *blk2, uint8_t *blk1, int stride, int h)
"sub $2, %0 \n\t"
" jg 1b \n\t"
: "+r" (h), "+r" (blk1), "+r" (blk2)
- : "r" ((long)stride)
+ : "r" ((x86_reg)stride)
);
asm volatile(
"movhlps %%xmm6, %%xmm0 \n\t"
@@ -135,7 +135,7 @@ static inline void sad8_x2a_mmx2(uint8_t *blk1, uint8_t *blk2, int stride, int h
"sub $2, %0 \n\t"
" jg 1b \n\t"
: "+r" (h), "+r" (blk1), "+r" (blk2)
- : "r" ((long)stride)
+ : "r" ((x86_reg)stride)
);
}
@@ -160,7 +160,7 @@ static inline void sad8_y2a_mmx2(uint8_t *blk1, uint8_t *blk2, int stride, int h
"sub $2, %0 \n\t"
" jg 1b \n\t"
: "+r" (h), "+r" (blk1), "+r" (blk2)
- : "r" ((long)stride)
+ : "r" ((x86_reg)stride)
);
}
@@ -190,13 +190,13 @@ static inline void sad8_4_mmx2(uint8_t *blk1, uint8_t *blk2, int stride, int h)
"sub $2, %0 \n\t"
" jg 1b \n\t"
: "+r" (h), "+r" (blk1), "+r" (blk2)
- : "r" ((long)stride)
+ : "r" ((x86_reg)stride)
);
}
static inline void sad8_2_mmx(uint8_t *blk1a, uint8_t *blk1b, uint8_t *blk2, int stride, int h)
{
- long len= -(stride*h);
+ x86_reg len= -(stride*h);
asm volatile(
ASMALIGN(4)
"1: \n\t"
@@ -228,13 +228,13 @@ static inline void sad8_2_mmx(uint8_t *blk1a, uint8_t *blk1b, uint8_t *blk2, int
"add %4, %%"REG_a" \n\t"
" js 1b \n\t"
: "+a" (len)
- : "r" (blk1a - len), "r" (blk1b -len), "r" (blk2 - len), "r" ((long)stride)
+ : "r" (blk1a - len), "r" (blk1b -len), "r" (blk2 - len), "r" ((x86_reg)stride)
);
}
static inline void sad8_4_mmx(uint8_t *blk1, uint8_t *blk2, int stride, int h)
{
- long len= -(stride*h);
+ x86_reg len= -(stride*h);
asm volatile(
"movq (%1, %%"REG_a"), %%mm0 \n\t"
"movq 1(%1, %%"REG_a"), %%mm2 \n\t"
@@ -281,7 +281,7 @@ static inline void sad8_4_mmx(uint8_t *blk1, uint8_t *blk2, int stride, int h)
"add %4, %%"REG_a" \n\t"
" js 1b \n\t"
: "+a" (len)
- : "r" (blk1 - len), "r" (blk1 -len + stride), "r" (blk2 - len), "r" ((long)stride)
+ : "r" (blk1 - len), "r" (blk1 -len + stride), "r" (blk2 - len), "r" ((x86_reg)stride)
);
}