Skip to content

Commit 1e9c5bf

Browse files
committed
asm: FF_-prefix internal macros used in inline assembly
These warnings conflict with system macros on Solaris, producing truckloads of warnings about macro redefinition.
1 parent dc40a70 commit 1e9c5bf

File tree

15 files changed

+677
-677
lines changed

15 files changed

+677
-677
lines changed

libavcodec/x86/blockdsp.c

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@
3333
static void name(int16_t *blocks) \
3434
{ \
3535
__asm__ volatile ( \
36-
"pxor %%mm7, %%mm7 \n\t" \
37-
"mov %1, %%"REG_a" \n\t" \
38-
"1: \n\t" \
39-
"movq %%mm7, (%0, %%"REG_a") \n\t" \
40-
"movq %%mm7, 8(%0, %%"REG_a") \n\t" \
41-
"movq %%mm7, 16(%0, %%"REG_a") \n\t" \
42-
"movq %%mm7, 24(%0, %%"REG_a") \n\t" \
43-
"add $32, %%"REG_a" \n\t" \
44-
"js 1b \n\t" \
36+
"pxor %%mm7, %%mm7 \n\t" \
37+
"mov %1, %%"FF_REG_a" \n\t" \
38+
"1: \n\t" \
39+
"movq %%mm7, (%0, %%"FF_REG_a") \n\t" \
40+
"movq %%mm7, 8(%0, %%"FF_REG_a") \n\t" \
41+
"movq %%mm7, 16(%0, %%"FF_REG_a") \n\t" \
42+
"movq %%mm7, 24(%0, %%"FF_REG_a") \n\t" \
43+
"add $32, %%"FF_REG_a" \n\t" \
44+
"js 1b \n\t" \
4545
:: "r"(((uint8_t *) blocks) + 128 * n), \
4646
"i"(-128 * n) \
47-
: "%"REG_a); \
47+
: "%"FF_REG_a); \
4848
}
4949
CLEAR_BLOCKS(clear_blocks_mmx, 6)
5050
CLEAR_BLOCKS(clear_block_mmx, 1)
@@ -68,21 +68,21 @@ static void clear_block_sse(int16_t *block)
6868
static void clear_blocks_sse(int16_t *blocks)
6969
{
7070
__asm__ volatile (
71-
"xorps %%xmm0, %%xmm0 \n"
72-
"mov %1, %%"REG_a" \n"
73-
"1: \n"
74-
"movaps %%xmm0, (%0, %%"REG_a") \n"
75-
"movaps %%xmm0, 16(%0, %%"REG_a") \n"
76-
"movaps %%xmm0, 32(%0, %%"REG_a") \n"
77-
"movaps %%xmm0, 48(%0, %%"REG_a") \n"
78-
"movaps %%xmm0, 64(%0, %%"REG_a") \n"
79-
"movaps %%xmm0, 80(%0, %%"REG_a") \n"
80-
"movaps %%xmm0, 96(%0, %%"REG_a") \n"
81-
"movaps %%xmm0, 112(%0, %%"REG_a") \n"
82-
"add $128, %%"REG_a" \n"
83-
"js 1b \n"
71+
"xorps %%xmm0, %%xmm0 \n"
72+
"mov %1, %%"FF_REG_a" \n"
73+
"1: \n"
74+
"movaps %%xmm0, (%0, %%"FF_REG_a") \n"
75+
"movaps %%xmm0, 16(%0, %%"FF_REG_a") \n"
76+
"movaps %%xmm0, 32(%0, %%"FF_REG_a") \n"
77+
"movaps %%xmm0, 48(%0, %%"FF_REG_a") \n"
78+
"movaps %%xmm0, 64(%0, %%"FF_REG_a") \n"
79+
"movaps %%xmm0, 80(%0, %%"FF_REG_a") \n"
80+
"movaps %%xmm0, 96(%0, %%"FF_REG_a") \n"
81+
"movaps %%xmm0, 112(%0, %%"FF_REG_a") \n"
82+
"add $128, %%"FF_REG_a" \n"
83+
"js 1b \n"
8484
:: "r"(((uint8_t *) blocks) + 128 * 6), "i"(-128 * 6)
85-
: "%"REG_a);
85+
: "%"FF_REG_a);
8686
}
8787

8888
#endif /* HAVE_INLINE_ASM */

