From: klehman Date: Thu, 4 Nov 2021 13:45:34 +0000 (-0400) Subject: caller.py: Fix ISACaller modifying test state X-Git-Tag: sv_maxu_works-initial~770 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8973523be79e8b063cf87e266791c36f79c42a12;p=openpower-isa.git caller.py: Fix ISACaller modifying test state --- 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