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

Public Member Functions

def decode
 
def encode
 
def fromstring
 

Public Attributes

 expr
 
 value
 

Static Public Attributes

 parser = pcdisp
 

Detailed Description

Definition at line 363 of file arch.py.

Member Function Documentation

def miasm2.arch.sh4.arch.sh4_pc32imm.decode (   self,
  v 
)

Definition at line 366 of file arch.py.

367  def decode(self, v):
368  self.expr = (PC & ExprInt32(0xfffffffc)) + ExprInt32(v * 4 + 4)
369  return True
def miasm2.arch.sh4.arch.sh4_pc32imm.encode (   self)

Definition at line 370 of file arch.py.

371  def encode(self):
372  res = MatchExpr(self.expr, (PC & ExprInt32(0xfffffffc)) + jra, [jra])
373  if not res:
374  return False
375  if not isinstance(res[jra], ExprInt):
376  return False
377  v = (int(res[jra].arg) - 4) / 4
378  if v is None:
379  return False
380  self.value = v
381  return True

+ Here is the call 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.sh4.arch.sh4_pc32imm.expr

Definition at line 367 of file arch.py.

miasm2.arch.sh4.arch.sh4_pc32imm.parser = pcdisp
static

Definition at line 364 of file arch.py.

miasm2.arch.sh4.arch.sh4_pc32imm.value

Definition at line 379 of file arch.py.


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