1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

avcodec/x86/dsputil_mmx: Fix build with clang-usan

Found-by: Katerina Barone-Adesi
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-05-15 23:44:50 +02:00
parent d1310c591e
commit bebce653e5

View File

@ -177,7 +177,7 @@ void name(int16_t *blocks) \
{ \ { \
__asm__ volatile ( \ __asm__ volatile ( \
"pxor %%mm7, %%mm7 \n\t" \ "pxor %%mm7, %%mm7 \n\t" \
"mov %1, %%"REG_a" \n\t" \ "mov $-"#n", %%"REG_a" \n\t" \
"1: \n\t" \ "1: \n\t" \
"movq %%mm7, (%0, %%"REG_a") \n\t" \ "movq %%mm7, (%0, %%"REG_a") \n\t" \
"movq %%mm7, 8(%0, %%"REG_a") \n\t" \ "movq %%mm7, 8(%0, %%"REG_a") \n\t" \
@ -185,12 +185,11 @@ void name(int16_t *blocks) \
"movq %%mm7, 24(%0, %%"REG_a") \n\t" \ "movq %%mm7, 24(%0, %%"REG_a") \n\t" \
"add $32, %%"REG_a" \n\t" \ "add $32, %%"REG_a" \n\t" \
"js 1b \n\t" \ "js 1b \n\t" \
:: "r"(((uint8_t *) blocks) + 128 * n), \ :: "r"(((uint8_t *) blocks) + n) \
"i"(-128 * n) \
: "%"REG_a); \ : "%"REG_a); \
} }
CLEAR_BLOCKS(ff_clear_blocks_mmx, 6) CLEAR_BLOCKS(ff_clear_blocks_mmx, 768)
CLEAR_BLOCKS(ff_clear_block_mmx, 1) CLEAR_BLOCKS(ff_clear_block_mmx, 128)
void ff_clear_block_sse(int16_t *block) void ff_clear_block_sse(int16_t *block)
{ {
@ -212,7 +211,7 @@ void ff_clear_blocks_sse(int16_t *blocks)
{ {
__asm__ volatile ( __asm__ volatile (
"xorps %%xmm0, %%xmm0 \n" "xorps %%xmm0, %%xmm0 \n"
"mov %1, %%"REG_a" \n" "mov $-768, %%"REG_a" \n"
"1: \n" "1: \n"
"movaps %%xmm0, (%0, %%"REG_a") \n" "movaps %%xmm0, (%0, %%"REG_a") \n"
"movaps %%xmm0, 16(%0, %%"REG_a") \n" "movaps %%xmm0, 16(%0, %%"REG_a") \n"
@ -224,7 +223,7 @@ void ff_clear_blocks_sse(int16_t *blocks)
"movaps %%xmm0, 112(%0, %%"REG_a") \n" "movaps %%xmm0, 112(%0, %%"REG_a") \n"
"add $128, %%"REG_a" \n" "add $128, %%"REG_a" \n"
"js 1b \n" "js 1b \n"
:: "r"(((uint8_t *) blocks) + 128 * 6), "i"(-128 * 6) :: "r"(((uint8_t *) blocks) + 128 * 6)
: "%"REG_a); : "%"REG_a);
} }