zelos.emulator.mips module

class zelos.emulator.mips.MipsEmuHelper(zebracorn_engine, state)

Bases: zelos.emulator.base.IEmuHelper

ip_reg = 'pc'
sp_reg = 'sp'
fp_reg = 'fp'
regmap = {'0': 2, '1': 3, '10': 12, '11': 13, '12': 14, '13': 15, '14': 16, '15': 17, '16': 18, '17': 19, '18': 20, '19': 21, '2': 4, '20': 22, '21': 23, '22': 24, '23': 25, '24': 26, '25': 27, '26': 28, '27': 29, '28': 30, '29': 31, '3': 5, '30': 32, '31': 33, '4': 6, '5': 7, '6': 8, '7': 9, '8': 10, '9': 11, 'a0': 6, 'a1': 7, 'a2': 8, 'a3': 9, 'ac0': 45, 'ac1': 46, 'ac2': 47, 'ac3': 48, 'at': 3, 'cc0': 49, 'cc1': 50, 'cc2': 51, 'cc3': 52, 'cc4': 53, 'cc5': 54, 'cc6': 55, 'cc7': 56, 'cp0_userlocal': 138, 'dspcarry': 35, 'dspccond': 34, 'dspefi': 36, 'dspoutflag': 37, 'dspoutflag16_19': 38, 'dspoutflag20': 39, 'dspoutflag21': 40, 'dspoutflag22': 41, 'dspoutflag23': 42, 'dsppos': 43, 'dspscount': 44, 'ending': 139, 'f0': 57, 'f1': 58, 'f10': 67, 'f11': 68, 'f12': 69, 'f13': 70, 'f14': 71, 'f15': 72, 'f16': 73, 'f17': 74, 'f18': 75, 'f19': 76, 'f2': 59, 'f20': 77, 'f21': 78, 'f22': 79, 'f23': 80, 'f24': 81, 'f25': 82, 'f26': 83, 'f27': 84, 'f28': 85, 'f29': 86, 'f3': 60, 'f30': 87, 'f31': 88, 'f4': 61, 'f5': 62, 'f6': 63, 'f7': 64, 'f8': 65, 'f9': 66, 'fcc0': 89, 'fcc1': 90, 'fcc2': 91, 'fcc3': 92, 'fcc4': 93, 'fcc5': 94, 'fcc6': 95, 'fcc7': 96, 'fp': 32, 'gp': 30, 'hi': 129, 'hi0': 45, 'hi1': 46, 'hi2': 47, 'hi3': 48, 'k0': 28, 'k1': 29, 'lo': 130, 'lo0': 45, 'lo1': 46, 'lo2': 47, 'lo3': 48, 'mpl0': 134, 'mpl1': 135, 'mpl2': 136, 'p0': 131, 'p1': 132, 'p2': 133, 'pc': 1, 'ra': 33, 's0': 18, 's1': 19, 's2': 20, 's3': 21, 's4': 22, 's5': 23, 's6': 24, 's7': 25, 's8': 32, 'sp': 31, 't0': 10, 't1': 11, 't2': 12, 't3': 13, 't4': 14, 't5': 15, 't6': 16, 't7': 17, 't8': 26, 't9': 27, 'v0': 4, 'v1': 5, 'w0': 97, 'w1': 98, 'w10': 107, 'w11': 108, 'w12': 109, 'w13': 110, 'w14': 111, 'w15': 112, 'w16': 113, 'w17': 114, 'w18': 115, 'w19': 116, 'w2': 99, 'w20': 117, 'w21': 118, 'w22': 119, 'w23': 120, 'w24': 121, 'w25': 122, 'w26': 123, 'w27': 124, 'w28': 125, 'w29': 126, 'w3': 100, 'w30': 127, 'w31': 128, 'w4': 101, 'w5': 102, 'w6': 103, 'w7': 104, 'w8': 105, 'w9': 106, 'zero': 2}
imp_regs = ['zero', 'at', 'v0', 'v1', 'a0', 'a1', 'a2', 'a3', 't0', 't1', 't2', 't3', 't4', 't5', 't6', 't7', 's0', 's1', 's2', 's3', 's4', 's5', 's6', 's7', 't8', 't9', 'k0', 'k1', 'gp', 'sp', 's8', 'ra', 'lo', 'hi', 'pc']