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_imm_sf Class Reference
+ Inheritance diagram for miasm2.arch.aarch64.arch.aarch64_imm_sf:
+ Collaboration diagram for miasm2.arch.aarch64.arch.aarch64_imm_sf:

Public Member Functions

def fromstring
 
def encode
 
def decode
 
def int2expr
 
def expr2int
 
def decodeval
 
def encodeval
 

Public Attributes

 expr
 
 value
 

Static Public Attributes

 parser = base_expr
 
int intsize = 32
 
tuple intmask = (1 << intsize)
 

Detailed Description

Definition at line 817 of file arch.py.

Member Function Documentation

def miasm2.arch.aarch64.arch.aarch64_imm_sf.decode (   self,
  v 
)

Definition at line 846 of file arch.py.

847  def decode(self, v):
848  size = 64 if self.parent.sf.value else 32
849  self.expr = m2_expr.ExprInt(v, size)
850  return True
851 
def miasm2.core.cpu.imm_noarg.decodeval (   self,
  v 
)
inherited

Definition at line 1504 of file cpu.py.

1505  def decodeval(self, v):
1506  return v

+ Here is the caller graph for this function:

def miasm2.arch.aarch64.arch.aarch64_imm_sf.encode (   self)

Definition at line 835 of file arch.py.

836  def encode(self):
837  if not isinstance(self.expr, m2_expr.ExprInt):
838  return False
839  if not test_set_sf(self.parent, self.expr.size):
840  return False
841  value = int(self.expr.arg)
842  if value >= 1 << self.l:
843  return False
844  self.value = value
845  return True

+ Here is the call graph for this function:

def miasm2.core.cpu.imm_noarg.encodeval (   self,
  v 
)
inherited

Definition at line 1507 of file cpu.py.

1508  def encodeval(self, v):
1509  if v > self.lmask:
1510  return False
1511  return v

+ Here is the caller graph for this function:

def miasm2.core.cpu.imm_noarg.expr2int (   self,
  e 
)
inherited

Definition at line 1473 of file cpu.py.

1474  def expr2int(self, e):
1475  if not isinstance(e, m2_expr.ExprInt):
1476  return None
1477  v = int(e.arg)
1478  if v & ~self.intmask != 0:
1479  return None
1480  return v

+ Here is the caller graph for this function:

def miasm2.arch.aarch64.arch.aarch64_imm_sf.fromstring (   self,
  s,
  parser_result = None 
)

Definition at line 820 of file arch.py.

821  def fromstring(self, s, parser_result=None):
822  start, stop = super(aarch64_imm_sf, self).fromstring(s, parser_result)
823  if start is None:
824  return start, stop
825  size = self.parent.args[0].expr.size
826  if self.expr in gpregs64_info.expr + gpregs32_info.expr:
827  return None, None
828  if isinstance(self.expr, m2_expr.ExprOp):
829  return False
830  expr = set_imm_to_size(size, self.expr)
831  if expr is None:
832  return None, None
833  self.expr = expr
834  return start, stop

+ Here is the call graph for this function:

def miasm2.core.cpu.imm_noarg.int2expr (   self,
  v 
)
inherited

Definition at line 1468 of file cpu.py.

1469  def int2expr(self, v):
1470  if (v & ~self.intmask) != 0:
1471  return None
1472  return m2_expr.ExprInt(v, self.intsize)

+ Here is the caller graph for this function:

Member Data Documentation

miasm2.arch.aarch64.arch.aarch64_imm_sf.expr

Definition at line 832 of file arch.py.

tuple miasm2.core.cpu.imm_noarg.intmask = (1 << intsize)
staticinherited

Definition at line 1466 of file cpu.py.

int miasm2.core.cpu.imm_noarg.intsize = 32
staticinherited

Definition at line 1465 of file cpu.py.

miasm2.arch.aarch64.arch.aarch64_imm_sf.parser = base_expr
static

Definition at line 818 of file arch.py.

miasm2.arch.aarch64.arch.aarch64_imm_sf.value

Definition at line 843 of file arch.py.


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