summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAndrew Lamoureux <andrew@vector35.com>2023-09-19 23:44:49 -0400
committerAndrew Lamoureux <andrew@vector35.com>2023-09-19 23:44:49 -0400
commit2f415e3da3a417160c07928cc8b91f42eddbac3f (patch)
tree6f2da8a9b3256265ed48bbb86f6f3a1f084b7359 /python
parente7b4077aca9444145394852900ac109f5a876d4a (diff)
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
Diffstat (limited to 'python')
-rw-r--r--python/lowlevelil.py20
1 files changed, 10 insertions, 10 deletions
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.<size>{<flags>}(a, b)``
+ :return: The expression ``muls.dp.<2*size>{<flags>}(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.<size>{<flags>}(a, b)``
+ :return: The expression ``mulu.dp.<2*size>{<flags>}(a, b)``
:rtype: ExpressionIndex
"""
return self.expr(LowLevelILOperation.LLIL_MULU_DP, a, b, size=size, flags=flags)