MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / ConditionExecute

Function ConditionExecute

arch/mips/il.cpp:41–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39
40
41static void ConditionExecute(LowLevelILFunction& il, ExprId cond, ExprId trueCase, ExprId falseCase=INVALID_EXPRID)
42{
43 LowLevelILLabel trueCode, falseCode, done;
44
45 if (falseCase == INVALID_EXPRID)
46 il.AddInstruction(il.If(cond, trueCode, done));
47 else
48 il.AddInstruction(il.If(cond, trueCode, falseCode));
49
50 il.MarkLabel(trueCode);
51 il.AddInstruction(trueCase);
52 il.AddInstruction(il.Goto(done));
53
54 if (falseCase != INVALID_EXPRID)
55 {
56 il.MarkLabel(falseCode);
57 il.AddInstruction(falseCase);
58 il.AddInstruction(il.Goto(done));
59 }
60 il.MarkLabel(done);
61 return;
62}
63
64
65static size_t GetILOperandMemoryAddress(LowLevelILFunction& il, InstructionOperand& operand, size_t addrSize, int32_t delta=0)

Callers 1

Calls 4

AddInstructionMethod · 0.45
IfMethod · 0.45
MarkLabelMethod · 0.45
GotoMethod · 0.45

Tested by

no test coverage detected