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

index 5e4d242fb5040895e2778f4b6aa2817c55901843..93ad05bcb85829c2be9daf45d2326426f6a8250d 100644 (file)
@@ -327,6 +327,17 @@ class Reg(Enum):
             Reg.RT_OR_ZERO,
         ))
 
+    @property
+    def pair(self):
+        return (self in (
+            Reg.RSp,
+            Reg.RTp,
+            Reg.FRAp,
+            Reg.FRBp,
+            Reg.FRSp,
+            Reg.FRTp,
+        ))
+
 
 @unique
 class SVP64PredMode(Enum):