Miasm2
 All Classes Namespaces Files Functions Variables Typedefs Properties Macros
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
miasm2.arch.x86.arch.x86_08_ne Class Reference
+ Inheritance diagram for miasm2.arch.x86.arch.x86_08_ne:
+ Collaboration diagram for miasm2.arch.x86.arch.x86_08_ne:

Public Member Functions

def encode
 
def decode
 
def decodeval
 
def encodeval
 
def int2expr
 
def expr2int
 
def fromstring
 

Public Attributes

 expr
 
 value
 

Static Public Attributes

int intsize = 8
 
tuple intmask = (1 << intsize)
 
 parser = base_expr
 

Detailed Description

Definition at line 1076 of file arch.py.

Member Function Documentation

def miasm2.arch.x86.arch.x86_08_ne.decode (   self,
  v 
)

Definition at line 1083 of file arch.py.

1084  def decode(self, v):
1085  v = swap_uint(self.l, v)
1086  p = self.parent
1087  admode = p.v_admode()
1088  value = sign_ext(v, self.intsize, admode)
1089  self.expr = ExprInt(value, admode)
1090  return True
1091 
def swap_uint
Definition: cpu.py:1578
def sign_ext
Definition: cpu.py:1602

+ Here is the call graph for this function:

def miasm2.arch.x86.arch.x86_imm.decodeval (   self,
  v 
)
inherited

Definition at line 1037 of file arch.py.

1038  def decodeval(self, v):
1039  return swap_uint(self.l, v)
def swap_uint
Definition: cpu.py:1578

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def miasm2.arch.x86.arch.x86_08_ne.encode (   self)

Definition at line 1080 of file arch.py.

1081  def encode(self):
1082  return True
def miasm2.arch.x86.arch.x86_imm.encodeval (   self,
  v 
)
inherited

Definition at line 1040 of file arch.py.

1041  def encodeval(self, v):
1042  return swap_uint(self.l, v)
1043 
def swap_uint
Definition: cpu.py:1578

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def miasm2.core.cpu.imm_noarg.expr2int (   self,
  e 
)
inherited

Definition at line 1473 of file cpu.py.

1474  def expr2int(self, e):
1475  if not isinstance(e, m2_expr.ExprInt):
1476  return None
1477  v = int(e.arg)
1478  if v & ~self.intmask != 0:
1479  return None
1480  return v

+ Here is the caller graph for this function:

def miasm2.core.cpu.imm_noarg.fromstring (   self,
  s,
  parser_result = None 
)
inherited

Definition at line 1481 of file cpu.py.

1482  def fromstring(self, s, parser_result=None):
1483  if parser_result:
1484  e, start, stop = parser_result[self.parser]
1485  else:
1486  try:
1487  e, start, stop = self.parser.scanString(s).next()
1488  except StopIteration:
1489  return None, None
1490  if e is None:
1491  return None, None
1492 
1493  assert(isinstance(e, m2_expr.Expr))
1494  if isinstance(e, tuple):
1495  self.expr = self.int2expr(e[1])
1496  elif isinstance(e, m2_expr.Expr):
1497  self.expr = e
1498  else:
1499  raise TypeError('zarb expr')
1500  if self.expr is None:
1501  log.debug('cannot fromstring int %r', s)
1502  return None, None
1503  return start, stop

+ Here is the call graph for this function:

def miasm2.core.cpu.imm_noarg.int2expr (   self,
  v 
)
inherited

Definition at line 1468 of file cpu.py.

1469  def int2expr(self, v):
1470  if (v & ~self.intmask) != 0:
1471  return None
1472  return m2_expr.ExprInt(v, self.intsize)

+ Here is the caller graph for this function:

Member Data Documentation

miasm2.arch.x86.arch.x86_08_ne.expr

Definition at line 1088 of file arch.py.

tuple miasm2.arch.x86.arch.x86_08_ne.intmask = (1 << intsize)
static

Definition at line 1078 of file arch.py.

int miasm2.arch.x86.arch.x86_08_ne.intsize = 8
static

Definition at line 1077 of file arch.py.

miasm2.arch.x86.arch.x86_imm.parser = base_expr
staticinherited

Definition at line 1035 of file arch.py.

miasm2.core.cpu.imm_noarg.value
inherited

Definition at line 1528 of file cpu.py.


The documentation for this class was generated from the following file: