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

Method add_carry

python/lowlevelil.py:4539–4556  ·  view source on GitHub ↗

``add_carry`` adds with carry expression ``a`` to expression ``b`` potentially setting flags ``flags`` and returning an expression of ``size`` bytes. :param int size: the size of the result in bytes :param ExpressionIndex a: LHS expression :param ExpressionIndex b: RHS expression :para

(
	    self, size: int, a: ExpressionIndex, b: ExpressionIndex, carry: ExpressionIndex,
	    flags: Optional['architecture.FlagType'] = None, loc: Optional['ILSourceLocation'] = None
	)

Source from the content-addressed store, hash-verified

4537 return self.expr(LowLevelILOperation.LLIL_ADD, a, b, size=size, flags=flags, source_location=loc)
4538
4539 def add_carry(
4540 self, size: int, a: ExpressionIndex, b: ExpressionIndex, carry: ExpressionIndex,
4541 flags: Optional['architecture.FlagType'] = None, loc: Optional['ILSourceLocation'] = None
4542 ) -> ExpressionIndex:
4543 """
4544 ``add_carry`` adds with carry expression ``a`` to expression ``b`` potentially setting flags ``flags`` and
4545 returning an expression of ``size`` bytes.
4546
4547 :param int size: the size of the result in bytes
4548 :param ExpressionIndex a: LHS expression
4549 :param ExpressionIndex b: RHS expression
4550 :param ExpressionIndex carry: Carry flag expression
4551 :param str flags: flags to set
4552 :param ILSourceLocation loc: location of returned expression
4553 :return: The expression ``adc.<size>{<flags>}(a, b, carry)``
4554 :rtype: ExpressionIndex
4555 """
4556 return self.expr(LowLevelILOperation.LLIL_ADC, a, b, carry, size=size, flags=flags, source_location=loc)
4557
4558 def sub(
4559 self, size: int, a: ExpressionIndex, b: ExpressionIndex, flags: Optional['architecture.FlagType'] = None,

Callers 1

M6502Class · 0.45

Calls 1

exprMethod · 0.95

Tested by

no test coverage detected