power_insn: introduce byteorder class
authorDmitry Selyutin <ghostmansd@gmail.com>
Wed, 10 May 2023 17:49:34 +0000 (17:49 +0000)
committerDmitry Selyutin <ghostmansd@gmail.com>
Sat, 13 May 2023 18:37:22 +0000 (18:37 +0000)
src/openpower/decoder/power_insn.py

index f8188edaf63c737b693a6461c6b8e6a8e1429498..1efa16e76e73fb39a88cf6c1a32794ecf39fb114 100644 (file)
@@ -55,6 +55,14 @@ from openpower.decoder.power_fields import (
 from openpower.decoder.pseudo.pagereader import ISA as _ISA
 
 
+class ByteOrder(_enum.Enum):
+    LITTLE = "little"
+    BIG = "big"
+
+    def __str__(self):
+        return self.name.lower()
+
+
 @_functools.total_ordering
 class Style(_enum.Enum):
     LEGACY = _enum.auto()