take every opportunity *not* to go onto a separate line with commas
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 3 Dec 2023 10:11:28 +0000 (10:11 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 13 Dec 2023 09:34:40 +0000 (09:34 +0000)
bad:
-        log("is priv", instr_is_privileged, hex(self.msr.value),
-            self.msr[MSRb.PR])

good:
-        if instr_is_privileged and self.msr[MSRb.PR] == 1:
+        PR = self.msr[MSRb.PR]
+        log("is priv", instr_is_privileged, hex(self.msr.value), PR)
+        if instr_is_privileged and PR == 1:

src/openpower/decoder/isa/caller.py

index 12970c55b975ef549f49189f0fd3eb62385bab0f..f6ee4e38e8a000045f9309429bc9df3c65300a13 100644 (file)
@@ -2143,10 +2143,10 @@ class ISACaller(ISACallerHelper, ISAFPHelpers, StepLoop):
                       MicrOp.OP_MTSPR.value] and spr_msb:
             instr_is_privileged = True
 
-        log("is priv", instr_is_privileged, hex(self.msr.value),
-            self.msr[MSRb.PR])
         # check MSR priv bit and whether op is privileged: if so, throw trap
-        if instr_is_privileged and self.msr[MSRb.PR] == 1:
+        PR = self.msr[MSRb.PR]
+        log("is priv", instr_is_privileged, hex(self.msr.value), PR)
+        if instr_is_privileged and PR == 1:
             self.call_trap(0x700, PIb.PRIV)
             return