diff mbox

[FFmpeg-devel,2/5] avcodec/h264: change some labels to be macro-local

Message ID 20170405015328.5476-3-jdarnley@obe.tv
State Superseded
Headers show

Commit Message

James Darnley April 5, 2017, 1:53 a.m. UTC
The labels get stripped leading to (slightly) nicer disassembly from
objdump.
---
 libavcodec/x86/h264_idct.asm | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

Comments

Ronald S. Bultje April 5, 2017, 11:41 a.m. UTC | #1
Hi,

On Tue, Apr 4, 2017 at 9:53 PM, James Darnley <jdarnley@obe.tv> wrote:

> The labels get stripped leading to (slightly) nicer disassembly from
> objdump.
>
[..]

> -    jz .cycle%1end
> +    jz %%skip


Can you preserve the leading dot? I don't mind the %%skip, but please make
it .%%skip.

Ronald
James Darnley April 6, 2017, 2:22 p.m. UTC | #2
On 2017-04-05 13:41, Ronald S. Bultje wrote:
> Hi,
> 
> On Tue, Apr 4, 2017 at 9:53 PM, James Darnley <jdarnley@obe.tv> wrote:
> 
>> The labels get stripped leading to (slightly) nicer disassembly from
>> objdump.
>>
> [..]
> 
>> -    jz .cycle%1end
>> +    jz %%skip
> 
> 
> Can you preserve the leading dot? I don't mind the %%skip, but please make
> it .%%skip.

That makes the patch pointless because those symbols don't get stripped.
 If you want the leading dot then I will drop this patch.
Ronald S. Bultje April 6, 2017, 3:11 p.m. UTC | #3
Hi,

On Thu, Apr 6, 2017 at 10:22 AM, James Darnley <jdarnley@obe.tv> wrote:

> On 2017-04-05 13:41, Ronald S. Bultje wrote:
> > Hi,
> >
> > On Tue, Apr 4, 2017 at 9:53 PM, James Darnley <jdarnley@obe.tv> wrote:
> >
> >> The labels get stripped leading to (slightly) nicer disassembly from
> >> objdump.
> >>
> > [..]
> >
> >> -    jz .cycle%1end
> >> +    jz %%skip
> >
> >
> > Can you preserve the leading dot? I don't mind the %%skip, but please
> make
> > it .%%skip.
>
> That makes the patch pointless because those symbols don't get stripped.
>  If you want the leading dot then I will drop this patch.


Oh I see, right...

So, yes, that has disadvantages as well as advantages. I don't really have
an opinion on it. So if nobody else does either, and you like it, I guess
you could commit it?

Ronald
diff mbox

Patch

diff --git a/libavcodec/x86/h264_idct.asm b/libavcodec/x86/h264_idct.asm
index 878ff02..dde40e9 100644
--- a/libavcodec/x86/h264_idct.asm
+++ b/libavcodec/x86/h264_idct.asm
@@ -846,7 +846,7 @@  h264_add8x4_idct_sse2:
 %macro add16_sse2_cycle 2
     movzx       r0, word [r4+%2]
     test        r0, r0
-    jz .cycle%1end
+    jz %%skip
     mov        r0d, dword [r1+%1*8]
 %if ARCH_X86_64
     add         r0, r5
@@ -854,7 +854,7 @@  h264_add8x4_idct_sse2:
     add         r0, r0m
 %endif
     call        h264_add8x4_idct_sse2
-.cycle%1end:
+%%skip:
 %if %1 < 7
     add         r2, 64
 %endif
@@ -883,7 +883,7 @@  REP_RET
 %macro add16intra_sse2_cycle 2
     movzx       r0, word [r4+%2]
     test        r0, r0
-    jz .try%1dc
+    jz %%trydc
     mov        r0d, dword [r1+%1*8]
 %if ARCH_X86_64
     add         r0, r7
@@ -891,11 +891,11 @@  REP_RET
     add         r0, r0m
 %endif
     call        h264_add8x4_idct_sse2
-    jmp .cycle%1end
-.try%1dc:
+    jmp %%skip
+%%trydc:
     movsx       r0, word [r2   ]
     or         r0w, word [r2+32]
-    jz .cycle%1end
+    jz %%skip
     mov        r0d, dword [r1+%1*8]
 %if ARCH_X86_64
     add         r0, r7
@@ -903,7 +903,7 @@  REP_RET
     add         r0, r0m
 %endif
     call        h264_idct_dc_add8_mmxext
-.cycle%1end:
+%%skip:
 %if %1 < 7
     add         r2, 64
 %endif
@@ -930,7 +930,7 @@  REP_RET
 %macro add8_sse2_cycle 2
     movzx       r0, word [r4+%2]
     test        r0, r0
-    jz .try%1dc
+    jz %%trydc
 %if ARCH_X86_64
     mov        r0d, dword [r1+(%1&1)*8+64*(1+(%1>>1))]
     add         r0, [r7]
@@ -940,11 +940,11 @@  REP_RET
     add         r0, dword [r1+(%1&1)*8+64*(1+(%1>>1))]
 %endif
     call        h264_add8x4_idct_sse2
-    jmp .cycle%1end
-.try%1dc:
+    jmp %%cycle_end
+%%trydc:
     movsx       r0, word [r2   ]
     or         r0w, word [r2+32]
-    jz .cycle%1end
+    jz %%cycle_end
 %if ARCH_X86_64
     mov        r0d, dword [r1+(%1&1)*8+64*(1+(%1>>1))]
     add         r0, [r7]
@@ -954,7 +954,7 @@  REP_RET
     add         r0, dword [r1+(%1&1)*8+64*(1+(%1>>1))]
 %endif
     call        h264_idct_dc_add8_mmxext
-.cycle%1end:
+%%cycle_end:
 %if %1 == 1
     add         r2, 384+64
 %elif %1 < 3