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

Public Member Functions

def decode_w_size
 
def encode_w_size
 
def get_postpre
 
def decode
 
def encode
 
def fromstring
 

Public Attributes

 expr
 
 value
 

Static Public Attributes

 parser = deref
 

Detailed Description

Definition at line 1269 of file arch.py.

Member Function Documentation

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

Definition at line 1288 of file arch.py.

1289  def decode(self, v):
1290  reg = gpregs64_info.expr[v]
1291  off = self.parent.imm.expr.arg
1292  op = self.get_postpre(self.parent)
1293  off = self.decode_w_size(off)
1294  self.expr = m2_expr.ExprOp(op, reg, m2_expr.ExprInt64(off))
1295  return True

+ Here is the call graph for this function:

def miasm2.arch.aarch64.arch.aarch64_deref.decode_w_size (   self,
  off 
)

Definition at line 1272 of file arch.py.

1273  def decode_w_size(self, off):
1274  return off

+ Here is the caller graph for this function:

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

Definition at line 1296 of file arch.py.

1297  def encode(self):
1298  expr = self.expr
1299  if not isinstance(expr, m2_expr.ExprOp):
1300  return False
1301  if not expr.op in ['postinc', 'preinc_wb', 'preinc']:
1302  return False
1303  if hasattr(self.parent, "postpre"):
1304  if expr.op == 'postinc':
1305  self.parent.postpre.value = 0
1306  else:
1307  self.parent.postpre.value = 1
1308  reg, off = expr.args
1309  if not reg in gpregs64_info.expr:
1310  return False
1311  if not isinstance(off, m2_expr.ExprInt):
1312  return False
1313  imm = int(off.arg)
1314  imm = self.encode_w_size(imm)
1315  if imm is False:
1316  return False
1317  self.parent.imm.expr = m2_expr.ExprInt64(imm)
1318  if not self.parent.imm.encode():
1319  return False
1320  self.value = gpregs64_info.expr.index(reg)
1321  return True
1322 

+ Here is the call graph for this function:

def miasm2.arch.aarch64.arch.aarch64_deref.encode_w_size (   self,
  off 
)

Definition at line 1275 of file arch.py.

1276  def encode_w_size(self, off):
1277  return off

+ Here is the caller 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.arch.aarch64.arch.aarch64_deref.get_postpre (   self,
  parent 
)

Definition at line 1278 of file arch.py.

1279  def get_postpre(self, parent):
1280  if hasattr(self.parent, "postpre"):
1281  if self.parent.postpre.value == 0:
1282  op = 'postinc'
1283  else:
1284  op = 'preinc_wb'
1285  else:
1286  op = 'preinc'
1287  return op

+ Here is the caller graph for this function:

Member Data Documentation

miasm2.arch.aarch64.arch.aarch64_deref.expr

Definition at line 1293 of file arch.py.

miasm2.arch.aarch64.arch.aarch64_deref.parser = deref
static

Definition at line 1270 of file arch.py.

miasm2.arch.aarch64.arch.aarch64_deref.value

Definition at line 1319 of file arch.py.


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