Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Choose syntax for perf assembly report

My perf report shows everything in AT&T syntax:

...
0,18 │      pop         %rax                      
0,14 │    ← retq                                  
0,18 │a9:   vmovsd      -0x8(%rdi,%rsi,8),%xmm0   
0,12 │af:   pop         %rax                      
     │    ← retq                                  
     │b1:   vxorpd      %xmm2,%xmm2,%xmm2       
0,02 │      vxorpd      %xmm3,%xmm3,%xmm3       
     │b9:   vmovsd      0x8(%rdi,%rax,8),%xmm4  
0,82 │      vmulsd      %xmm1,%xmm1,%xmm1       
0,16 │      vsubsd      %xmm3,%xmm1,%xmm1       
0,96 │      vsubsd      %xmm2,%xmm4,%xmm3       
0,57 │      vmulsd      %xmm3,%xmm0,%xmm0       
5,34 │      vdivsd      %xmm1,%xmm0,%xmm0       
0,55 │      vaddsd      %xmm0,%xmm2,%xmm0      
...

But it’s hard to me to read this, I’m more familiar with Intel syntax.

Is there any way to make perf output it in Intel syntax? I’ve tried to google for manuals but didn’t find any flag to enable this mode

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

perf report -Mintel gives you GAS .intel_syntax noprefix disassembly,
just like objdump -drwC -Mintel

From the man page

-M, --disassembler-style=
Set disassembler style for objdump.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading