Example #1
0
def qif(mask, ifSeq, elseSeq=None):
    if elseSeq:
        return [CmpEq(mask), Goto(label(ifSeq))
                ] + elseSeq + [Goto(endlabel(ifSeq))] + ifSeq
    else:
        endlabel(ifSeq)
        return [CmpNeq(mask), Goto(endlabel(ifSeq))] + ifSeq
def qif(mask, ifSeq, elseSeq=None):
	if elseSeq:
		endlabel(elseSeq) # make sure to populate label of elseSeq before using it
		return [CmpEq(mask), Goto(label(ifSeq))] + elseSeq + [Goto(endlabel(ifSeq))] + ifSeq
	else:
		endlabel(ifSeq)
		return [CmpNeq(mask), Goto(endlabel(ifSeq))] + ifSeq
Example #3
0
def qif(mask, ifSeq, elseSeq=None):
    if elseSeq:
        endlabel(
            elseSeq)  # make sure to populate label of elseSeq before using it
        return [CmpEq(mask), Goto(label(ifSeq))
                ] + elseSeq + [Goto(endlabel(ifSeq))] + ifSeq
    else:
        endlabel(ifSeq)
        return [CmpNeq(mask), Goto(endlabel(ifSeq))] + ifSeq
def qwhile(mask, seq):
	return [CmpNeq(mask), Goto(endlabel(seq))] + seq
Example #5
0
def qwhile(mask, seq):
    return [CmpNeq(mask), Goto(endlabel(seq))] + seq