clarify comments on EXTRA2 exceptions for encoding regnums
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 6 Apr 2022 19:17:16 +0000 (20:17 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 6 Apr 2022 19:17:29 +0000 (20:17 +0100)
src/openpower/sv/trans/svp64.py

index 65aa1768fc2cff1a615bbd27c33babdb1a96099b..7faf37b9858f83dfadbc387249e6753aa19e3559 100644 (file)
@@ -488,7 +488,7 @@ class SVP64Asm:
                         # all good: encode as scalar
                         sv_extra = sv_extra & 0b01
                     else:
-                        # range is r0-r127 in increments of 4
+                        # range is r0-r127 in increments of 2 (r0 r2 ... r126)
                         assert sv_extra & 0b01 == 0, \
                             "%s: vector field %s cannot fit " \
                             "into EXTRA2 %s" % \
@@ -1222,6 +1222,7 @@ if __name__ == '__main__':
     lst = [
         'sv.bc/all 3,12,192',
         'sv.bclr/vsbi 3,81.v,192',
+        'sv.ld 5.v, 4(1.v)',
     ]
     isa = SVP64Asm(lst, macros=macros)
     print("list", list(isa))