From: Luke Kenneth Casson Leighton Date: Sat, 1 Oct 2022 13:21:44 +0000 (+0100) Subject: simplify setting default SVSHAPE SPRs to zero X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a2e30e2aa076f763a54e6f3ce8c78bd943408a3a;p=openpower-isa.git simplify setting default SVSHAPE SPRs to zero --- diff --git a/src/openpower/decoder/isa/caller.py b/src/openpower/decoder/isa/caller.py index 1bc5bed4..2f9d8aa0 100644 --- a/src/openpower/decoder/isa/caller.py +++ b/src/openpower/decoder/isa/caller.py @@ -1052,10 +1052,7 @@ class ISACaller(ISACallerHelper, ISAFPHelpers, StepLoop): # set up 4 dummy SVSHAPEs if they aren't already set up for i in range(4): sname = 'SVSHAPE%d' % i - if sname not in self.spr: - val = 0 - else: - val = self.spr[sname].value + val = self.spr.get(sname, 0) # make sure it's an SVSHAPE self.spr[sname] = SVSHAPE(val, self.gpr) self.last_op_svshape = False