def _set_arithmetic_register_layouts(aInstruction): operand_adjustor = VectorOperandAdjustor(aInstruction) for opr_name in ("vd", "vs1", "vs2", "vd/rd", "vd$\neq$0"): opr = aInstruction.find_operand(opr_name, fail_not_found=False) if opr: operand_adjustor.set_vtype_layout(aInstruction, opr)
def _set_indexed_load_store_register_layouts(aInstruction): operand_adjustor = VectorOperandAdjustor(aInstruction) (reg_count, elem_width) = _get_load_store_register_layout_parameters(aInstruction) src_dest_opr = _get_source_or_destination_operand(aInstruction) operand_adjustor.set_vtype_layout(aInstruction, src_dest_opr, aRegCount=reg_count) index_opr = aInstruction.find_operand("vs2") operand_adjustor.set_fixed_element_size_layout(index_opr, aRegCount=1, aElemWidth=elem_width)