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

Method AppendTwoOperandFunction

lang/rust/pseudorust.cpp:365–396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

363
364
365void PseudoRustFunction::AppendTwoOperandFunction(const string& function,
366 const HighLevelILInstruction& instr, HighLevelILTokenEmitter& emitter, DisassemblySettings* settings,
367 bool sizeToken)
368{
369 const auto& twoOperand = instr.AsTwoOperand();
370 const auto leftExpr = twoOperand.GetLeftExpr();
371 const auto rightExpr = twoOperand.GetRightExpr();
372
373 emitter.Append(OperationToken, function);
374 if (sizeToken)
375 AppendSingleSizeToken(twoOperand.size, OperationToken, emitter);
376 emitter.AppendOpenParen();
377
378 if (leftExpr.operation == HLIL_SPLIT)
379 {
380 const auto low = leftExpr.GetLowExpr();
381 const auto high = leftExpr.GetHighExpr();
382
383 emitter.Append(OperationToken, "COMBINE");
384 emitter.AppendOpenParen();
385 GetExprText(high, emitter, settings);
386 emitter.Append(TextToken, ", ");
387 GetExprText(low, emitter, settings);
388 emitter.AppendCloseParen();
389 }
390
391 GetExprText(leftExpr, emitter, settings);
392 emitter.Append(TextToken, ", ");
393 GetExprText(rightExpr, emitter, settings);
394
395 emitter.AppendCloseParen();
396}
397
398
399void PseudoRustFunction::AppendTwoOperandMethodCall(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