use of com.google.security.zynamics.zylib.disassembly.IOperandTreeNode in project binnavi by google.
the class BgtlrlTranslator method translate.
@Override
public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "bgtlrl");
final IOperandTreeNode BIOperand = instruction.getOperands().get(0).getRootNode().getChildren().get(0);
BranchGenerator.generate(instruction.getAddress().toLong() * 0x100, environment, instruction, instructions, "bgtlrl", String.valueOf((Helpers.getCRRegisterIndex(BIOperand.getValue()) * 4) + 1), Helpers.LINK_REGISTER, false, false, false, false, true, false);
}
use of com.google.security.zynamics.zylib.disassembly.IOperandTreeNode in project binnavi by google.
the class BlaTranslator method translate.
@Override
public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "bla");
final IOperandTreeNode addressOperand1 = instruction.getOperands().get(0).getRootNode().getChildren().get(0);
BranchGenerator.generate(instruction.getAddress().toLong() * 0x100, environment, instruction, instructions, "bla", null, addressOperand1.getValue(), true, true, false, false, false, false);
}
use of com.google.security.zynamics.zylib.disassembly.IOperandTreeNode in project binnavi by google.
the class BleTranslator method translate.
@Override
public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "ble");
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) + 0), OperandSize.BYTE, jumpOperand));
String suffix = "";
if (instruction.getMnemonic().endsWith("+")) {
suffix = "+";
}
if (instruction.getMnemonic().endsWith("-")) {
suffix = "-";
}
BranchGenerator.generate(baseOffset, environment, instruction, instructions, "ble" + suffix, jumpOperand, addressOperand1.getValue(), false, false, false, false, false, false);
}
use of com.google.security.zynamics.zylib.disassembly.IOperandTreeNode in project binnavi by google.
the class BlectrlTranslator method translate.
@Override
public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "blel");
Long baseOffset = instruction.getAddress().toLong() * 0x100;
final String jumpOperand = environment.getNextVariableString();
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) + 0), OperandSize.BYTE, jumpOperand));
BranchGenerator.generate(baseOffset, environment, instruction, instructions, "blel", jumpOperand, Helpers.COUNT_REGISTER, true, false, false, false, false, false);
}
use of com.google.security.zynamics.zylib.disassembly.IOperandTreeNode in project binnavi by google.
the class BnllTranslator method translate.
@Override
public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "bnll");
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, "bnll", String.valueOf(Helpers.getCRRegisterIndex(BIOperand.getValue()) * 4), addressOperand1.getValue(), true, false, false, false, true, true);
}
Aggregations