CNDLT#
Format: CNDLT sourcePCND, dest, destPred, source, sourceAdjust.
Construction: CNDLT (0|1|2|3), W0, P0, S0, (1…2).
Description: Conditional Loop Test
W0 is destination
sourceAdjust = 1 or 2
# if there are no running instances for which loop test passes, exit loop
if (or_reduce(all_instances([[!]sourcePCND|true|false]) & all_instances(Pe)) == 0)
{
P0 = 0
if (S0 > sourceAdjust)
{
W0 = S0 - sourceAdjust
Pe = 0
}
else
{
W0 = 0
Pe = 1
}
}
# if current instance is running and the test fails, increment mask count
elseif ([[!]sourcePCND|true|false] && S0 == 0)
{
P0 = 1
W0 = sourceAdjust
Pe = 0
}
# otherwise if current instance is running and the test fails or isn't
# running, leave the mask count alone and set Pe appropriately
else
{
P0 = 1
W0 = S0
Pe = (S0 == 0)
}