@@ -2638,6 +2638,7 @@ Encoding::
26382638Description::
26392639Loads a 2D matrix tile from memory into the vector register group starting at _vd_.
26402640_rs1_ holds the matrix base address; _rs2_ holds the leading dimension `LD` in elements.
2641+ if _rs2_ holds zero (0), the leading dimension `LD` is set to λ × LMUL.
26412642When _Lλ_ is specified, it overrides `lambda[2:0]` from `vtype` for this instruction.
26422643Inactive elements (masked off) are not updated unless `vtype.vma`=1 (mask-agnostic), in which case they may be overwritten with 1s.
26432644Tail elements (index ≥ VL) are not updated unless `vtype.vta`=1 (tail-agnostic), in which case they may be overwritten with 1s.
@@ -2677,6 +2678,10 @@ let LD : int = unsigned(X(rs2));
26772678let vm_val = read_vmask(num_elem, vm, zvreg);
26782679let linesize : int = eff_lambda * LMUL;
26792680
2681+ if LD == 0 then {
2682+ LD = eff_lambda * LMUL;
2683+ }
2684+
26802685foreach (i from 0 to (num_elem - 1)) {
26812686 if vm_val[i] == 0b1 then {
26822687 set_vstart(to_bits_unsafe(16, i));
@@ -2737,6 +2742,7 @@ Encoding::
27372742Description::
27382743Stores the 2D matrix tile held in the vector register group starting at _vs3_ to memory.
27392744_rs1_ holds the matrix base address; _rs2_ holds the leading dimension `LD` in elements.
2745+ if _rs2_ holds zero (0), the leading dimension `LD` is set to λ × LMUL.
27402746When _Lλ_ is specified, it overrides `lambda[2:0]` from `vtype` for this instruction.
27412747Inactive elements (masked off) are not written to memory and do not raise exceptions.
27422748Tail elements (index ≥ VL) are not written to memory and do not raise exceptions.
@@ -2770,6 +2776,10 @@ let LD : int = unsigned(X(rs2));
27702776let vm_val = read_vmask(num_elem, vm, zvreg);
27712777let linesize : int = eff_lambda * LMUL;
27722778
2779+ if LD == 0 then {
2780+ LD = eff_lambda * LMUL;
2781+ }
2782+
27732783foreach (i from 0 to (num_elem - 1)) {
27742784 if vm_val[i] == 0b1 then {
27752785 set_vstart(to_bits_unsafe(16, i));
@@ -2833,6 +2843,7 @@ required by the matrix multiplier.
28332843This instruction is used when a B tile is stored in row-major order, or when an A or C tile
28342844is stored in column-major order in memory.
28352845_rs1_ holds the matrix base address; _rs2_ holds the leading dimension `LD` in elements.
2846+ if _rs2_ holds zero (0), the leading dimension `LD` is set to λ × LMUL.
28362847When _Lλ_ is specified, it overrides `lambda[2:0]` from `vtype` for this instruction.
28372848Inactive elements (masked off) are not updated unless `vtype.vma`=1 (mask-agnostic), in which case they may be overwritten with 1s.
28382849Tail elements (index ≥ VL) are not updated unless `vtype.vta`=1 (tail-agnostic), in which case they may be overwritten with 1s.
@@ -2867,6 +2878,10 @@ let LD : int = unsigned(X(rs2));
28672878let vm_val = read_vmask(num_elem, vm, zvreg);
28682879let linesize : int = eff_lambda * LMUL;
28692880
2881+ if LD == 0 then {
2882+ LD = eff_lambda * LMUL;
2883+ }
2884+
28702885foreach (i from 0 to (num_elem - 1)) {
28712886 if vm_val[i] == 0b1 then {
28722887 set_vstart(to_bits_unsafe(16, i));
@@ -2929,6 +2944,7 @@ Description::
29292944Stores a 2D matrix tile from vector registers to memory, applying the inverse transposition
29302945of `vmttl.v`.
29312946_rs1_ holds the matrix base address; _rs2_ holds the leading dimension `LD` in elements.
2947+ if _rs2_ holds zero (0), the leading dimension `LD` is set to λ × LMUL.
29322948When _Lλ_ is specified, it overrides `lambda[2:0]` from `vtype` for this instruction.
29332949Inactive elements (masked off) are not written to memory and do not raise exceptions.
29342950Tail elements (index ≥ VL) are not written to memory and do not raise exceptions.
@@ -2962,6 +2978,10 @@ let LD : int = unsigned(X(rs2));
29622978let vm_val = read_vmask(num_elem, vm, zvreg);
29632979let linesize : int = eff_lambda * LMUL;
29642980
2981+ if LD == 0 then {
2982+ LD = eff_lambda * LMUL;
2983+ }
2984+
29652985foreach (i from 0 to (num_elem - 1)) {
29662986 if vm_val[i] == 0b1 then {
29672987 set_vstart(to_bits_unsafe(16, i));
0 commit comments