op_fields is passed over (and excludes register names)
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 7 Apr 2020 15:54:50 +0000 (16:54 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 7 Apr 2020 15:54:50 +0000 (16:54 +0100)
src/soc/decoder/isa/caller.py

index 90f1d76449de745b3b15aac5e1831f14290e6e0f..647e58d62668819e0d9ad46c4632c67bc539afed 100644 (file)
@@ -177,11 +177,10 @@ class ISACaller:
         # then "yield" fields only from op_fields rather than hard-coded
         # list, here.
         fields = self.decoder.sigforms[formname]
-        for name in fields._fields:
-            if name not in ["RA", "RB", "RT"]:
-                sig = getattr(fields, name)
-                val = yield sig
-                self.namespace[name] = SelectableInt(val, sig.width)
+        for name in op_fields:
+            sig = getattr(fields, name)
+            val = yield sig
+            self.namespace[name] = SelectableInt(val, sig.width)
 
     def call(self, name):
         # TODO, asmregs is from the spec, e.g. add RT,RA,RB