Advertisement
Guest User

Untitled

a guest
Oct 7th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Dump of assembler code for function computeFirstBinom(int, int):
  2.    0x000000000000092a <+0>: push   rbp                      ; push <base pointer> to stack
  3.    0x000000000000092b <+1>: mov    rbp,rsp                  ; move <stack frame pointer> to <base pointer<
  4.    
  5.    0x000000000000092e <+4>: mov    DWORD PTR [rbp-0x14],edi ; move the 4 bytes from register edi to rbp-0x14  --> a
  6.    0x0000000000000931 <+7>: mov    DWORD PTR [rbp-0x18],esi ; move the 4 bytes from register esi to rbp-0x18  --> b
  7.    
  8.    0x0000000000000934 <+10>:    mov    eax,DWORD PTR [rbp-0x14] ; eax = a
  9.    0x0000000000000937 <+13>:    imul   eax,DWORD PTR [rbp-0x14] ; eax *= a --> eax = a*a
  10.    
  11.    0x000000000000093b <+17>:    mov    edx,eax                  ; edx = eax --> edx = a*a
  12.    
  13.    0x000000000000093d <+19>:    mov    eax,DWORD PTR [rbp-0x14] ; eax = a
  14.    0x0000000000000940 <+22>:    imul   eax,DWORD PTR [rbp-0x18] ; eax *= b --> eax = a*b
  15.    
  16.    0x0000000000000944 <+26>:    add    eax,eax                  ; eax += eax --> eax = 2*a*b
  17.    0x0000000000000946 <+28>:    add    edx,eax                  ; edx += eax --> edx = a*a + 2*a*b
  18.    
  19.    0x0000000000000948 <+30>:    mov    eax,DWORD PTR [rbp-0x18] ; eax = b
  20.    0x000000000000094b <+33>:    imul   eax,DWORD PTR [rbp-0x18] ; eax *= b --> eax = b*b
  21.    
  22.    0x000000000000094f <+37>:    add    eax,edx                  ; eax += edx --> eax = a*a + 2*a*b + b*b
  23.    
  24.    0x0000000000000951 <+39>:    mov    DWORD PTR [rbp-0x4],eax  ; ?   move the value of register eax to rbp-0x4
  25.    0x0000000000000954 <+42>:    mov    eax,DWORD PTR [rbp-0x4]  ; ?   move the value of rbp-0x4 to eax
  26.    
  27.    0x0000000000000957 <+45>:    pop    rbp                      ; pop rbp from stack
  28.    0x0000000000000958 <+46>:    ret                             ; return to caller?
  29. End of assembler dump.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement