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

Public Member Functions

def decode
 
def encode
 
def fromstring
 

Public Attributes

 expr
 
 value
 

Static Public Attributes

 parser = deref_low
 

Detailed Description

Definition at line 1677 of file arch.py.

Member Function Documentation

def miasm2.arch.arm.arch.arm_deref.decode (   self,
  v 
)

Definition at line 1680 of file arch.py.

1681  def decode(self, v):
1682  v = v & self.lmask
1683  rbase = regs_expr[v]
1684  e = ExprOp('preinc', rbase, self.parent.off.expr)
1685  self.expr = ExprMem(e)
1686  return True
def miasm2.arch.arm.arch.arm_deref.encode (   self)

Definition at line 1687 of file arch.py.

1688  def encode(self):
1689  e = self.expr
1690  if not isinstance(e, ExprMem):
1691  return False
1692  e = e.arg
1693  if not (isinstance(e, ExprOp) and e.op == 'preinc'):
1694  log.debug('cannot encode %r', e)
1695  return False
1696  off = e.args[1]
1697  if isinstance(off, ExprId):
1698  self.parent.off.expr = off
1699  elif isinstance(off, ExprInt):
1700  self.parent.off.expr = off
1701  else:
1702  log.debug('cannot encode off %r', off)
1703  return False
1704  self.value = gpregs.expr.index(e.args[0])
1705  if self.value >= 1 << self.l:
1706  log.debug('cannot encode reg %r', off)
1707  return False
1708  return True
1709 
def miasm2.core.cpu.m_arg.fromstring (   self,
  s,
  parser_result = None 
)
inherited

Definition at line 604 of file cpu.py.

605  def fromstring(self, s, parser_result=None):
606  if parser_result:
607  e, start, stop = parser_result[self.parser]
608  self.expr = e
609  return start, stop
610  try:
611  v, start, stop = self.parser.scanString(s).next()
612  except StopIteration:
613  return None, None
614  self.expr = v[0]
615  return start, stop
616 

+ Here is the call graph for this function:

Member Data Documentation

miasm2.arch.arm.arch.arm_deref.expr

Definition at line 1684 of file arch.py.

miasm2.arch.arm.arch.arm_deref.parser = deref_low
static

Definition at line 1678 of file arch.py.

miasm2.arch.arm.arch.arm_deref.value

Definition at line 1703 of file arch.py.


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