diff options
| author | Xusheng <xusheng@vector35.com> | 2025-02-11 12:49:16 +0800 |
|---|---|---|
| committer | Xusheng <xusheng@vector35.com> | 2025-02-11 12:49:16 +0800 |
| commit | 3432a4eb42134d459e53b6e5f75ef620baeea858 (patch) | |
| tree | 364896c21049000d0a73958e21879b35a3dd7128 /python/lowlevelil.py | |
| parent | 840072d5603a454db162ffcaf8e6dc2311f0d012 (diff) | |
Add LowLevelILOperation.LLIL_BOOL_TO_INT. Fix https://github.com/Vector35/binaryninja-api/issues/6408
Diffstat (limited to 'python/lowlevelil.py')
| -rw-r--r-- | python/lowlevelil.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/python/lowlevelil.py b/python/lowlevelil.py index 4282a96f..2d40c22c 100644 --- a/python/lowlevelil.py +++ b/python/lowlevelil.py @@ -4826,8 +4826,29 @@ class LowLevelILFunction: return self.expr(LowLevelILOperation.LLIL_CMP_UGT, a, b, size=size) def test_bit(self, size: int, a: ExpressionIndex, b: ExpressionIndex) -> ExpressionIndex: + """ + ``test_bit`` returns an expression of size ``size`` that tells whether expression ``a`` has its bit with an + index of the expression ``b`` is set + + :param int size: size in bytes + :param ExpressionIndex a: an expression to be tested + :param ExpressionIndex b: an expression for the index of the big + :return: the result expression. + :rtype: ExpressionIndex + """ return self.expr(LowLevelILOperation.LLIL_TEST_BIT, a, b, size=size) + def bool_to_int(self, size: int, a: ExpressionIndex) -> ExpressionIndex: + """ + ``bool_to_int`` returns an expression of size ``size`` converting the boolean expression ``a`` to an integer + + :param int size: size in bytes + :param ExpressionIndex a: boolean expression to be converted + :return: the converted integer expression. + :rtype: ExpressionIndex + """ + return self.expr(LowLevelILOperation.LLIL_BOOL_TO_INT, a, size=size) + def system_call(self) -> ExpressionIndex: """ ``system_call`` return a system call expression. |
