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

Public Member Functions

def decode
 
def encode
 
def fromstring
 

Public Attributes

 expr
 
 value
 

Static Public Attributes

 parser = base_expr
 

Detailed Description

Definition at line 876 of file arch.py.

Member Function Documentation

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

Definition at line 879 of file arch.py.

880  def decode(self, v):
881  v = v & self.lmask
882  imm = (self.parent.imm4.value << 12) | v
883  self.expr = ExprInt32(imm)
884  return True
def miasm2.arch.arm.arch.arm_imm_4_12.encode (   self)

Definition at line 885 of file arch.py.

886  def encode(self):
887  if not isinstance(self.expr, ExprInt):
888  return False
889  v = int(self.expr.arg)
890  if v > 0xffff:
891  return False
892  self.parent.imm4.value = v >> 12
893  self.value = v & 0xfff
894  return True
895 
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_imm_4_12.expr

Definition at line 882 of file arch.py.

miasm2.arch.arm.arch.arm_imm_4_12.parser = base_expr
static

Definition at line 877 of file arch.py.

miasm2.arch.arm.arch.arm_imm_4_12.value

Definition at line 892 of file arch.py.


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