diff options
| author | Rusty Wagner <rusty.wagner@gmail.com> | 2023-11-09 18:39:55 -0500 |
|---|---|---|
| committer | Rusty Wagner <rusty.wagner@gmail.com> | 2023-12-06 13:48:37 -0500 |
| commit | e9604c37df479a991d131d9540fafe78c7a0f7d4 (patch) | |
| tree | d1ac45fbc0da8dbfd3d09fec0625d11a5cfbc69e /python/lowlevelil.py | |
| parent | 6e1a863a4b20d73610e88cb7d9adf676c1053fce (diff) | |
Add LLIL/MLIL instructions to describe integer vs. floating point argument usage
Diffstat (limited to 'python/lowlevelil.py')
| -rw-r--r-- | python/lowlevelil.py | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/python/lowlevelil.py b/python/lowlevelil.py index 3354dae4..df8f352b 100644 --- a/python/lowlevelil.py +++ b/python/lowlevelil.py @@ -447,7 +447,9 @@ class LowLevelILInstruction(BaseILInstruction): ("dest_memory", "int"), ("dest", "reg_ssa_list") ], LowLevelILOperation.LLIL_CALL_STACK_SSA: [("src", "reg_ssa"), ("src_memory", "int")], - LowLevelILOperation.LLIL_CALL_PARAM: [("src", "expr_list")], LowLevelILOperation.LLIL_LOAD_SSA: [ + LowLevelILOperation.LLIL_CALL_PARAM: [("src", "expr_list")], + LowLevelILOperation.LLIL_SEPARATE_PARAM_LIST_SSA: [("src", "expr_list")], + LowLevelILOperation.LLIL_SHARED_PARAM_SLOT_SSA: [("src", "expr_list")], LowLevelILOperation.LLIL_LOAD_SSA: [ ("src", "expr"), ("src_memory", "int") ], LowLevelILOperation.LLIL_STORE_SSA: [("dest", "expr"), ("dest_memory", "int"), ("src_memory", "int"), ("src", "expr")], LowLevelILOperation.LLIL_REG_PHI: [ @@ -1706,6 +1708,44 @@ class LowLevelILCallParam(LowLevelILInstruction, SSA): @dataclass(frozen=True, repr=False, eq=False) +class LowLevelILSeparateParamListSsa(LowLevelILInstruction, SSA): + def __repr__(self): + return f"<LowLevelILSeparateParamListSsa: {self.src}>" + + def __str__(self): + return str(self.src) + + @property + def src(self) -> List['LowLevelILInstruction']: + return self._get_expr_list(0) + + @property + def detailed_operands(self) -> List[Tuple[str, LowLevelILOperandType, str]]: + return [ + ("src", self.src, "List[LowLevelILInstruction]"), + ] + + +@dataclass(frozen=True, repr=False, eq=False) +class LowLevelILSharedParamSlotSsa(LowLevelILInstruction, SSA): + def __repr__(self): + return f"<LowLevelILSharedParamSlotSsa: {self.src}>" + + def __str__(self): + return str(self.src) + + @property + def src(self) -> List['LowLevelILInstruction']: + return self._get_expr_list(0) + + @property + def detailed_operands(self) -> List[Tuple[str, LowLevelILOperandType, str]]: + return [ + ("src", self.src, "List[LowLevelILInstruction]"), + ] + + +@dataclass(frozen=True, repr=False, eq=False) class LowLevelILMemPhi(LowLevelILInstruction, Memory, Phi): @property def dest_memory(self) -> int: @@ -2977,6 +3017,8 @@ ILInstruction:Dict[LowLevelILOperation, LowLevelILInstruction] = { # type: igno LowLevelILOperation.LLIL_CALL_OUTPUT_SSA: LowLevelILCallOutputSsa, # [("dest_memory", "int"), ("dest", "reg_ssa_list")], LowLevelILOperation.LLIL_CALL_STACK_SSA: LowLevelILCallStackSsa, # [("src", "reg_ssa"), ("src_memory", "int")], LowLevelILOperation.LLIL_CALL_PARAM: LowLevelILCallParam, # [("src", "expr_list")], + LowLevelILOperation.LLIL_SEPARATE_PARAM_LIST_SSA: LowLevelILSeparateParamListSsa, # [("src", "expr_list")], + LowLevelILOperation.LLIL_SHARED_PARAM_SLOT_SSA: LowLevelILSharedParamSlotSsa, # [("src", "expr_list")], LowLevelILOperation.LLIL_LOAD_SSA: LowLevelILLoadSsa, # [("src", "expr"), ("src_memory", "int")], LowLevelILOperation.LLIL_STORE_SSA: LowLevelILStoreSsa, # [("dest", "expr"), ("dest_memory", "int"), ("src_memory", "int"), ("src", "expr")], LowLevelILOperation.LLIL_REG_PHI: LowLevelILRegPhi, # [("dest", "reg_ssa"), ("src", "reg_ssa_list")], |
