コード例 #1
0
ファイル: ild.py プロジェクト: xelxebar/xed
def get_info_storage(ptrn_list, priority, is_3dnow):
    """convert list of pattern_t objects to ild_storage_t object"""

    storage = ild_storage.ild_storage_t(is_amd=is_3dnow)

    for p in ptrn_list:
        info = ild_info.ptrn_to_info(p, priority)
        if info not in storage.get_info_list(p.insn_map, p.opcode):
            storage.append_info(p.insn_map, p.opcode, info)
    return storage
コード例 #2
0
def _get_info_storage(agi, ptrn_list, priority):
    """convert list of pattern_t objects to ild_storage_t object, store by
       map/opcode"""

    lookup = ild_storage.get_lookup(agi)
    storage = ild_storage.ild_storage_t(lookup)

    for p in ptrn_list:
        info = ild_info.ptrn_to_info(p, priority) # convert to ild_info_t
        if info not in storage.get_info_list(p.insn_map,p.opcode):
            storage.append_info(p.insn_map, p.opcode, info)
    return storage