(no commit message)
authorlkcl <lkcl@web>
Sat, 4 Jun 2022 21:14:52 +0000 (22:14 +0100)
committerIkiWiki <ikiwiki.info>
Sat, 4 Jun 2022 21:14:52 +0000 (22:14 +0100)
openpower/sv/shape_table_format.mdwn

index 7c6a65b985fdddc716e3bfa5a68d0a9022448c48..59a1f1fcfc88cfc23fa9f1690c2dd54c8620626e 100644 (file)
@@ -155,6 +155,9 @@ def index_remap(ISHAPE, i):
     if ISHAPE.permute = 0b111 # 1,0
        MSHAPE.permute = 0b010 # 1,0,2
     el_idx = remap_matrix(MSHAPE, i)
-    return GPR((ISHAPE.SVGPR<<1)+el_idx+ISHAPE.offset)
+    svreg = ISHAPE.SVGPR << 1
+    srcwid = elwid_to_bitwidth(ISHAPE.elwid)
+    offs = ISHAPE.offset
+    return get_polymorphed_reg(svreg, srcwid, el_idx) + offs
 ```