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

Public Member Functions

def encode
 
def decode
 
def fromstring
 
def check_fbits
 
def fromstring
 

Public Attributes

 value
 
 expr
 
 fmask
 

Static Public Attributes

 reg_info = gpregsz_info
 
 parser = shift_off
 

Detailed Description

Definition at line 1011 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.arch.aarch64.arch.aarch64_gpreg_sftimm.decode (   self,
  v 
)

Definition at line 1043 of file arch.py.

1044  def decode(self, v):
1045  size = 64 if self.parent.sf.value else 32
1046  e = self.reg_info[size].expr[v]
1047  amount = self.parent.imm.value
1048  if amount != 0:
1049  e = m2_expr.ExprOp(
1050  shift_expr[self.parent.shift.value], e, m2_expr.ExprInt_from(e, amount))
1051  self.expr = e
1052  return True
1053 
def miasm2.arch.aarch64.arch.aarch64_gpreg_sftimm.encode (   self)

Definition at line 1015 of file arch.py.

1016  def encode(self):
1017  size = self.expr.size
1018  if not test_set_sf(self.parent, size):
1019  return False
1020  if isinstance(self.expr, m2_expr.ExprId):
1021  if not size in gpregs_info:
1022  return False
1023  if not self.expr in self.reg_info[size].expr:
1024  return False
1025  self.parent.shift.value = 0
1026  self.parent.imm.value = 0
1027  self.value = self.reg_info[size].expr.index(self.expr)
1028  return True
1029 
1030  if not isinstance(self.expr, m2_expr.ExprOp):
1031  return False
1032  if not self.expr.op in shift_expr:
1033  return False
1034  args = self.expr.args
1035  if not args[0] in self.reg_info[size].expr:
1036  return False
1037  if not isinstance(args[1], m2_expr.ExprInt):
1038  return False
1039  self.parent.shift.value = shift_expr.index(self.expr.op)
1040  self.parent.imm.value = int(args[1].arg)
1041  self.value = self.reg_info[size].expr.index(args[0])
1042  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:

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.arch.aarch64.arch.aarch64_gpreg_sftimm.expr

Definition at line 1050 of file arch.py.

miasm2.core.cpu.reg_noarg.fmask
inherited

Definition at line 667 of file cpu.py.

miasm2.arch.aarch64.arch.aarch64_gpreg_sftimm.parser = shift_off
static

Definition at line 1013 of file arch.py.

miasm2.arch.aarch64.arch.aarch64_gpreg_sftimm.reg_info = gpregsz_info
static

Definition at line 1012 of file arch.py.

miasm2.arch.aarch64.arch.aarch64_gpreg_sftimm.value

Definition at line 1026 of file arch.py.


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