Update tools/checkstack.py - new compilers set %ebp in preamble.
authorKevin O'Connor <kevin@koconnor.net>
Sun, 9 Aug 2009 17:10:47 +0000 (13:10 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 9 Aug 2009 17:10:47 +0000 (13:10 -0400)
A 'movl   %esp,%ebp' can occur in the preamble - note for proper stack
    usage checking.

tools/checkstack.py

index aa38ea8e842e7f94362ce786b277e2b9febf83d4..82becdd3a09beea03e7466fc1613723a161ab79b 100755 (executable)
@@ -78,6 +78,9 @@ def calc():
                 stackusage += int(im.group('num'), 16)
 
             if atstart:
+                if insn == 'movl   %esp,%ebp':
+                    # Still part of initial header
+                    continue
                 cur[1] = stackusage
                 atstart = 0