Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 26th, 2012  |  syntax: None  |  size: 0.88 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.   146   void no_op(int a, int b) {
  2.    147      int y = 5;
  3.    148      int z = 9;
  4.    149      y += b;
  5.    150      z += a;
  6.    151      return;
  7.    152  }
  8.    153 
  9.    154  _no_op:
  10.    155   pushl %ebp                ;; save the base pointer (call frame pointer) from
  11.    156                             ;; the caller, that is, the function that calls no_op
  12.    157                       
  13.    158   movl %esp, %ebp           ;; create a new call frame by setting %ebp to TOP
  14.    159 
  15.    160   subl $8, %esp                Decrements the stack pointer to make room for a variable
  16.    161   movl $5, -4(%ebp)            Loads y (5) into a register
  17.    162   movl $9, -8(%ebp)            Moves the pointer and loads z (9) into a register
  18.    163   movl 12(%ebp), %edx          
  19.    164   leal -4(%ebp), %eax  
  20.    165   addl %edx, (%eax)
  21.    166   movl 8(%ebp), %edx
  22.    167   leal -8(%ebp), %eax
  23.    168   addl %edx, (%eax)