From 3656b222ca1ac7176140dc4b3bd0a4981a1bd32f Mon Sep 17 00:00:00 2001 From: JanLJL Date: Fri, 17 Jan 2020 06:54:31 +0100 Subject: [PATCH] minor change for suspicious instructions --- osaca/db_interface.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/osaca/db_interface.py b/osaca/db_interface.py index 003ac02..5031d79 100755 --- a/osaca/db_interface.py +++ b/osaca/db_interface.py @@ -278,6 +278,15 @@ def _check_sanity_arch_db(arch_mm, isa_mm): if isa_mm.get_instruction(instr_form['name'], instr_form['operands']) is None: # if not, mark them as suspicious and print it on the screen suspicious_instructions.append(instr_form) + # instr forms with less than 3 operands might need an ISA DB entry due to src_reg operands + if ( + len(instr_form['operands']) < 3 + and 'mov' not in instr_form['name'].lower() + and not instr_form['name'].lower().startswith('j') + and instr_form not in suspicious_instructions + and isa_mm.get_instruction(instr_form['name'], instr_form['operands']) is None + ): + suspicious_instructions.append(instr_form) # check for duplicates in DB if arch_mm._check_for_duplicate(instr_form['name'], instr_form['operands']): duplicate_instr_arch.append(instr_form)