summaryrefslogtreecommitdiff
path: root/python/highlevelil.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/highlevelil.py
parent9987102015875991813200116558306851763009 (diff)
Add bswap, popcnt, clz, ctz, cls, and rbit instructions
Diffstat (limited to 'python/highlevelil.py')
-rw-r--r--python/highlevelil.py44
1 files changed, 43 insertions, 1 deletions
diff --git a/python/highlevelil.py b/python/highlevelil.py
index 4c81f687..bbeb0186 100644
--- a/python/highlevelil.py
+++ b/python/highlevelil.py
@@ -248,7 +248,13 @@ class HighLevelILInstruction(BaseILInstruction):
("left", "expr"), ("right", "expr")
], HighLevelILOperation.HLIL_MODS_DP: [("left", "expr"), ("right", "expr")], HighLevelILOperation.HLIL_NEG: [
("src", "expr")
- ], HighLevelILOperation.HLIL_NOT: [("src", "expr")], HighLevelILOperation.HLIL_SX: [
+ ], HighLevelILOperation.HLIL_NOT: [("src", "expr")], HighLevelILOperation.HLIL_BSWAP: [
+ ("src", "expr")
+ ], HighLevelILOperation.HLIL_POPCNT: [("src", "expr")], HighLevelILOperation.HLIL_CLZ: [
+ ("src", "expr")
+ ], HighLevelILOperation.HLIL_CTZ: [("src", "expr")], HighLevelILOperation.HLIL_RBIT: [
+ ("src", "expr")
+ ], HighLevelILOperation.HLIL_CLS: [("src", "expr")], HighLevelILOperation.HLIL_SX: [
("src", "expr")
], HighLevelILOperation.HLIL_ZX: [("src", "expr")], HighLevelILOperation.HLIL_LOW_PART: [
("src", "expr")
@@ -1984,6 +1990,36 @@ class HighLevelILNot(HighLevelILUnaryBase, Arithmetic):
@dataclass(frozen=True, repr=False, eq=False)
+class HighLevelILBswap(HighLevelILUnaryBase, Arithmetic):
+ pass
+
+
+@dataclass(frozen=True, repr=False, eq=False)
+class HighLevelILPopcnt(HighLevelILUnaryBase, Arithmetic):
+ pass
+
+
+@dataclass(frozen=True, repr=False, eq=False)
+class HighLevelILClz(HighLevelILUnaryBase, Arithmetic):
+ pass
+
+
+@dataclass(frozen=True, repr=False, eq=False)
+class HighLevelILCtz(HighLevelILUnaryBase, Arithmetic):
+ pass
+
+
+@dataclass(frozen=True, repr=False, eq=False)
+class HighLevelILRbit(HighLevelILUnaryBase, Arithmetic):
+ pass
+
+
+@dataclass(frozen=True, repr=False, eq=False)
+class HighLevelILCls(HighLevelILUnaryBase, Arithmetic):
+ pass
+
+
+@dataclass(frozen=True, repr=False, eq=False)
class HighLevelILSx(HighLevelILUnaryBase, Arithmetic):
pass
@@ -2478,6 +2514,12 @@ ILInstruction = {
HighLevelILOperation.HLIL_MODS_DP: HighLevelILModsDp, # ("left", "expr"), ("right", "expr"),
HighLevelILOperation.HLIL_NEG: HighLevelILNeg, # ("src", "expr"),
HighLevelILOperation.HLIL_NOT: HighLevelILNot, # ("src", "expr"),
+ HighLevelILOperation.HLIL_BSWAP: HighLevelILBswap, # ("src", "expr"),
+ HighLevelILOperation.HLIL_POPCNT: HighLevelILPopcnt, # ("src", "expr"),
+ HighLevelILOperation.HLIL_CLZ: HighLevelILClz, # ("src", "expr"),
+ HighLevelILOperation.HLIL_CTZ: HighLevelILCtz, # ("src", "expr"),
+ HighLevelILOperation.HLIL_RBIT: HighLevelILRbit, # ("src", "expr"),
+ HighLevelILOperation.HLIL_CLS: HighLevelILCls, # ("src", "expr"),
HighLevelILOperation.HLIL_SX: HighLevelILSx, # ("src", "expr"),
HighLevelILOperation.HLIL_ZX: HighLevelILZx, # ("src", "expr"),
HighLevelILOperation.HLIL_LOW_PART: HighLevelILLowPart, # ("src", "expr"),