def adjust_vdrd_vs2_rs1_vm(aInstruction): operand_adjustor = VectorOperandAdjustor(aInstruction) operand_adjustor.set_vdrd_int() operand_adjustor.set_vs2() operand_adjustor.set_rs1_int() operand_adjustor.set_vm() return True
def adjust_vd_rs1_vm(aInstruction): operand_adjustor = VectorOperandAdjustor(aInstruction) if aInstruction.iclass == 'VectorLoadStoreInstruction': operand_adjustor.set_vd_ls_dest() operand_adjustor.set_rs1_int_ls_base() width = get_element_size(aInstruction.find_operand('const_bits')) attr_dict = dict() subop_dict = dict() subop_dict['base'] = 'rs1' attr_dict['alignment'] = width attr_dict['base'] = 'rs1' attr_dict['data-size'] = width attr_dict['element-size'] = width attr_dict['mem-access'] = 'Read' add_addressing_operand(aInstruction, None, 'LoadStore', 'VectorBaseOffsetLoadStoreOperand', subop_dict, attr_dict) else: funct3 = aInstruction.find_operand('const_bits').value[11:14] operand_adjustor.set_vd() if funct3 == '101': #OPFVF operand_adjustor.set_rs1_sp() else: operand_adjustor.set_rs1_int() operand_adjustor.set_vm() return True
def adjust_vd_rs1_vm(aInstruction): operand_adjustor = VectorOperandAdjustor(aInstruction) if aInstruction.iclass == "VectorLoadStoreInstruction": operand_adjustor.set_vd_ls_dest() operand_adjustor.set_rs1_int_ls_base() width = get_element_size(aInstruction.find_operand("const_bits")) attr_dict = dict() subop_dict = dict() subop_dict["base"] = "rs1" attr_dict["alignment"] = width attr_dict["base"] = "rs1" attr_dict["data-size"] = width attr_dict["element-size"] = width attr_dict["mem-access"] = "Read" add_addressing_operand( aInstruction, None, "LoadStore", "VectorBaseOffsetLoadStoreOperand", subop_dict, attr_dict, ) else: funct3 = aInstruction.find_operand("const_bits").value[11:14] operand_adjustor.set_vd() if funct3 == "101": # OPFVF operand_adjustor.set_rs1_sp() else: operand_adjustor.set_rs1_int() operand_adjustor.set_vm() return True
def adjust_vd_rs1(aInstruction): if aInstruction.iclass == "LoadStoreInstruction": operand_adjustor = VectorOperandAdjustor(aInstruction) operand_adjustor.set_vd() operand_adjustor.set_rs1_int_ls_base() width = get_element_size(aInstruction.find_operand("const_bits")) attr_dict = dict() subop_dict = dict() subop_dict["base"] = "rs1" attr_dict["alignment"] = width attr_dict["base"] = "rs1" attr_dict["element-size"] = width attr_dict["mem-access"] = "Read" add_addressing_operand( aInstruction, None, "LoadStore", "VectorBaseOffsetLoadStoreOperandRISCV", subop_dict, attr_dict, ) else: operand_adjustor = VectorOperandAdjustor(aInstruction) operand_adjustor.set_vd() if ".F" in aInstruction.name: operand_adjustor.set_rs1_sp() else: operand_adjustor.set_rs1_int() return True
def adjust_vd_rs1_vm(aInstruction): funct3 = aInstruction.find_operand('const_bits').value[11:14] operand_adjustor = VectorOperandAdjustor(aInstruction) operand_adjustor.set_vd() if funct3 == '101': #OPFVF operand_adjustor.set_rs1_sp() else: operand_adjustor.set_rs1_int() operand_adjustor.set_vm() return True
def adjust_vdrd_rs1_vm(aInstruction): funct3 = aInstruction.find_operand("const_bits").value[11:14] operand_adjustor = VectorOperandAdjustor(aInstruction) if funct3 == "101": # OPFVF operand_adjustor.set_vdrd_sp() operand_adjustor.set_rs1_sp() else: operand_adjustor.set_vdrd_int() operand_adjustor.set_rs1_int() operand_adjustor.set_vm() return True
def adjust_vd_vs2_rs1_vm(aInstruction): funct3 = aInstruction.find_operand('const_bits').value[6:9] operand_adjustor = VectorOperandAdjustor(aInstruction) operand_adjustor.set_vd() operand_adjustor.set_vs2() if funct3 == '101': #OPFVF operand_adjustor.set_rs1_sp() else: operand_adjustor.set_rs1_int() operand_adjustor.set_vm() if aInstruction.name in ('VFSLIDE1UP.VF', 'VRGATHER.VX', 'VSLIDE1UP.VX', 'VSLIDEUP.VX'): operand_adjustor.set_vs2_differ_vd() return True
def adjust_vd_vs2_rs1_vm(aInstruction): funct3 = aInstruction.find_operand("const_bits").value[6:9] operand_adjustor = VectorOperandAdjustor(aInstruction) operand_adjustor.set_vd() operand_adjustor.set_vs2() if funct3 == "101": # OPFVF operand_adjustor.set_rs1_sp() else: operand_adjustor.set_rs1_int() operand_adjustor.set_vm() if aInstruction.name in ( "VFSLIDE1UP.VF", "VRGATHER.VX", "VSLIDE1UP.VX", "VSLIDEUP.VX", ): operand_adjustor.set_vs2_differ_vd() return True
def adjust_vd_nonzero_vs2_rs1(aInstruction): operand_adjustor = VectorOperandAdjustor(aInstruction) operand_adjustor.set_vd_nonzero() operand_adjustor.set_vs2() operand_adjustor.set_rs1_int() return True