Example #1
0
    def getVal(self, proc, inst):
        rn = utils.getBits(inst, 16, 4)
        rn = 'r' + str(rn)
        register_list = utils.getBits(inst, 0, 16)
        rnVal = getattr(proc, rn)
        
        start_address = rnVal
        end_address = rnVal + (utils.countSetBits(register_list) * 4) - 4

        if utils.checkCondition(proc, inst):
            setattr(proc, rn, end_address + 4)

        return (start_address, end_address)
Example #2
0
    def getVal(self, proc, inst):
        rn = utils.getBits(inst, 16, 4)
        rn = 'r' + str(rn)
        register_list = utils.getBits(inst, 0, 16)
        rnVal = getattr(proc, rn)
        w = utils.getBits(inst, 21)
        
        start_address = rnVal - (utils.countSetBits(register_list) * 4) + 4
        end_address = rnVal

        if utils.checkCondition(proc, inst) and w == 1:
            setattr(proc, rn, start_address - 4)

        return (start_address, end_address)