From 2f415e3da3a417160c07928cc8b91f42eddbac3f Mon Sep 17 00:00:00 2001 From: Andrew Lamoureux Date: Tue, 19 Sep 2023 23:44:49 -0400 Subject: Update documentation on llil mul, muludp, mulsdp - size describes input operands, not outputs - mult for when only lower half of product is needed - when full product needed, must specify signed/unsigned --- python/lowlevelil.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'python') diff --git a/python/lowlevelil.py b/python/lowlevelil.py index 99000250..4ab79621 100644 --- a/python/lowlevelil.py +++ b/python/lowlevelil.py @@ -4140,9 +4140,9 @@ class LowLevelILFunction: ) -> ExpressionIndex: """ ``mult`` multiplies expression ``a`` by expression ``b`` potentially setting flags ``flags`` and returning an - expression of ``size`` bytes. + expression. Both the operands and return value are ``size`` bytes as the product's upper half is discarded. - :param int size: the size of the result in bytes + :param int size: the size of the result and input operands, in bytes :param ExpressionIndex a: LHS expression :param ExpressionIndex b: RHS expression :param str flags: optional, flags to set @@ -4155,14 +4155,14 @@ class LowLevelILFunction: self, size: int, a: ExpressionIndex, b: ExpressionIndex, flags: Optional['architecture.FlagType'] = None ) -> ExpressionIndex: """ - ``mult_double_prec_signed`` multiplies signed with double precision expression ``a`` by expression ``b`` - potentially setting flags ``flags`` and returning an expression of ``size`` bytes. + ``mult_double_prec_signed`` multiplies signed with double precision expression ``a`` by expression ``b``, + each ``size`` bytes and potentially setting flags ``flags`` and returning an expression of ``2*size`` bytes. - :param int size: the size of the result in bytes + :param int size: the size of the input operands, in bytes :param ExpressionIndex a: LHS expression :param ExpressionIndex b: RHS expression :param str flags: optional, flags to set - :return: The expression ``muls.dp.{}(a, b)`` + :return: The expression ``muls.dp.<2*size>{}(a, b)`` :rtype: ExpressionIndex """ return self.expr(LowLevelILOperation.LLIL_MULS_DP, a, b, size=size, flags=flags) @@ -4171,14 +4171,14 @@ class LowLevelILFunction: self, size: int, a: ExpressionIndex, b: ExpressionIndex, flags: Optional['architecture.FlagType'] = None ) -> ExpressionIndex: """ - ``mult_double_prec_unsigned`` multiplies unsigned with double precision expression ``a`` by expression ``b`` - potentially setting flags ``flags`` and returning an expression of ``size`` bytes. + ``mult_double_prec_unsigned`` multiplies unsigned with double precision expression ``a`` by expression ``b``, + each ``size`` bytes and potentially setting flags ``flags`` and returning an expression of ``2*size`` bytes. - :param int size: the size of the result in bytes + :param int size: the size of the input operands, in bytes :param ExpressionIndex a: LHS expression :param ExpressionIndex b: RHS expression :param str flags: optional, flags to set - :return: The expression ``mulu.dp.{}(a, b)`` + :return: The expression ``mulu.dp.<2*size>{}(a, b)`` :rtype: ExpressionIndex """ return self.expr(LowLevelILOperation.LLIL_MULU_DP, a, b, size=size, flags=flags) -- cgit v1.3.1