From 3348afe219adb880b273879a26e4f16bb6c3f67e Mon Sep 17 00:00:00 2001 From: JanLJL Date: Thu, 27 Feb 2020 18:11:32 +0100 Subject: [PATCH] minor fixes --- osaca/db_interface.py | 14 +++++++------- tests/test_files/asmbench_import_aarch64.dat | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/osaca/db_interface.py b/osaca/db_interface.py index a72ca7e..1b30c7d 100755 --- a/osaca/db_interface.py +++ b/osaca/db_interface.py @@ -216,7 +216,11 @@ def _create_db_operand_aarch64(operand): elif operand in 'wxbhsdq': return {'class': 'register', 'prefix': operand} elif operand.startswith('v'): - return {'class': 'register', 'prefix': 'v', 'shape': operand[1:2]} + return { + 'class': 'register', + 'prefix': 'v', + 'shape': operand[1:2] if operand[1:2] != '' else 'd', + } elif operand.startswith('m'): return { 'class': 'memory', @@ -391,9 +395,7 @@ def _get_sanity_report_verbose( s += 'Instruction forms without port pressure assignment:\n' if len(m_pp) != 0 else '' for instr_form in m_pp: s += '{}{}{}\n'.format(BRIGHT_MAGENTA, _get_full_instruction_name(instr_form), WHITE) - s += ( - 'Instruction forms which might miss an ISA DB entry:\n' if len(suspic_instr) != 0 else '' - ) + s += 'Instruction forms which might miss an ISA DB entry:\n' if len(suspic_instr) != 0 else '' for instr_form in suspic_instr: s += '{}{}{}\n'.format(BRIGHT_CYAN, _get_full_instruction_name(instr_form), WHITE) s += 'Duplicate instruction forms in uarch DB:\n' if len(dup_arch) != 0 else '' @@ -403,9 +405,7 @@ def _get_sanity_report_verbose( for instr_form in dup_isa: s += '{}{}{}\n'.format(BRIGHT_YELLOW, _get_full_instruction_name(instr_form), WHITE) s += ( - 'Instruction forms existing in ISA DB but not in uarch DB:\n' - if len(only_isa) != 0 - else '' + 'Instruction forms existing in ISA DB but not in uarch DB:\n' if len(only_isa) != 0 else '' ) for instr_form in only_isa: s += '{}{}{}\n'.format(CYAN, _get_full_instruction_name(instr_form), WHITE) diff --git a/tests/test_files/asmbench_import_aarch64.dat b/tests/test_files/asmbench_import_aarch64.dat index 23a69d3..f9547b2 100644 --- a/tests/test_files/asmbench_import_aarch64.dat +++ b/tests/test_files/asmbench_import_aarch64.dat @@ -1,8 +1,8 @@ -testinstr-i_d_v +testinstr-i_d_vd Latency: 4.013 cy Throughput: 0.501 cy -testinstr2-mboi_v +testinstr2-mboi_vs Latency: 4.013 cy Throughput: 0.501 cy