@Nonnull private BuilderInstruction35c newBuilderInstruction35c(@Nonnull Instruction35c instruction) { return new BuilderInstruction35c( instruction.getOpcode(), instruction.getRegisterCount(), instruction.getRegisterC(), instruction.getRegisterD(), instruction.getRegisterE(), instruction.getRegisterF(), instruction.getRegisterG(), convertReference(instruction.getReference())); }
/** * Check if register is referenced by this instruction. * */ private boolean isRegisterUsed(int register) { Instruction35c i = (Instruction35c) instruction; return register == i.getRegisterD() || register == i.getRegisterE() || register == i.getRegisterF() || register == i.getRegisterG() || register == i.getRegisterC(); }
private void analyzeInvokeDirectEmpty(@Nonnull AnalyzedInstruction analyzedInstruction, boolean analyzeResult) { Instruction35c instruction = (Instruction35c)analyzedInstruction.instruction; Instruction35c deodexedInstruction = new ImmutableInstruction35c(Opcode.INVOKE_DIRECT, instruction.getRegisterCount(), instruction.getRegisterC(), instruction.getRegisterD(), instruction.getRegisterE(), instruction.getRegisterF(), instruction.getRegisterG(), instruction.getReference()); analyzedInstruction.setDeodexedInstruction(deodexedInstruction); if (analyzeResult) { analyzeInstruction(analyzedInstruction); } }
private static int[] buildRegisters35c(Instruction35c instruction) { int registerCount = instruction.getRegisterCount(); int[] registers = new int[registerCount]; switch (registerCount) { case 5: registers[4] = instruction.getRegisterG(); case 4: registers[3] = instruction.getRegisterF(); case 3: registers[2] = instruction.getRegisterE(); case 2: registers[1] = instruction.getRegisterD(); case 1: registers[0] = instruction.getRegisterC(); break; } return registers; }
when(((Instruction35c) instruction).getRegisterE()).thenReturn(REGISTER_E); when(((Instruction35c) instruction).getRegisterF()).thenReturn(REGISTER_F); when(((Instruction35c) instruction).getRegisterG()).thenReturn(REGISTER_G); Reference ref = new ImmutableTypeReference("[I"); when(((ReferenceInstruction) instruction).getReference()).thenReturn(ref);
private boolean analyzeInvokeVirtual(@Nonnull AnalyzedInstruction analyzedInstruction, boolean isRange) { MethodReference targetMethod; if (!normalizeVirtualMethods) { return true; } if (isRange) { Instruction3rc instruction = (Instruction3rc)analyzedInstruction.instruction; targetMethod = (MethodReference)instruction.getReference(); } else { Instruction35c instruction = (Instruction35c)analyzedInstruction.instruction; targetMethod = (MethodReference)instruction.getReference(); } MethodReference replacementMethod = normalizeMethodReference(targetMethod); if (replacementMethod == null || replacementMethod.equals(targetMethod)) { return true; } Instruction deodexedInstruction; if (isRange) { Instruction3rc instruction = (Instruction3rc)analyzedInstruction.instruction; deodexedInstruction = new ImmutableInstruction3rc(instruction.getOpcode(), instruction.getStartRegister(), instruction.getRegisterCount(), replacementMethod); } else { Instruction35c instruction = (Instruction35c)analyzedInstruction.instruction; deodexedInstruction = new ImmutableInstruction35c(instruction.getOpcode(), instruction.getRegisterCount(), instruction.getRegisterC(), instruction.getRegisterD(), instruction.getRegisterE(), instruction.getRegisterF(), instruction.getRegisterG(), replacementMethod); } analyzedInstruction.setDeodexedInstruction(deodexedInstruction); return true; }
switch (dimensionRegisters.length) { case 5: dimensionRegisters[4] = instr.getRegisterG(); case 4: dimensionRegisters[3] = instr.getRegisterF();
filledNewArrayInstr.getRegisterE(), filledNewArrayInstr.getRegisterF(), filledNewArrayInstr.getRegisterG(), };
public int getRegisterG() { return instruction.getRegisterG(); }
@Nonnull private BuilderInstruction35c newBuilderInstruction35c(@Nonnull Instruction35c instruction) { return new BuilderInstruction35c( instruction.getOpcode(), instruction.getRegisterCount(), instruction.getRegisterC(), instruction.getRegisterD(), instruction.getRegisterE(), instruction.getRegisterF(), instruction.getRegisterG(), instruction.getReference()); }
@Nonnull private BuilderInstruction35c newBuilderInstruction35c(@Nonnull Instruction35c instruction) { return new BuilderInstruction35c( instruction.getOpcode(), instruction.getRegisterCount(), instruction.getRegisterC(), instruction.getRegisterD(), instruction.getRegisterE(), instruction.getRegisterF(), instruction.getRegisterG(), instruction.getReference()); }
@Nonnull private BuilderInstruction35c newBuilderInstruction35c(@Nonnull Instruction35c instruction) { return new BuilderInstruction35c( instruction.getOpcode(), instruction.getRegisterCount(), instruction.getRegisterC(), instruction.getRegisterD(), instruction.getRegisterE(), instruction.getRegisterF(), instruction.getRegisterG(), instruction.getReference()); }
@Nonnull private BuilderInstruction35c newBuilderInstruction35c(@Nonnull Instruction35c instruction) { return new BuilderInstruction35c( instruction.getOpcode(), instruction.getRegisterCount(), instruction.getRegisterC(), instruction.getRegisterD(), instruction.getRegisterE(), instruction.getRegisterF(), instruction.getRegisterG(), convertReference(instruction.getReference())); }
private void analyzeInvokeDirectEmpty(@Nonnull AnalyzedInstruction analyzedInstruction, boolean analyzeResult) { Instruction35c instruction = (Instruction35c)analyzedInstruction.instruction; Instruction35c deodexedInstruction = new ImmutableInstruction35c(Opcode.INVOKE_DIRECT, instruction.getRegisterCount(), instruction.getRegisterC(), instruction.getRegisterD(), instruction.getRegisterE(), instruction.getRegisterF(), instruction.getRegisterG(), instruction.getReference()); analyzedInstruction.setDeodexedInstruction(deodexedInstruction); if (analyzeResult) { analyzeInstruction(analyzedInstruction); } }
private void analyzeInvokeDirectEmpty(@Nonnull AnalyzedInstruction analyzedInstruction, boolean analyzeResult) { Instruction35c instruction = (Instruction35c)analyzedInstruction.instruction; Instruction35c deodexedInstruction = new ImmutableInstruction35c(Opcode.INVOKE_DIRECT, instruction.getRegisterCount(), instruction.getRegisterC(), instruction.getRegisterD(), instruction.getRegisterE(), instruction.getRegisterF(), instruction.getRegisterG(), instruction.getReference()); analyzedInstruction.setDeodexedInstruction(deodexedInstruction); if (analyzeResult) { analyzeInstruction(analyzedInstruction); } }
public static ImmutableInstruction35c of(Instruction35c instruction) { if (instruction instanceof ImmutableInstruction35c) { return (ImmutableInstruction35c)instruction; } return new ImmutableInstruction35c( instruction.getOpcode(), instruction.getRegisterCount(), instruction.getRegisterC(), instruction.getRegisterD(), instruction.getRegisterE(), instruction.getRegisterF(), instruction.getRegisterG(), instruction.getReference()); }
public void write(@Nonnull Instruction35c instruction) { try { writer.write(instruction.getOpcode().value); writer.write(packNibbles(instruction.getRegisterG(), instruction.getRegisterCount())); writer.writeUshort(getReferenceIndex(instruction)); writer.write(packNibbles(instruction.getRegisterC(), instruction.getRegisterD())); writer.write(packNibbles(instruction.getRegisterE(), instruction.getRegisterF())); } catch (IOException ex) { throw new RuntimeException(ex); } }
public void write(@Nonnull Instruction35c instruction) { try { writer.write(getOpcodeValue(instruction.getOpcode())); writer.write(packNibbles(instruction.getRegisterG(), instruction.getRegisterCount())); writer.writeUshort(getReferenceIndex(instruction)); writer.write(packNibbles(instruction.getRegisterC(), instruction.getRegisterD())); writer.write(packNibbles(instruction.getRegisterE(), instruction.getRegisterF())); } catch (IOException ex) { throw new RuntimeException(ex); } }
public void write(@Nonnull Instruction35c instruction) { try { writer.write(getOpcodeValue(instruction.getOpcode())); writer.write(packNibbles(instruction.getRegisterG(), instruction.getRegisterCount())); writer.writeUshort(getReferenceIndex(instruction)); writer.write(packNibbles(instruction.getRegisterC(), instruction.getRegisterD())); writer.write(packNibbles(instruction.getRegisterE(), instruction.getRegisterF())); } catch (IOException ex) { throw new RuntimeException(ex); } }
public static ImmutableInstruction35c of(Instruction35c instruction) { if (instruction instanceof ImmutableInstruction35c) { return (ImmutableInstruction35c)instruction; } return new ImmutableInstruction35c( instruction.getOpcode(), instruction.getRegisterCount(), instruction.getRegisterC(), instruction.getRegisterD(), instruction.getRegisterE(), instruction.getRegisterF(), instruction.getRegisterG(), instruction.getReference()); }