summaryrefslogtreecommitdiff
path: root/python/lowlevelil.py
diff options
context:
space:
mode:
authorMark Rowe <mark@vector35.com>2026-06-03 21:25:55 -0700
committerMark Rowe <mark@vector35.com>2026-06-04 14:31:09 -0700
commitd592ed6dafbb134553bf3a0b8ee70ff7f2049aba (patch)
tree1bfe7e335e5b4e21371cde4bf8858c6439bc3f18 /python/lowlevelil.py
parent9987102015875991813200116558306851763009 (diff)
Add bswap, popcnt, clz, ctz, cls, and rbit instructions
Diffstat (limited to 'python/lowlevelil.py')
-rw-r--r--python/lowlevelil.py44
1 files changed, 43 insertions, 1 deletions
diff --git a/python/lowlevelil.py b/python/lowlevelil.py
index 714b663d..ce9770f2 100644
--- a/python/lowlevelil.py
+++ b/python/lowlevelil.py
@@ -377,7 +377,13 @@ class LowLevelILInstruction(BaseILInstruction):
("left", "expr"), ("right", "expr")
], LowLevelILOperation.LLIL_MODS_DP: [("left", "expr"), ("right", "expr")], LowLevelILOperation.LLIL_NEG: [
("src", "expr")
- ], LowLevelILOperation.LLIL_NOT: [("src", "expr")], LowLevelILOperation.LLIL_SX: [
+ ], LowLevelILOperation.LLIL_NOT: [("src", "expr")], LowLevelILOperation.LLIL_BSWAP: [
+ ("src", "expr")
+ ], LowLevelILOperation.LLIL_POPCNT: [("src", "expr")], LowLevelILOperation.LLIL_CLZ: [
+ ("src", "expr")
+ ], LowLevelILOperation.LLIL_CTZ: [("src", "expr")], LowLevelILOperation.LLIL_RBIT: [
+ ("src", "expr")
+ ], LowLevelILOperation.LLIL_CLS: [("src", "expr")], LowLevelILOperation.LLIL_SX: [
("src", "expr")
], LowLevelILOperation.LLIL_ZX: [("src", "expr")], LowLevelILOperation.LLIL_LOW_PART: [
("src", "expr")
@@ -1363,6 +1369,36 @@ class LowLevelILNot(LowLevelILUnaryBase, Arithmetic):
@dataclass(frozen=True, repr=False, eq=False)
+class LowLevelILBswap(LowLevelILUnaryBase, Arithmetic):
+ pass
+
+
+@dataclass(frozen=True, repr=False, eq=False)
+class LowLevelILPopcnt(LowLevelILUnaryBase, Arithmetic):
+ pass
+
+
+@dataclass(frozen=True, repr=False, eq=False)
+class LowLevelILClz(LowLevelILUnaryBase, Arithmetic):
+ pass
+
+
+@dataclass(frozen=True, repr=False, eq=False)
+class LowLevelILCtz(LowLevelILUnaryBase, Arithmetic):
+ pass
+
+
+@dataclass(frozen=True, repr=False, eq=False)
+class LowLevelILRbit(LowLevelILUnaryBase, Arithmetic):
+ pass
+
+
+@dataclass(frozen=True, repr=False, eq=False)
+class LowLevelILCls(LowLevelILUnaryBase, Arithmetic):
+ pass
+
+
+@dataclass(frozen=True, repr=False, eq=False)
class LowLevelILSx(LowLevelILUnaryBase, Arithmetic):
pass
@@ -3132,6 +3168,12 @@ ILInstruction:Dict[LowLevelILOperation, LowLevelILInstruction] = { # type: igno
LowLevelILOperation.LLIL_MODS_DP: LowLevelILModsDp, # [("left", "expr"), ("right", "expr")],
LowLevelILOperation.LLIL_NEG: LowLevelILNeg, # [("src", "expr")],
LowLevelILOperation.LLIL_NOT: LowLevelILNot, # [("src", "expr")],
+ LowLevelILOperation.LLIL_BSWAP: LowLevelILBswap, # [("src", "expr")],
+ LowLevelILOperation.LLIL_POPCNT: LowLevelILPopcnt, # [("src", "expr")],
+ LowLevelILOperation.LLIL_CLZ: LowLevelILClz, # [("src", "expr")],
+ LowLevelILOperation.LLIL_CTZ: LowLevelILCtz, # [("src", "expr")],
+ LowLevelILOperation.LLIL_RBIT: LowLevelILRbit, # [("src", "expr")],
+ LowLevelILOperation.LLIL_CLS: LowLevelILCls, # [("src", "expr")],
LowLevelILOperation.LLIL_SX: LowLevelILSx, # [("src", "expr")],
LowLevelILOperation.LLIL_ZX: LowLevelILZx, # [("src", "expr")],
LowLevelILOperation.LLIL_LOW_PART: LowLevelILLowPart, # [("src", "expr")],