def setShift(self, shiftTypeAndAmount): 'Set the :attr:`shiftType` and :attr:`shiftAmount`. Returns ``self``.' self.shiftType = shiftTypeAndAmount[0] shiftAmount = shiftTypeAndAmount[1] if not isinstance(shiftAmount, Operand): shiftAmount = Constant(shiftAmount) self.shiftAmount = shiftAmount return self
def __init__(self, encoding, length, instructionSet): self.length = length self.encoding = encoding self.instructionSet = instructionSet self.condition = Condition(Condition.AL) self.width = '' self.shiftType = 0 self.shiftAmount = Constant(0)