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

Public Member Functions

def decode
 
def encode
 
def decodeval
 
def encodeval
 
def fromstring
 

Public Attributes

 expr
 
 value
 

Static Public Attributes

 parser = deref_sp
 
list off_reg = regs_expr[13]
 

Detailed Description

Definition at line 1638 of file arch.py.

Member Function Documentation

def miasm2.arch.arm.arch.arm_offpc.decode (   self,
  v 
)
inherited

Definition at line 1605 of file arch.py.

1606  def decode(self, v):
1607  v = v & self.lmask
1608  v <<= 2
1609  if v:
1610  self.expr = ExprMem(self.off_reg + ExprInt32(v))
1611  else:
1612  self.expr = ExprMem(self.off_reg)
1613 
1614  e = self.expr.arg
1615  if isinstance(e, ExprOp) and e.op == 'wback':
1616  self.parent.wback.value = 1
1617  e = e.args[0]
1618  return True
def miasm2.arch.arm.arch.arm_offreg.decodeval (   self,
  v 
)
inherited

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_offpc.encode (   self)
inherited

Definition at line 1619 of file arch.py.

1620  def encode(self):
1621  e = self.expr
1622  if not isinstance(e, ExprMem):
1623  return False
1624  e = e.arg
1625  if not (isinstance(e, ExprOp) and e.op == "preinc"):
1626  log.debug('cannot encode %r', e)
1627  return False
1628  if e.args[0] != self.off_reg:
1629  log.debug('cannot encode reg %r', e.args[0])
1630  return False
1631  v = int(e.args[1].arg)
1632  v >>= 2
1633  self.value = v
1634  return True
1635 
1636 
1637 
def miasm2.arch.arm.arch.arm_offreg.encodeval (   self,
  v 
)
inherited

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_offpc.expr
inherited

Definition at line 1609 of file arch.py.

list miasm2.arch.arm.arch.arm_offsp.off_reg = regs_expr[13]
static

Definition at line 1640 of file arch.py.

miasm2.arch.arm.arch.arm_offsp.parser = deref_sp
static

Definition at line 1639 of file arch.py.

miasm2.arch.arm.arch.arm_offpc.value
inherited

Definition at line 1632 of file arch.py.


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