use of com.google.security.zynamics.zylib.disassembly.IOperandTreeNode in project binnavi by google.
the class BflrTranslator method translate.
@Override
public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "bflr");
final IOperandTreeNode BIOperand = instruction.getOperands().get(0).getRootNode().getChildren().get(0);
BranchGenerator.generate(instruction.getAddress().toLong() * 0x100, environment, instruction, instructions, "bflr", BIOperand.getValue(), Helpers.LINK_REGISTER, false, false, false, false, true, true);
}
use of com.google.security.zynamics.zylib.disassembly.IOperandTreeNode in project binnavi by google.
the class BgelTranslator method translate.
@Override
public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "bgel");
Long baseOffset = instruction.getAddress().toLong() * 0x100;
final String jumpOperand = environment.getNextVariableString();
final IOperandTreeNode addressOperand1 = instruction.getOperands().get(1).getRootNode().getChildren().get(0);
final IOperandTreeNode BIOperand = instruction.getOperands().get(0).getRootNode().getChildren().get(0);
instructions.add(ReilHelpers.createOr(baseOffset++, OperandSize.BYTE, String.valueOf((Helpers.getCRRegisterIndex(BIOperand.getValue()) * 4) + 2), OperandSize.BYTE, String.valueOf((Helpers.getCRRegisterIndex(BIOperand.getValue()) * 4) + 1), OperandSize.BYTE, jumpOperand));
BranchGenerator.generate(baseOffset, environment, instruction, instructions, "bgel", jumpOperand, addressOperand1.getValue(), true, false, false, false, false, false);
}
use of com.google.security.zynamics.zylib.disassembly.IOperandTreeNode in project binnavi by google.
the class BnslrTranslator method translate.
@Override
public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "bnslr");
final IOperandTreeNode BIOperand = instruction.getOperands().get(0).getRootNode().getChildren().get(0);
BranchGenerator.generate(instruction.getAddress().toLong() * 0x100, environment, instruction, instructions, "bnslr", String.valueOf((Helpers.getCRRegisterIndex(BIOperand.getValue()) * 4) + 3), Helpers.LINK_REGISTER, false, false, false, false, true, true);
}
use of com.google.security.zynamics.zylib.disassembly.IOperandTreeNode in project binnavi by google.
the class BsoTranslator method translate.
@Override
public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "bso");
final IOperandTreeNode addressOperand1 = instruction.getOperands().get(1).getRootNode().getChildren().get(0);
final IOperandTreeNode BIOperand = instruction.getOperands().get(0).getRootNode().getChildren().get(0);
BranchGenerator.generate(instruction.getAddress().toLong() * 0x100, environment, instruction, instructions, "bso", String.valueOf((Helpers.getCRRegisterIndex(BIOperand.getValue()) * 4) + 3), addressOperand1.getValue(), false, false, false, false, true, false);
}
use of com.google.security.zynamics.zylib.disassembly.IOperandTreeNode in project binnavi by google.
the class BsolaTranslator method translate.
@Override
public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "bsola");
final IOperandTreeNode addressOperand1 = instruction.getOperands().get(1).getRootNode().getChildren().get(0);
final IOperandTreeNode BIOperand = instruction.getOperands().get(0).getRootNode().getChildren().get(0);
BranchGenerator.generate(instruction.getAddress().toLong() * 0x100, environment, instruction, instructions, "bsola", String.valueOf((Helpers.getCRRegisterIndex(BIOperand.getValue()) * 4) + 3), addressOperand1.getValue(), true, false, false, false, true, false);
}
Aggregations