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_offreg Class Reference
+ Inheritance diagram for miasm2.arch.arm.arch.arm_offreg:
+ Collaboration diagram for miasm2.arch.arm.arch.arm_offreg:

Public Member Functions

def decodeval
 
def encodeval
 
def decode
 
def encode
 
def fromstring
 

Public Attributes

 expr
 
 value
 

Static Public Attributes

 parser = deref_pc
 

Detailed Description

Definition at line 1565 of file arch.py.

Member Function Documentation

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

Definition at line 1574 of file arch.py.

1575  def decode(self, v):
1576  v = v & self.lmask
1577  v = self.decodeval(v)
1578  if v:
1579  self.expr = self.off_reg + ExprInt32(v)
1580  else:
1581  self.expr = self.off_reg
1582 
1583  e = self.expr
1584  if isinstance(e, ExprOp) and e.op == 'wback':
1585  self.parent.wback.value = 1
1586  e = e.args[0]
1587  return True

+ Here is the call graph for this function:

def miasm2.arch.arm.arch.arm_offreg.decodeval (   self,
  v 
)

Definition at line 1568 of file arch.py.

1569  def decodeval(self, v):
1570  return v

+ Here is the caller graph for this function:

def miasm2.arch.arm.arch.arm_offreg.encode (   self)

Definition at line 1588 of file arch.py.

1589  def encode(self):
1590  e = self.expr
1591  if not (isinstance(e, ExprOp) and e.op == "preinc"):
1592  log.debug('cannot encode %r', e)
1593  return False
1594  if e.args[0] != self.off_reg:
1595  log.debug('cannot encode reg %r', e.args[0])
1596  return False
1597  v = int(e.args[1].arg)
1598  v = self.encodeval(v)
1599  self.value = v
1600  return True
1601 

+ Here is the call graph for this function:

def miasm2.arch.arm.arch.arm_offreg.encodeval (   self,
  v 
)

Definition at line 1571 of file arch.py.

1572  def encodeval(self, v):
1573  return v

+ Here is the caller graph for this function:

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_offreg.expr

Definition at line 1578 of file arch.py.

miasm2.arch.arm.arch.arm_offreg.parser = deref_pc
static

Definition at line 1566 of file arch.py.

miasm2.arch.arm.arch.arm_offreg.value

Definition at line 1598 of file arch.py.


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