Java Code Examples for org.jf.dexlib2.analysis.RegisterType#UNKNOWN

The following examples show how to use org.jf.dexlib2.analysis.RegisterType#UNKNOWN . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PreInstructionRegisterInfoMethodItem.java    From ZjDroid with Apache License 2.0 6 votes vote down vote up
private void addMergeRegs(BitSet registers, int registerCount) {
    if (analyzedInstruction.getPredecessorCount() <= 1) {
        //in the common case of an instruction that only has a single predecessor which is the previous
        //instruction, the pre-instruction registers will always match the previous instruction's
        //post-instruction registers
        return;
    }

    for (int registerNum=0; registerNum<registerCount; registerNum++) {
        RegisterType mergedRegisterType = analyzedInstruction.getPreInstructionRegisterType(registerNum);

        for (AnalyzedInstruction predecessor: analyzedInstruction.getPredecessors()) {
            RegisterType predecessorRegisterType = predecessor.getPostInstructionRegisterType(registerNum);
            if (predecessorRegisterType.category != RegisterType.UNKNOWN &&
                    !predecessorRegisterType.equals(mergedRegisterType)) {
                registers.set(registerNum);
            }
        }
    }
}
 
Example 2
Source File: PreInstructionRegisterInfoMethodItem.java    From atlas with Apache License 2.0 6 votes vote down vote up
private void addMergeRegs(BitSet registers, int registerCount) {
    if (analyzedInstruction.getPredecessorCount() <= 1) {
        //in the common case of an instruction that only has a single predecessor which is the previous
        //instruction, the pre-instruction registers will always match the previous instruction's
        //post-instruction registers
        return;
    }

    for (int registerNum=0; registerNum<registerCount; registerNum++) {
        RegisterType mergedRegisterType = analyzedInstruction.getPreInstructionRegisterType(registerNum);

        for (AnalyzedInstruction predecessor: analyzedInstruction.getPredecessors()) {
            RegisterType predecessorRegisterType = predecessor.getPostInstructionRegisterType(registerNum);
            if (predecessorRegisterType.category != RegisterType.UNKNOWN &&
                    !predecessorRegisterType.equals(mergedRegisterType)) {
                registers.set(registerNum);
            }
        }
    }
}
 
Example 3
Source File: PreInstructionRegisterInfoMethodItem.java    From zjdroid with Apache License 2.0 6 votes vote down vote up
private void addMergeRegs(BitSet registers, int registerCount) {
    if (analyzedInstruction.getPredecessorCount() <= 1) {
        //in the common case of an instruction that only has a single predecessor which is the previous
        //instruction, the pre-instruction registers will always match the previous instruction's
        //post-instruction registers
        return;
    }

    for (int registerNum=0; registerNum<registerCount; registerNum++) {
        RegisterType mergedRegisterType = analyzedInstruction.getPreInstructionRegisterType(registerNum);

        for (AnalyzedInstruction predecessor: analyzedInstruction.getPredecessors()) {
            RegisterType predecessorRegisterType = predecessor.getPostInstructionRegisterType(registerNum);
            if (predecessorRegisterType.category != RegisterType.UNKNOWN &&
                    !predecessorRegisterType.equals(mergedRegisterType)) {
                registers.set(registerNum);
            }
        }
    }
}
 
Example 4
Source File: PreInstructionRegisterInfoMethodItem.java    From HeyGirl with Apache License 2.0 6 votes vote down vote up
private void addMergeRegs(BitSet registers, int registerCount) {
    if (analyzedInstruction.getPredecessorCount() <= 1) {
        //in the common case of an instruction that only has a single predecessor which is the previous
        //instruction, the pre-instruction registers will always match the previous instruction's
        //post-instruction registers
        return;
    }

    for (int registerNum=0; registerNum<registerCount; registerNum++) {
        RegisterType mergedRegisterType = analyzedInstruction.getPreInstructionRegisterType(registerNum);

        for (AnalyzedInstruction predecessor: analyzedInstruction.getPredecessors()) {
            RegisterType predecessorRegisterType = predecessor.getPostInstructionRegisterType(registerNum);
            if (predecessorRegisterType.category != RegisterType.UNKNOWN &&
                    !predecessorRegisterType.equals(mergedRegisterType)) {
                registers.set(registerNum);
            }
        }
    }
}
 
Example 5
Source File: PreInstructionRegisterInfoMethodItem.java    From ZjDroid with Apache License 2.0 6 votes vote down vote up
private void addMergeRegs(BitSet registers, int registerCount) {
    if (analyzedInstruction.getPredecessorCount() <= 1) {
        //in the common case of an instruction that only has a single predecessor which is the previous
        //instruction, the pre-instruction registers will always match the previous instruction's
        //post-instruction registers
        return;
    }

    for (int registerNum=0; registerNum<registerCount; registerNum++) {
        RegisterType mergedRegisterType = analyzedInstruction.getPreInstructionRegisterType(registerNum);

        for (AnalyzedInstruction predecessor: analyzedInstruction.getPredecessors()) {
            RegisterType predecessorRegisterType = predecessor.getPostInstructionRegisterType(registerNum);
            if (predecessorRegisterType.category != RegisterType.UNKNOWN &&
                    !predecessorRegisterType.equals(mergedRegisterType)) {
                registers.set(registerNum);
            }
        }
    }
}