From: Jacob Lifshay Date: Sat, 13 May 2023 01:03:58 +0000 (-0700) Subject: allow ignoring FPSCR in tests X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3cbb0b78f429b99d6dfaf6048319dfc5be53cdd1;p=openpower-isa.git allow ignoring FPSCR in tests --- diff --git a/src/openpower/test/state.py b/src/openpower/test/state.py index aa61d94b..3ce18380 100644 --- a/src/openpower/test/state.py +++ b/src/openpower/test/state.py @@ -132,9 +132,10 @@ class State: (self.state_type, s2.state_type, repr(self.code))) # fpscr - self.dut.assertEqual(self.fpscr, s2.fpscr, - "fpscr mismatch (%s != %s) %s" % - (self.state_type, s2.state_type, repr(self.code))) + if self.fpscr is not None and s2.fpscr is not None: + self.dut.assertEqual( + self.fpscr, s2.fpscr, "fpscr mismatch (%s != %s) %s" % + (self.state_type, s2.state_type, repr(self.code))) def compare_mem(self, s2): # copy dics to preserve state mem then pad empty locs since