

def _load_alias_mapper(self):
    if (self._arch_mode == ARCH_X86_MODE_32):
        alias_mapper = {
            'al': ('eax', 0),
            'ah': ('eax', 8),
            'ax': ('eax', 0),
            'bl': ('ebx', 0),
            'bh': ('ebx', 8),
            'bx': ('ebx', 0),
            'cl': ('ecx', 0),
            'ch': ('ecx', 8),
            'cx': ('ecx', 0),
            'dl': ('edx', 0),
            'dh': ('edx', 8),
            'dx': ('edx', 0),
            'si': ('esi', 0),
            'di': ('edi', 0),
            'bp': ('ebp', 0),
            'sp': ('esp', 0),
        }
        flags_reg = 'eflags'
    else:
        alias_mapper = {
            'al': ('rax', 0),
            'ah': ('rax', 8),
            'ax': ('rax', 0),
            'bl': ('rbx', 0),
            'bh': ('rbx', 8),
            'bx': ('rbx', 0),
            'cl': ('rcx', 0),
            'ch': ('rcx', 8),
            'cx': ('rcx', 0),
            'dl': ('rdx', 0),
            'dh': ('rdx', 8),
            'dx': ('rdx', 0),
            'di': ('rdi', 0),
            'dil': ('rdi', 0),
            'si': ('rsi', 0),
            'sil': ('rsi', 0),
            'sp': ('rsp', 0),
            'bpl': ('rbp', 0),
            'bp': ('rbp', 0),
            'spl': ('rsp', 0),
            'eax': ('rax', 0),
            'ebx': ('rbx', 0),
            'ecx': ('rcx', 0),
            'edx': ('rdx', 0),
            'edi': ('rdi', 0),
            'esi': ('rsi', 0),
            'ebp': ('rbp', 0),
            'esp': ('rsp', 0),
            'eip': ('rip', 0),
            'r8b': ('r8', 0),
            'r8w': ('r8', 0),
            'r8d': ('r8', 0),
            'r9b': ('r9', 0),
            'r9w': ('r9', 0),
            'r9d': ('r9', 0),
            'r10b': ('r10', 0),
            'r10w': ('r10', 0),
            'r10d': ('r10', 0),
            'r11b': ('r11', 0),
            'r11w': ('r11', 0),
            'r11d': ('r11', 0),
            'r12b': ('r12', 0),
            'r12w': ('r12', 0),
            'r12d': ('r12', 0),
            'r13b': ('r13', 0),
            'r13w': ('r13', 0),
            'r13d': ('r13', 0),
            'r14b': ('r14', 0),
            'r14w': ('r14', 0),
            'r14d': ('r14', 0),
            'r15b': ('r15', 0),
            'r15w': ('r15', 0),
            'r15d': ('r15', 0),
        }
        flags_reg = 'rflags'
    flags_mapper = {
        'cf': (flags_reg, 0),
        'pf': (flags_reg, 2),
        'af': (flags_reg, 4),
        'zf': (flags_reg, 6),
        'sf': (flags_reg, 7),
        'df': (flags_reg, 10),
        'of': (flags_reg, 11),
    }
    alias_mapper.update(flags_mapper)
    self._alias_mapper = alias_mapper

dataset/ETHPy150Open programa-stic/barf-project/barf/barf/arch/x86/x86base.py X86ArchitectureInformation._load_alias_mapper/original