From 8973523be79e8b063cf87e266791c36f79c42a12 Mon Sep 17 00:00:00 2001 From: klehman Date: Thu, 4 Nov 2021 09:45:34 -0400 Subject: [PATCH] caller.py: Fix ISACaller modifying test state --- src/openpower/decoder/isa/caller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openpower/decoder/isa/caller.py b/src/openpower/decoder/isa/caller.py index 36e3c732..275136e9 100644 --- a/src/openpower/decoder/isa/caller.py +++ b/src/openpower/decoder/isa/caller.py @@ -15,7 +15,7 @@ related bugs: from nmigen.back.pysim import Settle from functools import wraps -from copy import copy +from copy import copy, deepcopy from openpower.decoder.orderedset import OrderedSet from openpower.decoder.selectable_int import (FieldSelectableInt, SelectableInt, selectconcat) @@ -621,7 +621,7 @@ class ISACaller(ISACallerHelper, ISAFPHelpers): self.msr = SelectableInt(initial_msr, 64) # underlying reg self.pc = PC() # GPR FPR SPR registers - initial_sprs = copy(initial_sprs) # so as not to get modified + initial_sprs = deepcopy(initial_sprs) # so as not to get modified self.gpr = GPR(decoder2, self, self.svstate, regfile) self.fpr = GPR(decoder2, self, self.svstate, fpregfile) self.spr = SPR(decoder2, initial_sprs) # initialise SPRs before MMU -- 2.30.2