power_enums: introduce Reg pair property
authorDmitry Selyutin <ghostmansd@gmail.com>
Wed, 31 May 2023 21:00:51 +0000 (00:00 +0300)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 2 Jun 2023 18:51:19 +0000 (19:51 +0100)
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):