aboutsummaryrefslogtreecommitdiff
path: root/scripts/checkstack.py
diff options
context:
space:
mode:
authorJohannes Krampf <johannes.krampf@googlemail.com>2014-01-12 11:14:54 -0500
committerKevin O'Connor <kevin@koconnor.net>2014-01-20 12:42:43 -0500
commit064fd069ef88aebe0fdf9850dc35bcffcb616763 (patch)
treefbe4c723b603af0811d18f5dd4b71151e3f92cca /scripts/checkstack.py
parent24ef4fd0d25d5133ced303eb225eceb08549081f (diff)
downloadseabios-hppa-064fd069ef88aebe0fdf9850dc35bcffcb616763.zip
seabios-hppa-064fd069ef88aebe0fdf9850dc35bcffcb616763.tar.gz
seabios-hppa-064fd069ef88aebe0fdf9850dc35bcffcb616763.tar.bz2
build: Make print statements in scripts python3 compatible.
Signed-off-by: Johannes Krampf <johannes.krampf@googlemail.com>
Diffstat (limited to 'scripts/checkstack.py')
-rwxr-xr-xscripts/checkstack.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/checkstack.py b/scripts/checkstack.py
index 23b7c8e..62fef36 100755
--- a/scripts/checkstack.py
+++ b/scripts/checkstack.py
@@ -182,12 +182,12 @@ def calc():
elif insn.startswith('calll'):
noteCall(cur, subfuncs, insnaddr, calladdr, stackusage + 4)
else:
- print "unknown call", ref
+ print("unknown call", ref)
noteCall(cur, subfuncs, insnaddr, calladdr, stackusage)
# Reset stack usage to preamble usage
stackusage = cur[1]
- #print "other", repr(line)
+ #print("other", repr(line))
# Calculate maxstackusage
for funcaddr, info in funcs.items():
@@ -199,7 +199,7 @@ def calc():
funcaddrs = orderfuncs(funcs.keys(), funcs.copy())
# Show all functions
- print OUTPUTDESC
+ print(OUTPUTDESC)
for funcaddr in funcaddrs:
name, basicusage, maxusage, yieldusage, maxyieldusage, count, calls = \
funcs[funcaddr]
@@ -208,15 +208,15 @@ def calc():
yieldstr = ""
if maxyieldusage is not None:
yieldstr = ",%d" % maxyieldusage
- print "\n%s[%d,%d%s]:" % (name, basicusage, maxusage, yieldstr)
+ print("\n%s[%d,%d%s]:" % (name, basicusage, maxusage, yieldstr))
for insnaddr, calladdr, stackusage in calls:
callinfo = funcs.get(calladdr, ("<unknown>", 0, 0, 0, None))
yieldstr = ""
if callinfo[4] is not None:
yieldstr = ",%d" % (stackusage + callinfo[4])
- print " %04s:%-40s [%d+%d,%d%s]" % (
+ print(" %04s:%-40s [%d+%d,%d%s]" % (
insnaddr, callinfo[0], stackusage, callinfo[1]
- , stackusage+callinfo[2], yieldstr)
+ , stackusage+callinfo[2], yieldstr))
def main():
calc()