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:54:08 +0000 (20:54 +0000)
src/openpower/decoder/isa/caller.py

index 8816cbd50cb4c1e57b6bf43b022d52f352dcbd32..0541097568dfc9543ffb2c1c68c16ec8e711513a 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