Skip to content

Commit

Permalink
Add support for x86/x86-64 operands
Browse files Browse the repository at this point in the history
  • Loading branch information
romainthomas committed Dec 7, 2024
1 parent 917a118 commit 69d777e
Show file tree
Hide file tree
Showing 48 changed files with 2,703 additions and 23 deletions.
60 changes: 60 additions & 0 deletions api/python/lief/assembly/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import enum
from typing import Iterator, Optional, Union

from . import (
Expand All @@ -9,12 +10,29 @@ from . import (
riscv as riscv,
x86 as x86
)
import lief


class Engine:
pass

class Instruction:
class MemoryAccess(enum.Flag):
@staticmethod
def from_value(arg: int, /) -> Instruction.MemoryAccess: ...

def __eq__(self, arg, /) -> bool: ...

def __ne__(self, arg, /) -> bool: ...

def __int__(self) -> int: ...

NONE = 0

READ = 1

WRITE = 2

@property
def address(self) -> int: ...

Expand All @@ -41,4 +59,46 @@ class Instruction:
@property
def is_syscall(self) -> bool: ...

@property
def is_memory_access(self) -> bool: ...

@property
def is_move_reg(self) -> bool: ...

@property
def is_add(self) -> bool: ...

@property
def is_trap(self) -> bool: ...

@property
def is_barrier(self) -> bool: ...

@property
def is_return(self) -> bool: ...

@property
def is_indirect_branch(self) -> bool: ...

@property
def is_conditional_branch(self) -> bool: ...

@property
def is_unconditional_branch(self) -> bool: ...

@property
def is_compare(self) -> bool: ...

@property
def is_move_immediate(self) -> bool: ...

@property
def is_bitcast(self) -> bool: ...

@property
def memory_access(self) -> Instruction.MemoryAccess: ...

@property
def branch_target(self) -> Union[int, lief.lief_errors]: ...

def __str__(self) -> str: ...
Loading

0 comments on commit 69d777e

Please sign in to comment.