def create_operand(self, opr_type): if opr_type in [ "Group", "Branch", "AuthBranch", "LoadStore", "AuthLoadStore", "ALU", "DataProcessing", "CacheOp", "SystemOp" ]: self.currentGroupOperand = GroupOperand() return self.currentGroupOperand else: return Operand()
def add_custom_layout_operand(self, aRegCount, aElemWidth): layout_opr = Operand() layout_opr.name = "custom" layout_opr.type = "VectorLayout" layout_opr.oclass = "CustomLayoutOperand" layout_opr.regCount = aRegCount layout_opr.elemWidth = aElemWidth self.mInstr.insert_operand(0, layout_opr)
def add_whole_register_layout_operand(self, aRegCount=1, aRegIndexAlignment=1): layout_opr = Operand() layout_opr.name = "whole" layout_opr.type = "VectorLayout" layout_opr.oclass = "WholeRegisterLayoutOperand" layout_opr.regCount = aRegCount layout_opr.regIndexAlignment = aRegIndexAlignment self.mInstr.insert_operand(0, layout_opr)
def add_implied_register(self, aOpName, aOpType, aAccessType, aInsertIndex): implied_opr = Operand() implied_opr.name = aOpName implied_opr.type = aOpType implied_opr.oclass = "ImpliedRegisterOperand" if aAccessType: implied_opr.access = aAccessType self.mInstr.insert_operand(aInsertIndex, implied_opr)
def add_vtype_layout_operand(self): layout_opr = Operand() layout_opr.name = "vtype" layout_opr.type = "VectorLayout" layout_opr.oclass = "VtypeLayoutOperand" self.mInstr.insert_operand(0, layout_opr)