[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lightning] TYing the incr example

From: Mathieu Suen
Subject: [Lightning] TYing the incr example
Date: Thu, 1 Jul 2010 09:16:57 -0700 (PDT)


When I implement the incr exemple from the documentation I 
got the following instruction:

   0x8108338:    push   %ebx
   0x8108339:    push   %esi
   0x810833a:    push   %edi
   0x810833b:    push   %ebp
   0x810833c:    mov    %esp,%ebp
   0x810833e:    mov    0x14(%ebp),%eax
   0x8108341:    add    $0x1,%eax
   0x8108344:    pop    %ebp
   0x8108345:    pop    %edi
   0x8108346:    pop    %esi
   0x8108347:    pop    %ebx
   0x8108348:    ret  

Whereas in the documentation it show:

  pushl %ebp
  movl  %esp, %ebp
  pushl %ebx
  pushl %esi
  pushl %edi
  movl  8(%ebp), %eax        movl 4(%esp), %eax
  addl  $1, %eax             incl %eax
  popl  %edi
  popl  %esi
  popl  %ebx
  popl  %ebp
  ret           The pop/push aren't in the same order so I am wondering if that 
could be an issue.
At first sight it seems to work fine since the argument is correctly fetch. 
"mov    0x14(%ebp),%eax"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]