Exemple #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
Exemple #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
Exemple #5
0
def qwhile(mask, seq):
    return [CmpNeq(mask), Goto(endlabel(seq))] + seq