Lines Matching refs:instruction

68     //This is a dummy instruction that occurs immediately before the first real instruction. We can initialize the
69 //register types for this instruction to the parameter types, in order to have them propagate to all of its
70 //successors, e.g. the first real instruction, the first instructions in any exception handlers covering the first
71 //instruction, etc.
95 //have to handle the case this special case of instruction being null, in the main class
148 for (AnalyzedInstruction instruction: instructions.getValues()) {
149 instruction.dead = true;
207 //if we had deodexed an odex instruction in a previous pass, we might have more specific
208 //register information now, so let's restore the original odexed instruction and
224 ex.addContext(String.format("opcode: %s", instructionToAnalyze.instruction.opcode.name));
253 //that operate on a null register, and thus always throw an NPE. They can also be any sort of odex instruction
254 //that occurs after an unresolvable odex instruction. We deodex if possible, or replace with an
259 Instruction instruction = analyzedInstruction.getInstruction();
261 if (instruction.opcode.odexOnly()) {
263 switch (instruction.getFormat()) {
278 objectRegisterNumber = ((Instruction22cs)instruction).getRegisterB();
282 objectRegisterNumber = ((FiveRegisterInstruction)instruction).getRegisterD();
286 objectRegisterNumber = ((RegisterRangeInstruction)instruction).getStartRegister();
292 analyzedInstruction.setDeodexedInstruction(new UnresolvedOdexInstruction(instruction, objectRegisterNumber));
330 ex.addContext(String.format("opcode: %s", instructionToVerify.instruction.opcode.name));
417 public int getInstructionAddress(AnalyzedInstruction instruction) {
418 return instructions.keyAt(instruction.instructionIndex);
438 //Using a for loop inside the while loop optimizes for the common case of the successors of an instruction
439 //occurring after the instruction. Any successors that occur prior to the instruction will be picked up on
467 private void propagateRegisterToSuccessors(AnalyzedInstruction instruction, int registerNumber,
469 RegisterType postRegisterType = instruction.getPostInstructionRegisterType(registerNumber);
470 for (AnalyzedInstruction successor: instruction.successors) {
494 //next, populate the exceptionHandlers array. The array item for each instruction that can throw an exception
496 //for the try block covering the instruction
505 AnalyzedInstruction instruction = instructions.valueAt(i);
506 Opcode instructionOpcode = instruction.instruction.opcode;
507 currentCodeAddress = getInstructionAddress(instruction);
529 //if we're inside a try block, and the instruction can throw an exception, then add the exception handlers
530 //for the current instruction
537 //finally, populate the successors and predecessors for each instruction. We start at the fake "StartOfMethod"
538 //instruction and follow the execution path. Any unreachable code won't have any predecessors or successors,
548 AnalyzedInstruction instruction = instructions.valueAt(currentInstructionIndex);
549 Opcode instructionOpcode = instruction.instruction.opcode;
550 int instructionCodeAddress = getInstructionAddress(instruction);
552 if (instruction.instruction.opcode.canContinue()) {
553 if (instruction.instruction.opcode != Opcode.NOP ||
554 !instruction.instruction.getFormat().variableSizeFormat) {
557 throw new ValidationException("Execution can continue past the last instruction");
561 addPredecessorSuccessor(instruction, nextInstruction, exceptionHandlers, instructionsToProcess);
565 if (instruction.instruction instanceof OffsetInstruction) {
566 OffsetInstruction offsetInstruction = (OffsetInstruction)instruction.instruction;
571 offsetInstruction.getTargetAddressOffset()).instruction;
576 addPredecessorSuccessor(instruction, targetInstruction, exceptionHandlers,
583 addPredecessorSuccessor(instruction, targetInstruction, exceptionHandlers, instructionsToProcess);
599 if (!allowMoveException && successor.instruction.opcode == Opcode.MOVE_EXCEPTION) {
600 throw new ValidationException("Execution can pass from the " + predecessor.instruction.opcode.name +
601 " instruction at code address 0x" + Integer.toHexString(getInstructionAddress(predecessor)) +
602 " to the move-exception instruction at address 0x" +
614 //if the successor can throw an instruction, then we need to add the exception handlers as additional
616 //Technically, we should handle the monitor-exit instruction as a special case. The exception is actually
617 //thrown *after* the instruction executes, instead of "before" the instruction executes, lke for any other
618 //instruction. But since it doesn't modify any registers, we can treat it like any other instruction.
621 //the item for this instruction in exceptionHandlersForSuccessor should only be set if this instruction
623 assert successor.instruction.opcode.canThrow();
651 * @return false if analyzedInstruction is an odex instruction that couldn't be deodexed, due to its
655 Instruction instruction = analyzedInstruction.instruction;
657 switch (instruction.opcode) {
1143 Instruction instruction = analyzedInstruction.instruction;
1145 switch (instruction.opcode) {
1703 TwoRegisterInstruction instruction = (TwoRegisterInstruction)analyzedInstruction.instruction;
1705 RegisterType sourceRegisterType = analyzedInstruction.getPreInstructionRegisterType(instruction.getRegisterB());
1710 TwoRegisterInstruction instruction = (TwoRegisterInstruction)analyzedInstruction.instruction;
1712 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterB(), validCategories);
1717 if (!previousInstruction.instruction.opcode.setsResult()) {
1718 throw new ValidationException(analyzedInstruction.instruction.opcode.name + " must occur after an " +
1719 "invoke-*/fill-new-array instruction");
1723 InstructionWithReference invokeInstruction = (InstructionWithReference)previousInstruction.instruction;
1740 throw new ValidationException(analyzedInstruction.instruction.opcode.name + " cannot be the first " +
1741 "instruction in a method. It must occur after an invoke-*/fill-new-array instruction");
1746 if (!previousInstruction.instruction.opcode.setsResult()) {
1747 throw new ValidationException(analyzedInstruction.instruction.opcode.name + " must occur after an " +
1748 "invoke-*/fill-new-array instruction");
1766 throw new ValidationException(String.format("Wrong move-result* instruction for return value %s",
1776 throw new ValidationException("move-exception must be the first instruction in an exception handler block");
1796 throw new ValidationException("move-exception must be the first instruction in an exception handler block");
1807 throw new ValidationException("move-exception must be the first instruction in an exception handler block");
1827 throw new ValidationException("move-exception must be the first instruction in an exception handler block");
1842 Instruction10x instruction = (Instruction10x)analyzedInstruction.instruction;
1867 SingleRegisterInstruction instruction = (SingleRegisterInstruction)analyzedInstruction.instruction;
1868 int returnRegister = instruction.getRegisterA();
1882 analyzedInstruction.instruction.opcode.name, returnType.getTypeDescriptor()));
1904 LiteralInstruction instruction = (LiteralInstruction)analyzedInstruction.instruction;
1906 RegisterType newDestinationRegisterType = RegisterType.getRegisterTypeForLiteral(instruction.getLiteral());
1908 //we assume that the literal value is a valid value for the given instruction type, because it's impossible
1909 //to store an invalid literal with the instruction. so we don't need to check the type of the literal
1914 //the literal value stored in the instruction is a 16-bit value. When shifted left by 16, it will always be an
1943 InstructionWithReference instruction = (InstructionWithReference)analyzedInstruction.instruction;
1944 Item item = instruction.getReferencedItem();
1953 SingleRegisterInstruction instruction = (SingleRegisterInstruction)analyzedInstruction.instruction;
1954 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterA(), ReferenceCategories);
1958 InstructionWithReference instruction = (InstructionWithReference)analyzedInstruction.instruction;
1960 Item item = instruction.getReferencedItem();
1970 SingleRegisterInstruction instruction = (SingleRegisterInstruction)analyzedInstruction.instruction;
1972 RegisterType registerType = getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterA(),
1978 InstructionWithReference instruction = (InstructionWithReference)analyzedInstruction.instruction;
1980 Item item = instruction.getReferencedItem();
2000 TwoRegisterInstruction instruction = (TwoRegisterInstruction)analyzedInstruction.instruction;
2002 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterB(), ReferenceCategories);
2007 InstructionWithReference instruction = (InstructionWithReference)analyzedInstruction.instruction;
2009 Item item = instruction.getReferencedItem();
2028 TwoRegisterInstruction instruction = (TwoRegisterInstruction)analyzedInstruction.instruction;
2030 int arrayRegisterNumber = instruction.getRegisterB();
2044 InstructionWithReference instruction = (InstructionWithReference)analyzedInstruction.instruction;
2046 int register = ((SingleRegisterInstruction)analyzedInstruction.instruction).getRegisterA();
2051 //the post-instruction destination register will only be set if we have already analyzed this instruction
2057 Item item = instruction.getReferencedItem();
2067 InstructionWithReference instruction = (InstructionWithReference)analyzedInstruction.instruction;
2069 int register = ((SingleRegisterInstruction)analyzedInstruction.instruction).getRegisterA();
2074 //the "post-instruction" destination register will only be set if we've gone over
2075 //this instruction at least once before. If this is the case, then we need to check
2086 "that was created by this new-instance instruction.", i));
2093 Item item = instruction.getReferencedItem();
2110 InstructionWithReference instruction = (InstructionWithReference)analyzedInstruction.instruction;
2112 Item item = instruction.getReferencedItem();
2123 TwoRegisterInstruction instruction = (TwoRegisterInstruction)analyzedInstruction.instruction;
2124 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterB(), Primitive32BitCategories);
2127 InstructionWithReference instruction = (InstructionWithReference)analyzedInstruction.instruction;
2129 Item item = instruction.getReferencedItem();
2147 InstructionWithReference instruction = (InstructionWithReference)analyzedInstruction.instruction;
2152 Item item = instruction.getReferencedItem();
2186 FiveRegisterInstruction instruction = (FiveRegisterInstruction)analyzedInstruction.instruction;
2187 verifyFilledNewArrayCommon(analyzedInstruction, new Format35cRegisterIterator(instruction));
2191 RegisterRangeInstruction instruction = (RegisterRangeInstruction)analyzedInstruction.instruction;
2193 //instruction.getStartRegister() and instruction.getRegCount() both return an int value, but are actually
2195 if (instruction.getStartRegister() + instruction.getRegCount() >= 1<<16) {
2198 instruction.getStartRegister(),
2199 instruction.getStartRegister() + instruction.getRegCount() - 1));
2202 verifyFilledNewArrayCommon(analyzedInstruction, new Format3rcRegisterIterator(instruction));
2206 SingleRegisterInstruction instruction = (SingleRegisterInstruction)analyzedInstruction.instruction;
2208 int register = instruction.getRegisterA();
2253 int arrayDataAddressOffset = ((OffsetInstruction)analyzedInstruction.instruction).getTargetAddressOffset();
2256 if (arrayDataInstruction == null || arrayDataInstruction.instruction.getFormat() != Format.ArrayData) {
2262 (ArrayDataPseudoInstruction)arrayDataInstruction.instruction;
2273 int register = ((SingleRegisterInstruction)analyzedInstruction.instruction).getRegisterA();
2296 int dataAddressOffset = ((OffsetInstruction)analyzedInstruction.instruction).getTargetAddressOffset();
2316 int register = ((SingleRegisterInstruction)analyzedInstruction.instruction).getRegisterA();
2317 int switchCodeAddressOffset = ((OffsetInstruction)analyzedInstruction.instruction).getTargetAddressOffset();
2325 switchDataAnalyzedInstruction.instruction.getFormat() != expectedSwitchDataFormat) {
2337 ThreeRegisterInstruction instruction = (ThreeRegisterInstruction)analyzedInstruction.instruction;
2339 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterB(), validCategories);
2340 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterC(), validCategories);
2344 TwoRegisterInstruction instruction = (TwoRegisterInstruction)analyzedInstruction.instruction;
2346 RegisterType registerType1 = analyzedInstruction.getPreInstructionRegisterType(instruction.getRegisterA());
2349 RegisterType registerType2 = analyzedInstruction.getPreInstructionRegisterType(instruction.getRegisterB());
2362 analyzedInstruction.instruction.opcode.name, registerType1.toString(), registerType2.toString()));
2367 TwoRegisterInstruction instruction = (TwoRegisterInstruction)analyzedInstruction.instruction;
2369 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterA(), Primitive32BitCategories);
2370 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterB(), Primitive32BitCategories);
2374 SingleRegisterInstruction instruction = (SingleRegisterInstruction)analyzedInstruction.instruction;
2376 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterA(),
2381 SingleRegisterInstruction instruction = (SingleRegisterInstruction)analyzedInstruction.instruction;
2383 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterA(), Primitive32BitCategories);
2394 ThreeRegisterInstruction instruction = (ThreeRegisterInstruction)analyzedInstruction.instruction;
2396 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterC(), Primitive32BitCategories);
2398 RegisterType arrayRegisterType = analyzedInstruction.getPreInstructionRegisterType(instruction.getRegisterB());
2404 analyzedInstruction.instruction.opcode.name, arrayRegisterType.category.toString()));
2410 analyzedInstruction.instruction.opcode.name, arrayRegisterType.type.getClassType()));
2418 analyzedInstruction.instruction.opcode.name, arrayRegisterType.type.getClassType()));
2425 "for the instruction.", analyzedInstruction.instruction.opcode.name,
2432 ThreeRegisterInstruction instruction = (ThreeRegisterInstruction)analyzedInstruction.instruction;
2434 RegisterType arrayRegisterType = analyzedInstruction.getPreInstructionRegisterType(instruction.getRegisterB());
2456 "array type for the instruction.", arrayRegisterType.type.getClassType()));
2465 ThreeRegisterInstruction instruction = (ThreeRegisterInstruction)analyzedInstruction.instruction;
2467 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterC(), Primitive32BitCategories);
2469 RegisterType arrayRegisterType = analyzedInstruction.getPreInstructionRegisterType(instruction.getRegisterB());
2495 "array type for the instruction.", arrayRegisterType.type.getClassType()));
2501 ThreeRegisterInstruction instruction = (ThreeRegisterInstruction)analyzedInstruction.instruction;
2503 RegisterType arrayRegisterType = analyzedInstruction.getPreInstructionRegisterType(instruction.getRegisterB());
2520 "array type for the instruction.", arrayRegisterType.type.getClassType()));
2532 ThreeRegisterInstruction instruction = (ThreeRegisterInstruction)analyzedInstruction.instruction;
2534 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterC(), Primitive32BitCategories);
2536 RegisterType arrayRegisterType = analyzedInstruction.getPreInstructionRegisterType(instruction.getRegisterB());
2558 "array type for the instruction.", arrayRegisterType.type.getClassType()));
2565 ThreeRegisterInstruction instruction = (ThreeRegisterInstruction)analyzedInstruction.instruction;
2567 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterC(), Primitive32BitCategories);
2569 RegisterType sourceRegisterType = analyzedInstruction.getPreInstructionRegisterType(instruction.getRegisterA());
2574 analyzedInstruction.instruction.opcode.name, sourceRegisterType.toString()));
2578 RegisterType arrayRegisterType = analyzedInstruction.getPreInstructionRegisterType(instruction.getRegisterB());
2584 analyzedInstruction.instruction.opcode.name, arrayRegisterType.category.toString()));
2590 analyzedInstruction.instruction.opcode.name, arrayRegisterType.type.getClassType()));
2598 analyzedInstruction.instruction.opcode.name, arrayRegisterType.type.getClassType()));
2605 "for the instruction.", analyzedInstruction.instruction.opcode.name,
2612 ThreeRegisterInstruction instruction = (ThreeRegisterInstruction)analyzedInstruction.instruction;
2614 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterC(), Primitive32BitCategories);
2615 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterA(), WideLowCategories);
2617 RegisterType arrayRegisterType = analyzedInstruction.getPreInstructionRegisterType(instruction.getRegisterB());
2643 "array type for the instruction.", arrayRegisterType.type.getClassType()));
2649 ThreeRegisterInstruction instruction = (ThreeRegisterInstruction)analyzedInstruction.instruction;
2651 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterC(), Primitive32BitCategories);
2653 RegisterType sourceRegisterType = analyzedInstruction.getPreInstructionRegisterType(instruction.getRegisterA());
2658 RegisterType arrayRegisterType = analyzedInstruction.getPreInstructionRegisterType(instruction.getRegisterB());
2682 "array type for the instruction.", arrayRegisterType.type.getClassType()));
2695 TwoRegisterInstruction instruction = (TwoRegisterInstruction)analyzedInstruction.instruction;
2697 RegisterType objectRegisterType = getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterB(),
2701 Item referencedItem = ((InstructionWithReference)analyzedInstruction.instruction).getReferencedItem();
2715 "for the instruction.", analyzedInstruction.instruction.opcode.name,
2721 TwoRegisterInstruction instruction = (TwoRegisterInstruction)analyzedInstruction.instruction;
2723 Item referencedItem = ((InstructionWithReference)analyzedInstruction.instruction).getReferencedItem();
2732 TwoRegisterInstruction instruction = (TwoRegisterInstruction)analyzedInstruction.instruction;
2734 RegisterType objectRegisterType = getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterB(),
2738 Item referencedItem = ((InstructionWithReference)analyzedInstruction.instruction).getReferencedItem();
2752 "for the instruction.", analyzedInstruction.instruction.opcode.name,
2758 TwoRegisterInstruction instruction = (TwoRegisterInstruction)analyzedInstruction.instruction;
2760 RegisterType objectRegisterType = getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterB(),
2764 Item referencedItem = ((InstructionWithReference)analyzedInstruction.instruction).getReferencedItem();
2778 "for the instruction.", analyzedInstruction.instruction.opcode.name,
2785 TwoRegisterInstruction instruction = (TwoRegisterInstruction)analyzedInstruction.instruction;
2787 RegisterType objectRegisterType = getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterB(),
2790 RegisterType sourceRegisterType = analyzedInstruction.getPreInstructionRegisterType(instruction.getRegisterA());
2804 analyzedInstruction.instruction.opcode.name, sourceRegisterType.toString()));
2809 Item referencedItem = ((InstructionWithReference)analyzedInstruction.instruction).getReferencedItem();
2823 "for the instruction.", analyzedInstruction.instruction.opcode.name,
2829 TwoRegisterInstruction instruction = (TwoRegisterInstruction)analyzedInstruction.instruction;
2831 RegisterType objectRegisterType = getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterB(),
2834 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterA(), WideLowCategories);
2837 Item referencedItem = ((InstructionWithReference)analyzedInstruction.instruction).getReferencedItem();
2851 "for the instruction.", analyzedInstruction.instruction.opcode.name,
2857 TwoRegisterInstruction instruction = (TwoRegisterInstruction)analyzedInstruction.instruction;
2859 RegisterType objectRegisterType = getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterB(),
2862 RegisterType sourceRegisterType = getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterA(),
2866 Item referencedItem = ((InstructionWithReference)analyzedInstruction.instruction).getReferencedItem();
2880 "for the instruction.", analyzedInstruction.instruction.opcode.name,
2902 Item referencedItem = ((InstructionWithReference)analyzedInstruction.instruction).getReferencedItem();
2910 "for the instruction.", analyzedInstruction.instruction.opcode.name,
2916 Item referencedItem = ((InstructionWithReference)analyzedInstruction.instruction).getReferencedItem();
2926 Item referencedItem = ((InstructionWithReference)analyzedInstruction.instruction).getReferencedItem();
2937 "for the instruction.", analyzedInstruction.instruction.opcode.name,
2944 Item referencedItem = ((InstructionWithReference)analyzedInstruction.instruction).getReferencedItem();
2952 "for the instruction.", analyzedInstruction.instruction.opcode.name,
2959 SingleRegisterInstruction instruction = (SingleRegisterInstruction)analyzedInstruction.instruction;
2961 RegisterType sourceRegisterType = analyzedInstruction.getPreInstructionRegisterType(instruction.getRegisterA());
2975 analyzedInstruction.instruction.opcode.name, sourceRegisterType.toString()));
2979 Item referencedItem = ((InstructionWithReference)analyzedInstruction.instruction).getReferencedItem();
2987 "for the instruction.", analyzedInstruction.instruction.opcode.name,
2993 SingleRegisterInstruction instruction = (SingleRegisterInstruction)analyzedInstruction.instruction;
2996 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterA(), WideLowCategories);
2999 Item referencedItem = ((InstructionWithReference)analyzedInstruction.instruction).getReferencedItem();
3007 "for the instruction.", analyzedInstruction.instruction.opcode.name,
3013 SingleRegisterInstruction instruction = (SingleRegisterInstruction)analyzedInstruction.instruction;
3015 RegisterType sourceRegisterType = getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterA(),
3019 Item referencedItem = ((InstructionWithReference)analyzedInstruction.instruction).getReferencedItem();
3027 "for the instruction.", analyzedInstruction.instruction.opcode.name,
3041 FiveRegisterInstruction instruction = (FiveRegisterInstruction)analyzedInstruction.instruction;
3042 analyzeInvokeDirectCommon(analyzedInstruction, new Format35cRegisterIterator(instruction));
3046 FiveRegisterInstruction instruction = (FiveRegisterInstruction)analyzedInstruction.instruction;
3047 verifyInvokeCommon(analyzedInstruction, false, invokeType, new Format35cRegisterIterator(instruction));
3051 RegisterRangeInstruction instruction = (RegisterRangeInstruction)analyzedInstruction.instruction;
3052 analyzeInvokeDirectCommon(analyzedInstruction, new Format3rcRegisterIterator(instruction));
3056 RegisterRangeInstruction instruction = (RegisterRangeInstruction)analyzedInstruction.instruction;
3057 verifyInvokeCommon(analyzedInstruction, true, invokeType, new Format3rcRegisterIterator(instruction));
3067 //the only time that an invoke instruction changes a register type is when using invoke-direct on a
3071 InstructionWithReference instruction = (InstructionWithReference)analyzedInstruction.instruction;
3073 Item item = instruction.getReferencedItem();
3120 InstructionWithReference instruction = (InstructionWithReference)analyzedInstruction.instruction;
3124 Item item = instruction.getReferencedItem();
3136 methodIdItem.getMethodString(), analyzedInstruction.instruction.opcode.name));
3144 "class.", methodIdItem.getMethodString(), analyzedInstruction.instruction.opcode.name,
3151 analyzedInstruction.instruction.opcode.name, methodClassDef.getClassType()));
3159 methodIdItem.getMethodString(), analyzedInstruction.instruction.opcode.name,
3166 analyzedInstruction.instruction.opcode.name, methodClass.getTypeDescriptor(),
3173 analyzedInstruction.instruction.opcode.name, methodClassDef.getSuperclass().getClassType()));
3297 TwoRegisterInstruction instruction = (TwoRegisterInstruction)analyzedInstruction.instruction;
3299 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterB(), validSourceCategories);
3305 ThreeRegisterInstruction instruction = (ThreeRegisterInstruction)analyzedInstruction.instruction;
3308 analyzedInstruction.getPreInstructionRegisterType(instruction.getRegisterB());
3310 analyzedInstruction.getPreInstructionRegisterType(instruction.getRegisterC());
3325 ThreeRegisterInstruction instruction = (ThreeRegisterInstruction)analyzedInstruction.instruction;
3327 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterB(), validSource1Categories);
3328 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterC(), validSource2Categories);
3334 TwoRegisterInstruction instruction = (TwoRegisterInstruction)analyzedInstruction.instruction;
3337 analyzedInstruction.getPreInstructionRegisterType(instruction.getRegisterA());
3339 analyzedInstruction.getPreInstructionRegisterType(instruction.getRegisterB());
3354 TwoRegisterInstruction instruction = (TwoRegisterInstruction)analyzedInstruction.instruction;
3356 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterA(), validSource1Categories);
3357 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterB(), validSource2Categories);
3363 TwoRegisterInstruction instruction = (TwoRegisterInstruction)analyzedInstruction.instruction;
3366 analyzedInstruction.getPreInstructionRegisterType(instruction.getRegisterB());
3369 long literal = ((LiteralInstruction)analyzedInstruction.instruction).getLiteral();
3381 TwoRegisterInstruction instruction = (TwoRegisterInstruction)analyzedInstruction.instruction;
3383 getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterB(), Primitive32BitCategories);
3388 TwoRegisterInstruction instruction = (TwoRegisterInstruction)analyzedInstruction.instruction;
3390 RegisterType sourceRegisterType = getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterB(),
3392 long literalShift = ((LiteralInstruction)analyzedInstruction.instruction).getLiteral();
3462 throw new ValidationException("Cannot analyze an odexed instruction unless we are deodexing");
3465 Instruction35mi instruction = (Instruction35mi)analyzedInstruction.instruction;
3471 instruction.getInlineIndex()));
3489 Instruction35c deodexedInstruction = new Instruction35c(deodexedOpcode, instruction.getRegCount(),
3490 instruction.getRegisterD(), instruction.getRegisterE(), instruction.getRegisterF(),
3491 instruction.getRegisterG(), instruction.getRegisterA(), inlineMethodIdItem);
3500 throw new ValidationException("Cannot analyze an odexed instruction unless we are deodexing");
3503 Instruction3rmi instruction = (Instruction3rmi)analyzedInstruction.instruction;
3509 instruction.getInlineIndex()));
3527 Instruction3rc deodexedInstruction = new Instruction3rc(deodexedOpcode, (short)instruction.getRegCount(),
3528 instruction.getStartRegister(), inlineMethodIdItem);
3540 Instruction35c instruction = (Instruction35c)analyzedInstruction.instruction;
3542 Instruction35c deodexedInstruction = new Instruction35c(Opcode.INVOKE_DIRECT, instruction.getRegCount(),
3543 instruction.getRegisterD(), instruction.getRegisterE(), instruction.getRegisterF(),
3544 instruction.getRegisterG(), instruction.getRegisterA(), instruction.getReferencedItem());
3558 Instruction3rc instruction = (Instruction3rc)analyzedInstruction.instruction;
3561 (short)instruction.getRegCount(), instruction.getStartRegister(), instruction.getReferencedItem());
3571 Instruction22cs instruction = (Instruction22cs)analyzedInstruction.instruction;
3573 int fieldOffset = instruction.getFieldOffset();
3574 RegisterType objectRegisterType = getAndCheckSourceRegister(analyzedInstruction, instruction.getRegisterB(),
3596 Opcode opcode = OdexedFieldInstructionMapper.getAndCheckDeodexedOpcodeForOdexedOpcode(fieldType, instruction.opcode);
3598 Instruction22c deodexedInstruction = new Instruction22c(opcode, (byte)instruction.getRegisterA(),
3599 (byte)instruction.getRegisterB(), fieldIdItem);
3614 Instruction3rms instruction = (Instruction3rms)analyzedInstruction.instruction;
3615 methodIndex = instruction.getVtableIndex();
3616 objectRegister = instruction.getStartRegister();
3618 Instruction35ms instruction = (Instruction35ms)analyzedInstruction.instruction;
3619 methodIndex = instruction.getVtableIndex();
3620 objectRegister = instruction.getRegisterD();
3644 //it's possible that the pre-odexed instruction had used the method from the current class instead
3662 Instruction3rms instruction = (Instruction3rms)analyzedInstruction.instruction;
3670 deodexedInstruction = new Instruction3rc(opcode, (short)instruction.getRegCount(),
3671 instruction.getStartRegister(), methodIdItem);
3673 Instruction35ms instruction = (Instruction35ms)analyzedInstruction.instruction;
3681 deodexedInstruction = new Instruction35c(opcode, instruction.getRegCount(),
3682 instruction.getRegisterD(), instruction.getRegisterE(), instruction.getRegisterF(),
3683 instruction.getRegisterG(), instruction.getRegisterA(), methodIdItem);
3698 (FieldIdItem)(((InstructionWithReference)analyzedInstruction.instruction).getReferencedItem());
3703 analyzedInstruction.instruction.opcode);
3707 if (analyzedInstruction.instruction.opcode.isOdexedStaticVolatile()) {
3708 SingleRegisterInstruction instruction = (SingleRegisterInstruction)analyzedInstruction.instruction;
3709 if (analyzedInstruction.instruction.opcode.format == Format.Format21c) {
3710 deodexedInstruction = new Instruction21c(opcode, (byte)instruction.getRegisterA(), fieldIdItem);
3712 assert(analyzedInstruction.instruction.opcode.format == Format.Format41c);
3713 deodexedInstruction = new Instruction41c(opcode, (byte)instruction.getRegisterA(), fieldIdItem);
3716 TwoRegisterInstruction instruction = (TwoRegisterInstruction)analyzedInstruction.instruction;
3718 if (analyzedInstruction.instruction.opcode.format == Format.Format22c) {
3719 deodexedInstruction = new Instruction22c(opcode, (byte)instruction.getRegisterA(),
3720 (byte)instruction.getRegisterB(), fieldIdItem);
3722 assert(analyzedInstruction.instruction.opcode.format == Format.Format52c);
3723 deodexedInstruction = new Instruction52c(opcode, (byte)instruction.getRegisterA(),
3724 (byte)instruction.getRegisterB(), fieldIdItem);
3737 Instruction5rc instruction = (Instruction5rc)analyzedInstruction.instruction;
3740 instruction.getRegCount(), instruction.getStartRegister(), instruction.getReferencedItem());
3809 public Format35cRegisterIterator(FiveRegisterInstruction instruction) {
3810 registerCount = instruction.getRegCount();
3811 registers = new int[]{instruction.getRegisterD(), instruction.getRegisterE(),
3812 instruction.getRegisterF(), instruction.getRegisterG(),
3813 instruction.getRegisterA()};
3839 public Format3rcRegisterIterator(RegisterRangeInstruction instruction) {
3840 startRegister = instruction.getStartRegister();
3841 registerCount = instruction.getRegCount();