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

Method AppendTwoOperandFunctionWithCarry

lang/c/pseudoc.cpp:376–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

374
375
376void PseudoCFunction::AppendTwoOperandFunctionWithCarry(const string& function,
377 const HighLevelILInstruction& instr, HighLevelILTokenEmitter& tokens, DisassemblySettings* settings)
378{
379 const auto leftExpr = instr.GetLeftExpr();
380 const auto rightExpr = instr.GetRightExpr();
381 const auto carryExpr = instr.GetCarryExpr();
382
383 tokens.Append(OperationToken, function);
384 AppendSingleSizeToken(instr.size, OperationToken, tokens);
385 tokens.AppendOpenParen();
386
387 if (leftExpr.operation == HLIL_SPLIT)
388 {
389 const auto low = leftExpr.GetLowExpr();
390 const auto high = leftExpr.GetHighExpr();
391
392 tokens.Append(OperationToken, "COMBINE");
393 tokens.AppendOpenParen();
394 GetExprTextInternal(high, tokens, settings);
395 tokens.Append(TextToken, ", ");
396 GetExprTextInternal(low, tokens, settings);
397 tokens.AppendCloseParen();
398 }
399
400 GetExprTextInternal(leftExpr, tokens, settings);
401 tokens.Append(TextToken, ", ");
402 GetExprTextInternal(rightExpr, tokens, settings);
403 tokens.Append(TextToken, ", ");
404 GetExprTextInternal(carryExpr, tokens, settings);
405
406 tokens.AppendCloseParen();
407}
408
409
410Ref<Type> PseudoCFunction::GetFieldType(const HighLevelILInstruction& var, bool deref)

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected