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

Method AppendTwoOperandFunction

lang/c/pseudoc.cpp:339–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337
338
339void PseudoCFunction::AppendTwoOperandFunction(const string& function,
340 const HighLevelILInstruction& instr, HighLevelILTokenEmitter& emitter, DisassemblySettings* settings,
341 bool sizeToken)
342{
343 const auto& twoOperand = instr.AsTwoOperand();
344 const auto leftExpr = twoOperand.GetLeftExpr();
345 const auto rightExpr = twoOperand.GetRightExpr();
346
347 emitter.Append(OperationToken, function);
348 if (sizeToken)
349 AppendSingleSizeToken(twoOperand.size, OperationToken, emitter);
350 emitter.AppendOpenParen();
351
352 if (leftExpr.operation == HLIL_SPLIT)
353 {
354 const auto low = leftExpr.GetLowExpr();
355 const auto high = leftExpr.GetHighExpr();
356
357 emitter.Append(OperationToken, "COMBINE");
358 emitter.AppendOpenParen();
359 GetExprTextInternal(high, emitter, settings);
360 emitter.Append(TextToken, ", ");
361 GetExprTextInternal(low, emitter, settings);
362 emitter.AppendCloseParen();
363 }
364 else
365 {
366 GetExprTextInternal(leftExpr, emitter, settings);
367 }
368
369 emitter.Append(TextToken, ", ");
370 GetExprTextInternal(rightExpr, emitter, settings);
371
372 emitter.AppendCloseParen();
373}
374
375
376void PseudoCFunction::AppendTwoOperandFunctionWithCarry(const string& function,

Callers

nothing calls this directly

Calls 7

AppendOpenParenMethod · 0.80
AppendCloseParenMethod · 0.80
GetLeftExprMethod · 0.45
GetRightExprMethod · 0.45
AppendMethod · 0.45
GetLowExprMethod · 0.45
GetHighExprMethod · 0.45

Tested by

no test coverage detected