From 9e1afdf6517e90eaed56542ea5be39729c976f27 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 3 Dec 2023 10:11:28 +0000 Subject: [PATCH] take every opportunity *not* to go onto a separate line with commas 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openpower/decoder/isa/caller.py b/src/openpower/decoder/isa/caller.py index 12970c55..f6ee4e38 100644 --- a/src/openpower/decoder/isa/caller.py +++ b/src/openpower/decoder/isa/caller.py @@ -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 -- 2.30.2