From 43c12d804da4fe27ba9ce8df026e50f38901357d Mon Sep 17 00:00:00 2001 From: Thomas Phillips Date: Wed, 8 Nov 2023 19:15:53 +1300 Subject: [PATCH] Fix can_resolve_register_differences and round percentages --- tools/reccmp/reccmp.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tools/reccmp/reccmp.py b/tools/reccmp/reccmp.py index 9beb2f92..05f1ec26 100755 --- a/tools/reccmp/reccmp.py +++ b/tools/reccmp/reccmp.py @@ -336,21 +336,21 @@ def parse_asm(file, addr, size): return asm REGISTER_LIST = set([ - 'ax' - 'bp' - 'bx' - 'cx' - 'di' - 'dx' - 'eax' - 'ebp' - 'ebx' - 'ecx' - 'edi' - 'edx' - 'esi' + 'ax', + 'bp', + 'bx', + 'cx', + 'di', + 'dx', + 'eax', + 'ebp', + 'ebx', + 'ecx', + 'edi', + 'edx', + 'esi', 'esp', - 'si' + 'si', 'sp', ]) WORDS = re.compile(r'\w+') @@ -615,7 +615,7 @@ def gen_svg(svg, name, icon, implemented_funcs, total_funcs, raw_accuracy): if function_count > 0: effective_accuracy = total_effective_accuracy / function_count * 100 actual_accuracy = total_accuracy / function_count * 100 - print(f'\nTotal effective accuracy {effective_accuracy}% across {function_count} functions ({actual_accuracy}% actual accuracy)') + print(f'\nTotal effective accuracy {effective_accuracy:.2f}% across {function_count} functions ({actual_accuracy:.2f}% actual accuracy)') if svg: gen_svg(svg, os.path.basename(original), args.svg_icon, implemented_funcs, function_count, total_effective_accuracy)