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

Public Member Functions

def encode
 
def decode
 
def fromstring
 

Public Attributes

 value
 
 expr
 

Static Public Attributes

 parser = gpreg_list
 

Detailed Description

Definition at line 1777 of file arch.py.

Member Function Documentation

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

Definition at line 1800 of file arch.py.

1801  def decode(self, v):
1802  v = v & self.lmask
1803  out = []
1804  for i in xrange(0x10):
1805  if 1 << i & v:
1806  out.append(gpregs.expr[i])
1807 
1808  if self.parent.pclr.value == 1:
1809  if self.parent.pp.value == 0:
1810  out += [regs_expr[14]]
1811  else:
1812  out += [regs_expr[15]]
1813  if not out:
1814  return False
1815  e = ExprOp('reglist', *out)
1816  self.expr = e
1817  return True
1818 
def miasm2.arch.arm.arch.armt_rlist_pclr.encode (   self)

Definition at line 1779 of file arch.py.

1780  def encode(self):
1781  e = self.expr
1782  reg_l = list(e.args)
1783  self.parent.pclr.value = 0
1784  if self.parent.pp.value == 0:
1785  # print 'push'
1786  if regs_expr[14] in reg_l:
1787  reg_l.remove(regs_expr[14])
1788  self.parent.pclr.value = 1
1789  else:
1790  # print 'pop',
1791  if regs_expr[15] in reg_l:
1792  reg_l.remove(regs_expr[15])
1793  self.parent.pclr.value = 1
1794  rlist = [gpregs.expr.index(x) for x in reg_l]
1795  v = 0
1796  for r in rlist:
1797  v |= 1 << r
1798  self.value = v
1799  return True
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.armt_rlist_pclr.expr

Definition at line 1815 of file arch.py.

miasm2.arch.arm.arch.armt_rlist.parser = gpreg_list
staticinherited

Definition at line 1753 of file arch.py.

miasm2.arch.arm.arch.armt_rlist_pclr.value

Definition at line 1797 of file arch.py.


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