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

Method sub

python/lowlevelil.py:4558–4574  ·  view source on GitHub ↗

``sub`` subtracts expression ``b`` from expression ``a`` 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 :param str flag

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

Source from the content-addressed store, hash-verified

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,
4560 loc: Optional['ILSourceLocation'] = None
4561 ) -> ExpressionIndex:
4562 """
4563 ``sub`` subtracts expression ``b`` from expression ``a`` potentially setting flags ``flags`` and returning
4564 an expression of ``size`` bytes.
4565
4566 :param int size: the size of the result in bytes
4567 :param ExpressionIndex a: LHS expression
4568 :param ExpressionIndex b: RHS expression
4569 :param str flags: flags to set
4570 :param ILSourceLocation loc: location of returned expression
4571 :return: The expression ``sub.<size>{<flags>}(a, b)``
4572 :rtype: ExpressionIndex
4573 """
4574 return self.expr(LowLevelILOperation.LLIL_SUB, a, b, size=size, flags=flags, source_location=loc)
4575
4576 def sub_borrow(
4577 self, size: int, a: ExpressionIndex, b: ExpressionIndex, carry: ExpressionIndex,

Callers 9

disassemble_binjaFunction · 0.45
convertHandlerNameFunction · 0.45
distillFunction · 0.45
test_all_liftsFunction · 0.45
normalizeFunction · 0.45
lift_instructionFunction · 0.45
M6502Class · 0.45
translate_instrFunction · 0.45
generate_stubs.pyFile · 0.45

Calls 1

exprMethod · 0.95

Tested by 4

disassemble_binjaFunction · 0.36
distillFunction · 0.36
test_all_liftsFunction · 0.36
normalizeFunction · 0.36