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

Public Member Functions

def fromstring
 
def fromstring
 
def decode
 
def encode
 
def check_fbits
 

Public Attributes

 expr
 
 expr
 
 value
 
 fmask
 

Static Public Attributes

 reg_info = gpregs_sppc
 
 parser = reg_info.parser
 

Detailed Description

Definition at line 1856 of file arch.py.

Member Function Documentation

def miasm2.core.cpu.reg_noarg.check_fbits (   self,
  v 
)
inherited

Definition at line 666 of file cpu.py.

667  def check_fbits(self, v):
668  return v & self.fmask == self.fbits
669 
def miasm2.core.cpu.reg_noarg.decode (   self,
  v 
)
inherited

Definition at line 648 of file cpu.py.

649  def decode(self, v):
650  v = v & self.lmask
651  if v >= len(self.reg_info.expr):
652  return False
653  self.expr = self.reg_info.expr[v]
654  return True
def miasm2.core.cpu.reg_noarg.encode (   self)
inherited

Definition at line 655 of file cpu.py.

656  def encode(self):
657  if not self.expr in self.reg_info.expr:
658  log.debug("cannot encode reg %r", self.expr)
659  return False
660  self.value = self.reg_info.expr.index(self.expr)
661  if self.value > self.lmask:
662  log.debug("cannot encode field value %x %x",
663  self.value, self.lmask)
664  return False
665  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:

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

Definition at line 636 of file cpu.py.

637  def fromstring(self, s, parser_result=None):
638  if parser_result:
639  e, start, stop = parser_result[self.parser]
640  self.expr = e
641  return start, stop
642  try:
643  v, start, stop = self.parser.scanString(s).next()
644  except StopIteration:
645  return None, None
646  self.expr = v[0]
647  return start, stop

Member Data Documentation

miasm2.core.cpu.m_arg.expr
inherited

Definition at line 607 of file cpu.py.

miasm2.core.cpu.reg_noarg.expr
inherited

Definition at line 639 of file cpu.py.

miasm2.core.cpu.reg_noarg.fmask
inherited

Definition at line 667 of file cpu.py.

miasm2.arch.arm.arch.arm_sppc.parser = reg_info.parser
static

Definition at line 1858 of file arch.py.

miasm2.arch.arm.arch.arm_sppc.reg_info = gpregs_sppc
static

Definition at line 1857 of file arch.py.

miasm2.core.cpu.reg_noarg.value
inherited

Definition at line 659 of file cpu.py.


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