libavcodec/x86/cabac.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@
7272
"mov "tmpbyte" , "statep" \n\t"\
7373
"test "lowword" , "lowword" \n\t"\
7474
"jnz 2f \n\t"\
75-
"mov "byte" , %%"REG_c" \n\t"\
76-
"cmp "end" , %%"REG_c" \n\t"\
75+
"mov "byte" , %%"FF_REG_c" \n\t"\
76+
"cmp "end" , %%"FF_REG_c" \n\t"\
7777
"jge 1f \n\t"\
78-
"add"OPSIZE" $2 , "byte" \n\t"\
78+
"add"FF_OPSIZE" $2 , "byte" \n\t"\
7979
"1: \n\t"\
80-
"movzwl (%%"REG_c") , "tmp" \n\t"\
80+
"movzwl (%%"FF_REG_c"), "tmp" \n\t"\
8181
"lea -1("low") , %%ecx \n\t"\
8282
"xor "low" , %%ecx \n\t"\
8383
"shr $15 , %%ecx \n\t"\
@@ -133,12 +133,12 @@
133133
"mov "tmpbyte" , "statep" \n\t"\
134134
"test "lowword" , "lowword" \n\t"\
135135
" jnz 2f \n\t"\
136-
"mov "byte" , %%"REG_c" \n\t"\
137-
"cmp "end" , %%"REG_c" \n\t"\
136+
"mov "byte" , %%"FF_REG_c" \n\t"\
137+
"cmp "end" , %%"FF_REG_c" \n\t"\
138138
"jge 1f \n\t"\
139-
"add"OPSIZE" $2 , "byte" \n\t"\
139+
"add"FF_OPSIZE" $2 , "byte" \n\t"\
140140
"1: \n\t"\
141-
"movzwl (%%"REG_c") , "tmp" \n\t"\
141+
"movzwl (%%"FF_REG_c") , "tmp" \n\t"\
142142
"lea -1("low") , %%ecx \n\t"\
143143
"xor "low" , %%ecx \n\t"\
144144
"shr $15 , %%ecx \n\t"\
@@ -183,7 +183,7 @@ static av_always_inline int get_cabac_inline_x86(CABACContext *c,
183183
"i"(offsetof(CABACContext, bytestream)),
184184
"i"(offsetof(CABACContext, bytestream_end))
185185
TABLES_ARG
186-
: "%"REG_c, "memory"
186+
: "%"FF_REG_c, "memory"
187187
);
188188
return bit & 1;
189189
}
@@ -214,7 +214,7 @@ static av_always_inline int get_cabac_bypass_sign_x86(CABACContext *c, int val)
214214
"addl %%edx, %%eax \n\t"
215215
"cmp %c5(%2), %1 \n\t"
216216
"jge 1f \n\t"
217-
"add"OPSIZE" $2, %c4(%2) \n\t"
217+
"add"FF_OPSIZE" $2, %c4(%2) \n\t"
218218
"1: \n\t"
219219
"movl %%eax, %c3(%2) \n\t"
220220

@@ -254,7 +254,7 @@ static av_always_inline int get_cabac_bypass_x86(CABACContext *c)
254254
"addl %%ecx, %%eax \n\t"
255255
"cmp %c5(%2), %1 \n\t"
256256
"jge 1f \n\t"
257-
"add"OPSIZE" $2, %c4(%2) \n\t"
257+
"add"FF_OPSIZE" $2, %c4(%2) \n\t"
258258
"1: \n\t"
259259
"movl %%eax, %c3(%2) \n\t"
260260

libavcodec/x86/fpel_mmx.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,34 +79,34 @@ void ff_put_pixels8_mmx(uint8_t *block, const uint8_t *pixels,
7979
ptrdiff_t line_size, int h)
8080
{
8181
__asm__ volatile (
82-
"lea (%3, %3), %%"REG_a" \n\t"
82+
"lea (%3, %3), %%"FF_REG_a" \n\t"
8383
".p2align 3 \n\t"
8484
"1: \n\t"
8585
"movq (%1 ), %%mm0 \n\t"
8686
"movq (%1, %3), %%mm1 \n\t"
8787
"movq %%mm0, (%2) \n\t"
8888
"movq %%mm1, (%2, %3) \n\t"
89-
"add %%"REG_a", %1 \n\t"
90-
"add %%"REG_a", %2 \n\t"
89+
"add %%"FF_REG_a", %1 \n\t"
90+
"add %%"FF_REG_a", %2 \n\t"
9191
"movq (%1 ), %%mm0 \n\t"
9292
"movq (%1, %3), %%mm1 \n\t"
9393
"movq %%mm0, (%2) \n\t"
9494
"movq %%mm1, (%2, %3) \n\t"
95-
"add %%"REG_a", %1 \n\t"
96-
"add %%"REG_a", %2 \n\t"
95+
"add %%"FF_REG_a", %1 \n\t"
96+
"add %%"FF_REG_a", %2 \n\t"
9797
"subl $4, %0 \n\t"
9898
"jnz 1b \n\t"
9999
: "+g"(h), "+r"(pixels), "+r"(block)
100100
: "r"((x86_reg)line_size)
101-
: "%"REG_a, "memory"
101+
: "%"FF_REG_a, "memory"
102102
);
103103
}
104104

