enforce scalar offset in ISACaller when is_vec is false
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 12 Jan 2024 16:54:16 +0000 (16:54 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 30 Jan 2024 20:56:36 +0000 (20:56 +0000)
src/openpower/decoder/isa/caller.py

index 589ad634d133e1476b86fad176cf324b6c663371..8e828d07d6fbcfb4a6bdbb6ed9d9f6729b9bde02 100644 (file)
@@ -171,6 +171,9 @@ class GPR(dict):
     def __call__(self, ridx, is_vec=False, offs=0, elwidth=64):
         if isinstance(ridx, SelectableInt):
             ridx = ridx.value
+        # scalar is enforced here
+        if not is_vec:
+            offs = 0
         if elwidth == 64:
             return self[ridx+offs]
         # rrrright.  start by breaking down into row/col, based on elwidth