checkstack.py should not match pushaw on stack usage check.
authorKevin O'Connor <kevin@koconnor.net>
Thu, 11 Jun 2009 01:40:26 +0000 (21:40 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Thu, 11 Jun 2009 01:40:26 +0000 (21:40 -0400)
Tighten regex so that pushaw doesn't confuse parser.

tools/checkstack.py

index 7cc48adb9fb0ff4e654eca1fcb996eecc4d32674..aa38ea8e842e7f94362ce786b277e2b9febf83d4 100755 (executable)
@@ -42,7 +42,7 @@ re_asm = re.compile(
     + r'):\t.*\t(addr32 )?(?P<insn>.+?)[ ]*((?P<calladdr>' + hex_s
     + r') <(?P<ref>.*)>)?$')
 re_usestack = re.compile(
-    r'^(push.*)|(sub.* [$](?P<num>0x' + hex_s + r'),%esp)$')
+    r'^(push[f]?[lw])|(sub.* [$](?P<num>0x' + hex_s + r'),%esp)$')
 
 def calc():
     # funcs[funcaddr] = [funcname, basicstackusage, maxstackusage