From 85e1b3b32642473e58ca672bb77d06ba8c9d959c Mon Sep 17 00:00:00 2001 From: lkcl Date: Tue, 22 Dec 2020 23:39:57 +0000 Subject: [PATCH] --- openpower/sv/vector_ops.mdwn | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/openpower/sv/vector_ops.mdwn b/openpower/sv/vector_ops.mdwn index 736583675..ea7cbc9d3 100644 --- a/openpower/sv/vector_ops.mdwn +++ b/openpower/sv/vector_ops.mdwn @@ -47,7 +47,9 @@ Based on RVV vmiota. vmiota may be viewed as a cumulative variant of popcount, When masked, only the bits not masked out are included in the count process. - viota.m vd, vs2, vm + viota RT/v, RA, RB + +Note that when RA=0 this indicates to test against all 1s, resulting in the instruction generating a vector sequence [0, 1, 2... VL-1]. This will be equivalent to RVV vid.m which is a pseudo-op, here (RA=0). Example @@ -64,16 +66,17 @@ Example 1 1 1 5 1 7 1 0 v4 results def iota(RT, RA, RB): - mask = iregs[RB] # or if zero, all 1s. + mask = RB ? iregs[RB] : 0b111111...1 + val = RA ? iregs[RA] : 0b111111...1 for i in range(VL): + if RA.scalar: testmask = (1<