From: lkcl Date: Sat, 4 Jun 2022 21:12:49 +0000 (+0100) Subject: (no commit message) X-Git-Tag: opf_rfc_ls005_v1~1965 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=50a7076ed0b9015112b61cd9d5e62bc22be2c152;p=libreriscv.git --- diff --git a/openpower/sv/shape_table_format.mdwn b/openpower/sv/shape_table_format.mdwn index 031ac7616..7c6a65b98 100644 --- a/openpower/sv/shape_table_format.mdwn +++ b/openpower/sv/shape_table_format.mdwn @@ -115,7 +115,25 @@ def index_remap(i): return GPR((SVSHAPE.SVGPR<<1)+i+SVSHAPE.offset) for i in 0..VL-1: - GPR(RT + indexed_remap(i) + SVSHAPE.offset) = .... + element_result = .... + GPR(RT + indexed_remap(i)) = element_result +``` + +With element-width overrides included, and using the pseudocode +from the SVP64 [[sv/svp64/appendix#elwidth]] elwidth section +this becomes: + +``` +def index_remap(i): + svreg = SVSHAPE.SVGPR << 1 + srcwid = elwid_to_bitwidth(SVSHAPE.elwid) + offs = SVSHAPE.offset + return get_polymorphed_reg(svreg, srcwid, i) + offs + +for i in 0..VL-1: + element_result = .... + rt_idx = indexed_remap(i) + set_polymorphed_reg(RT, destwid, rt_idx, element_result) ``` Matrix-style reordering still applies to the indices, except limited