105105
void ff_put_pixels16_mmx(uint8_t *block, const uint8_t *pixels,
106106
ptrdiff_t line_size, int h)
107107
{
108108
__asm__ volatile (
109-
"lea (%3, %3), %%"REG_a" \n\t"
109+
"lea (%3, %3), %%"FF_REG_a" \n\t"
110110
".p2align 3 \n\t"
111111
"1: \n\t"
112112
"movq (%1 ), %%mm0 \n\t"
@@ -117,8 +117,8 @@ void ff_put_pixels16_mmx(uint8_t *block, const uint8_t *pixels,
117117
"movq %%mm4, 8(%2) \n\t"
118118
"movq %%mm1, (%2, %3) \n\t"
119119
"movq %%mm5, 8(%2, %3) \n\t"
120-
"add %%"REG_a", %1 \n\t"
121-
"add %%"REG_a", %2 \n\t"
120+
"add %%"FF_REG_a", %1 \n\t"
121+
"add %%"FF_REG_a", %2 \n\t"
122122
"movq (%1 ), %%mm0 \n\t"
123123
"movq 8(%1 ), %%mm4 \n\t"
124124
"movq (%1, %3), %%mm1 \n\t"
@@ -127,13 +127,13 @@ void ff_put_pixels16_mmx(uint8_t *block, const uint8_t *pixels,
127127
"movq %%mm4, 8(%2) \n\t"
128128
"movq %%mm1, (%2, %3) \n\t"
129129
"movq %%mm5, 8(%2, %3) \n\t"
130-
"add %%"REG_a", %1 \n\t"
131-
"add %%"REG_a", %2 \n\t"
130+
"add %%"FF_REG_a", %1 \n\t"
131+
"add %%"FF_REG_a", %2 \n\t"
132132
"subl $4, %0 \n\t"
133133
"jnz 1b \n\t"
134134
: "+g"(h), "+r"(pixels), "+r"(block)
135135
: "r"((x86_reg)line_size)
136-
: "%"REG_a, "memory"
136+
: "%"FF_REG_a, "memory"
137137
);
138138
}
139139

libavcodec/x86/h264_i386.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,21 @@ static int decode_significance_x86(CABACContext *c, int max_coeff,
8484
"sub %10, %1 \n\t"
8585
"mov %2, %0 \n\t"
8686
"movl %7, %%ecx \n\t"
87-
"add %1, %%"REG_c" \n\t"
87+
"add %1, %%"FF_REG_c" \n\t"
8888
"movl %%ecx, (%0) \n\t"
8989

9090
"test $1, %4 \n\t"
9191
" jnz 5f \n\t"
9292

93-
"add"OPSIZE" $4, %2 \n\t"
93+
"add"FF_OPSIZE" $4, %2 \n\t"
9494

9595
"4: \n\t"
9696
"add $1, %1 \n\t"
9797
"cmp %8, %1 \n\t"
9898
" jb 3b \n\t"
9999
"mov %2, %0 \n\t"
100100
"movl %7, %%ecx \n\t"
101-
"add %1, %%"REG_c" \n\t"
101+
"add %1, %%"FF_REG_c" \n\t"
102102
"movl %%ecx, (%0) \n\t"
103103
"5: \n\t"
104104
"add %9, %k0 \n\t"
@@ -109,7 +109,7 @@ static int decode_significance_x86(CABACContext *c, int max_coeff,
109109
"i"(offsetof(CABACContext, bytestream)),
110110
"i"(offsetof(CABACContext, bytestream_end))
111111
TABLES_ARG
112-
: "%"REG_c, "memory"
112+
: "%"FF_REG_c, "memory"
113113
);
114114
return coeff_count;
115115
}
@@ -175,7 +175,7 @@ static int decode_significance_8x8_x86(CABACContext *c,
175175
"test $1, %4 \n\t"
176176
" jnz 5f \n\t"
177177

178-
"add"OPSIZE" $4, %2 \n\t"
178+
"add"FF_OPSIZE" $4, %2 \n\t"
179179

180180
"4: \n\t"
181181
"addl $1, %k6 \n\t"
@@ -194,7 +194,7 @@ static int decode_significance_8x8_x86(CABACContext *c,
194194
"i"(offsetof(CABACContext, bytestream)),
195195
"i"(offsetof(CABACContext, bytestream_end)),
196196
"i"(H264_LAST_COEFF_FLAG_OFFSET_8x8_OFFSET) TABLES_ARG
197-
: "%"REG_c, "memory"
197+
: "%"FF_REG_c, "memory"
198198
);
199199
return coeff_count;
200200
}

0 commit comments

Comments
 (0)