power_enums: introduce Reg or_zero property
authorDmitry Selyutin <ghostmansd@gmail.com>
Wed, 31 May 2023 21:00:37 +0000 (00:00 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Thu, 1 Jun 2023 08:19:38 +0000 (11:19 +0300)
src/openpower/decoder/power_enums.py

index e2c5b93bad3fc8a01122a2db9271294a4248a88b..5e4d242fb5040895e2778f4b6aa2817c55901843 100644 (file)
@@ -320,6 +320,13 @@ class Reg(Enum):
 
         return self
 
+    @property
+    def or_zero(self):
+        return (self in (
+            Reg.RA_OR_ZERO,
+            Reg.RT_OR_ZERO,
+        ))
+
 
 @unique
 class SVP64PredMode(Enum):