CNDSETL

Format: CNDSETL.A dest, source1, source2

CNDSETL.B dest, source1, source2

Construction: CNDSETL.A W0, S0, S2

CNDSETL.B W0, S0, S2

Description: Conditional Set Link Address for Call Loop.

W0 is destination.

This instruction is split into two parts, A and B. Keep all arguments the same for both parts.

Part A does not update Dest or Pe, performing only internal operations.

PartB behaves as below:

find first instance where Pe = 1
link address = addr[first instance's S2]
{
    # if call loop is skipped entirely or not processing chosen address
    # then leave mask count unchanged, otherwise mark for execution
    if S0 == 0 and current instance S2 /= first instance's S2 
    {
        W0 = 1
        Pe = 0
    } 
    else 
    {
        W0 = S0
        Pe = (S0 == 0)
    }
}