From 4d4ebb01f2c05ed96c87078ac98d31d1504138f1 Mon Sep 17 00:00:00 2001 From: Kieran Siek Date: Fri, 10 Jun 2022 18:08:19 -0400 Subject: [PATCH] Fix incorrect encoding output in instr_dict.yaml. (#127) Making a shallow copy of the list prevents updating the final encoding output when checking for field overlap. Incorrect: encoding: 0000000rs2rs2rs2rs2rs2rs1rs1rs1rs1rs1000rdrdrdrdrd0110011 Correct: encoding: 0000000----------000-----0110011 --- parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse.py b/parse.py index 227d1235..2de8fbca 100755 --- a/parse.py +++ b/parse.py @@ -109,7 +109,7 @@ def process_enc_line(line, ext): # check if all args of the instruction are present in arg_lut present in # constants.py args = single_fixed.sub(' ', remaining).split() - encoding_args = encoding + encoding_args = encoding.copy() for a in args: if a not in arg_lut: logging.error(f' Found variable {a} in instruction {name} whose mapping in arg_lut does not exist')