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

Function GenIfElse

arch/arm64/il.cpp:67–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67static void GenIfElse(LowLevelILFunction& il, ExprId clause, ExprId trueCase, ExprId falseCase)
68{
69 if (falseCase)
70 {
71 LowLevelILLabel trueCode, falseCode, done;
72 il.AddInstruction(il.If(clause, trueCode, falseCode));
73 il.MarkLabel(trueCode);
74 il.AddInstruction(trueCase);
75 il.AddInstruction(il.Goto(done));
76 il.MarkLabel(falseCode);
77 il.AddInstruction(falseCase);
78 il.AddInstruction(il.Goto(done));
79 il.MarkLabel(done);
80 }
81 else
82 {
83 LowLevelILLabel trueCode, done;
84 il.AddInstruction(il.If(clause, trueCode, done));
85 il.MarkLabel(trueCode);
86 il.AddInstruction(trueCase);
87 il.MarkLabel(done);
88 }
89 return;
90}
91
92ExprId ExtractImmediate(LowLevelILFunction& il, InstructionOperand& operand, int sizeof_imm)
93{

Callers 1

Calls 4

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

Tested by

no test coverage detected