Search code examples
x86disassemblyperfintel-syntax

Choose Intel syntax for perf report assembly


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


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.