def mov_bmi(binary, N): inst = 'MOV ' rdKey = utilFunc.getRegKeyByStringKey(binary[27:32]) if (N == 32): r = 'w' else: r = 'x' inst += r + str(rdKey) immr = binary[10:16] imms = binary[16:22] immN = binary[9] imm, temp = utilFunc.decodeBitMasks(immN, imms, immr, N) inst += ', #' + utilFunc.binaryToHexStr(imm) result = utilFunc.logical_or('0' * N, imm).zfill(const.REG_SIZE) utilFunc.finalize(rdKey, result, inst, '1')
def mov_bmi(binary, N): inst = "MOV " rdKey = utilFunc.getRegKeyByStringKey(binary[27:32]) if N == 32: r = "w" else: r = "x" inst += r + str(rdKey) immr = binary[10:16] imms = binary[16:22] immN = binary[9] imm, temp = utilFunc.decodeBitMasks(immN, imms, immr, N) inst += ", #" + utilFunc.binaryToHexStr(imm) result = utilFunc.logical_or("0" * N, imm).zfill(const.REG_SIZE) utilFunc.finalize(rdKey, result, inst, "1")
def op_i(binary, N): inst = 'AND ' rdKey = utilFunc.getRegKeyByStringKey(binary[27:32]) rnKey = utilFunc.getRegKeyByStringKey(binary[22:27]) rnValue = utilFunc.getRegValueByStringkey(binary[22:27], '0') if (N == 32): r = 'w' rnValue = rnValue[32:64] else: r = 'x' inst += r + str(rdKey) + ', ' + r + str(rnKey) immr = binary[10:16] imms = binary[16:22] immN = binary[9] imm, temp = utilFunc.decodeBitMasks(immN, imms, immr, N) inst += ', #' + str(int(imm, 2)) result = utilFunc.logical_and(rnValue, imm).zfill(const.REG_SIZE) utilFunc.finalize(rdKey, result, inst, '1')
def op_i(binary, N): inst = 'AND ' rdKey = utilFunc.getRegKeyByStringKey(binary[27:32]) rnKey = utilFunc.getRegKeyByStringKey(binary[22:27]) rnValue = utilFunc.getRegValueByStringkey(binary[22:27], '0') if(N == 32): r = 'w' rnValue = rnValue[32:64] else: r = 'x' inst += r + str(rdKey) + ', ' + r + str(rnKey) immr = binary[10:16] imms = binary[16:22] immN = binary[9] imm, temp = utilFunc.decodeBitMasks(immN, imms, immr, N) inst += ', #' + str(int(imm,2)) result = utilFunc.logical_and(rnValue,imm).zfill(const.REG_SIZE) utilFunc.finalize(rdKey, result, inst, '1')