use of com.google.security.zynamics.zylib.disassembly.IOperandTreeNode in project binnavi by google.
the class BnllaTranslator method translate.
@Override
public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "bnlla");
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, "bnlla", String.valueOf(Helpers.getCRRegisterIndex(BIOperand.getValue()) * 4), addressOperand1.getValue(), true, false, false, false, true, true);
}
use of com.google.security.zynamics.zylib.disassembly.IOperandTreeNode in project binnavi by google.
the class BnllrTranslator method translate.
@Override
public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "bnllr");
final IOperandTreeNode BIOperand = instruction.getOperands().get(0).getRootNode().getChildren().get(0);
BranchGenerator.generate(instruction.getAddress().toLong() * 0x100, environment, instruction, instructions, "bnllr", String.valueOf(Helpers.getCRRegisterIndex(BIOperand.getValue()) * 4), 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 BnllrlTranslator method translate.
@Override
public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "bnllrl");
final IOperandTreeNode BIOperand = instruction.getOperands().get(0).getRootNode().getChildren().get(0);
BranchGenerator.generate(instruction.getAddress().toLong() * 0x100, environment, instruction, instructions, "bnllrl", String.valueOf(Helpers.getCRRegisterIndex(BIOperand.getValue()) * 4), Helpers.LINK_REGISTER, true, false, false, false, true, true);
}
use of com.google.security.zynamics.zylib.disassembly.IOperandTreeNode in project binnavi by google.
the class BnsctrlTranslator method translate.
@Override
public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "bnsctrl");
final IOperandTreeNode BIOperand = instruction.getOperands().get(0).getRootNode().getChildren().get(0);
BranchGenerator.generate(instruction.getAddress().toLong() * 0x100, environment, instruction, instructions, "bnsctrl", String.valueOf((Helpers.getCRRegisterIndex(BIOperand.getValue()) * 4) + 3), Helpers.COUNT_REGISTER, true, false, false, false, true, true);
}
use of com.google.security.zynamics.zylib.disassembly.IOperandTreeNode in project binnavi by google.
the class BgelaTranslator method translate.
@Override
public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "bgela");
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, "bgela", jumpOperand, addressOperand1.getValue(), true, false, false, false, false, false);
}
Aggregations