Recent versions of gcc will sometimes place conditional checks in the
code prior to setting up the function's stack frame. Handle this case
correctly.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
if '%esp' in insn or insn.startswith('leal'):
# Still part of initial header
continue
+ if not stackusage and (
+ insn.startswith('test') or insn.startswith('cmp')
+ or insn.startswith('j')):
+ # There may be conditional checks prior to stack frame
+ continue
cur.basic_stack_usage = stackusage
atstart = 0