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

Public Member Functions

def decode
 
def encode
 
def clone
 
def __hash__
 
def fromstring
 

Public Attributes

 expr
 
 value
 
 parent
 
 strbits
 
 l
 
 cls
 
 fname
 
 order
 
 lmask
 
 fbits
 
 fmask
 
 flen
 
 kargs
 

Static Public Attributes

 parser = gpregsz_32_64
 
 gpregs_info = gpregsz_info
 

Detailed Description

Definition at line 647 of file arch.py.

Member Function Documentation

def miasm2.core.cpu.bsi.__hash__ (   self)
inherited

Definition at line 493 of file cpu.py.

494  def __hash__(self):
495  kargs = []
496  for k, v in self.kargs.items():
497  if isinstance(v, list):
498  v = tuple(v)
499  kargs.append((k, v))
500  l = [self.strbits, self.l, self.cls,
501  self.fname, self.order, self.lmask, self.fbits,
502  self.fmask, self.value] # + kargs
503 
504  return hash(tuple(l))
505 
def miasm2.core.cpu.bsi.clone (   self)
inherited

Definition at line 483 of file cpu.py.

484  def clone(self):
485  s = self.__class__(self.parent,
486  self.strbits, self.l, self.cls,
487  self.fname, self.order, self.lmask, self.fbits,
488  self.fmask, self.value, self.flen, **self.kargs)
489  s.__dict__.update(self.kargs)
490  if hasattr(self, 'expr'):
491  s.expr = self.expr
492  return s
def miasm2.arch.aarch64.arch.aarch64_gpreg0.decode (   self,
  v 
)

Definition at line 651 of file arch.py.

652  def decode(self, v):
653  size = 64 if self.parent.sf.value else 32
654  if v == 0x1F:
655  self.expr = m2_expr.ExprInt(0, size)
656  else:
657  self.expr = self.gpregs_info[size].expr[v]
658  return True
def miasm2.arch.aarch64.arch.aarch64_gpreg0.encode (   self)

Definition at line 659 of file arch.py.

660  def encode(self):
661  if isinstance(self.expr, m2_expr.ExprInt):
662  if self.expr.arg == 0:
663  self.value = 0x1F
664  return True
665  return False
666  if not self.expr.size in self.gpregs_info:
667  return False
668  if not test_set_sf(self.parent, self.expr.size):
669  return False
670  if not self.expr in self.gpregs_info[self.expr.size].expr:
671  return False
672  self.value = self.gpregs_info[self.expr.size].expr.index(self.expr)
673  return True
674 
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.core.cpu.bsi.cls
inherited

Definition at line 465 of file cpu.py.

miasm2.arch.aarch64.arch.aarch64_gpreg0.expr

Definition at line 654 of file arch.py.

miasm2.core.cpu.bsi.fbits
inherited

Definition at line 469 of file cpu.py.

miasm2.core.cpu.bsi.flen
inherited

Definition at line 471 of file cpu.py.

miasm2.core.cpu.bsi.fmask
inherited

Definition at line 470 of file cpu.py.

miasm2.core.cpu.bsi.fname
inherited

Definition at line 466 of file cpu.py.

miasm2.arch.aarch64.arch.aarch64_gpreg0.gpregs_info = gpregsz_info
static

Definition at line 649 of file arch.py.

miasm2.core.cpu.bsi.kargs
inherited

Definition at line 473 of file cpu.py.

miasm2.core.cpu.bsi.l
inherited

Definition at line 464 of file cpu.py.

miasm2.core.cpu.bsi.lmask
inherited

Definition at line 468 of file cpu.py.

miasm2.core.cpu.bsi.order
inherited

Definition at line 467 of file cpu.py.

miasm2.core.cpu.bsi.parent
inherited

Definition at line 462 of file cpu.py.

miasm2.arch.aarch64.arch.aarch64_gpreg0.parser = gpregsz_32_64
static

Definition at line 648 of file arch.py.

miasm2.core.cpu.bsi.strbits
inherited

Definition at line 463 of file cpu.py.

miasm2.arch.aarch64.arch.aarch64_gpreg0.value

Definition at line 662 of file arch.py.


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