pysvp64dis: accept SelectableInt as an Instruction
authorDmitry Selyutin <ghostmansd@gmail.com>
Wed, 17 Aug 2022 11:52:52 +0000 (14:52 +0300)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 29 Aug 2022 19:38:11 +0000 (20:38 +0100)
src/openpower/sv/trans/pysvp64dis.py

index c2218d0afaf99e1b3f1caa93bdc4fc5702c994aa..dbbdce9459b03bf95cfb35f4f51e035f36a36cac 100644 (file)
@@ -28,7 +28,7 @@ DATABASE = _Database(_find_wiki_dir())
 
 class Instruction(_SelectableInt):
     def __init__(self, value, byteorder=ByteOrder.LITTLE):
-        if isinstance(value, Instruction):
+        if isinstance(value, _SelectableInt):
             value = value.value
         elif isinstance(value, bytes):
             value = int.from_bytes(value, byteorder=str(byteorder))