add "*%" and "*" vector-numbering convention
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 5 Jul 2022 17:21:55 +0000 (18:21 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 5 Jul 2022 17:21:55 +0000 (18:21 +0100)
https://bugs.libre-soc.org/show_bug.cgi?id=884#c0

src/openpower/sv/trans/svp64.py

index 9efcf1c93c6ad12419d39bdb9fcd40088e89bc6e..7a53ea0585e08f328e7cdf2d7fae6a30243ce406 100644 (file)
@@ -470,6 +470,11 @@ def decode_reg(field):
     # decode the field number. "5.v" or "3.s" or "9"
     # and now also "*0", and "*%0".  note: *NOT* to add "*%rNNN" etc.
     # https://bugs.libre-soc.org/show_bug.cgi?id=884#c0
+    if field.startswith("*%"):
+        return "vector", int(field[2:])  # actual register number
+    if field.startswith("*"):
+        return "vector", int(field[1:])  # actual register number
+    # try old convention (to be retired)
     field = field.split(".")
     regmode = 'scalar'  # default
     if len(field) == 2: