simplify setting default SVSHAPE SPRs to zero
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 1 Oct 2022 13:21:44 +0000 (14:21 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 1 Oct 2022 13:21:49 +0000 (14:21 +0100)
src/openpower/decoder/isa/caller.py

index 1bc5bed45790399d56c8018160d101be3cde5bc7..2f9d8aa059aeb15bf7a3b29a91a1c635dc434f46 100644 (file)
@@ -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