From f05552305c24586fc0ddf25a993a0cf290831624 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 29 Aug 2022 12:13:34 +0100 Subject: [PATCH] add logging into ISACaller.handle_overflow to see what gets set --- src/openpower/decoder/isa/caller.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/openpower/decoder/isa/caller.py b/src/openpower/decoder/isa/caller.py index 9ce3b11f..03db3ff7 100644 --- a/src/openpower/decoder/isa/caller.py +++ b/src/openpower/decoder/isa/caller.py @@ -930,11 +930,13 @@ class ISACaller(ISACallerHelper, ISAFPHelpers): ov32 = 1 if input32_sgn[0] == input32_sgn[1] and \ output32_sgn != input32_sgn[0] else 0 + # now update XER OV/OV32/SO + so = self.spr['XER'][XER_bits['SO']] + new_so = so | ov # sticky overflow ORs in old with new self.spr['XER'][XER_bits['OV']] = ov self.spr['XER'][XER_bits['OV32']] = ov32 - so = self.spr['XER'][XER_bits['SO']] - so = so | ov - self.spr['XER'][XER_bits['SO']] = so + self.spr['XER'][XER_bits['SO']] = new_so + log(" set overflow", ov, ov32, so, new_so) def handle_comparison(self, outputs, cr_idx=0, overflow=None, no_so=False): out = outputs[0] -- 2.30.2