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

Public Member Functions

def decode
 
def encode
 
def fromstring
 

Public Attributes

 expr
 
 value
 

Static Public Attributes

 parser = base_expr
 
string shift_op = '<<'
 

Detailed Description

Definition at line 1155 of file arch.py.

Member Function Documentation

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

Definition at line 1159 of file arch.py.

1160  def decode(self, v):
1161  size = 64 if self.parent.sf.value else 32
1162  self.expr = m2_expr.ExprInt(v << (16 * self.parent.hw.value), size)
1163  return True
def miasm2.arch.aarch64.arch.aarch64_imm_hw.encode (   self)

Definition at line 1164 of file arch.py.

1165  def encode(self):
1166  if not isinstance(self.expr, m2_expr.ExprInt):
1167  return False
1168  size = self.parent.args[0].expr.size
1169  if set_imm_to_size(size, self.expr) is None:
1170  return False
1171  value = int(self.expr.arg)
1172  mask = (1 << size) - 1
1173  for i in xrange(size / 16):
1174  if ((0xffff << (i * 16)) ^ mask) & value:
1175  continue
1176  self.parent.hw.value = i
1177  self.value = value >> (i * 16)
1178  return True
1179  return False
1180 

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

Definition at line 1161 of file arch.py.

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

Definition at line 1156 of file arch.py.

string miasm2.arch.aarch64.arch.aarch64_imm_hw.shift_op = '<<'
static

Definition at line 1157 of file arch.py.

miasm2.arch.aarch64.arch.aarch64_imm_hw.value

Definition at line 1176 of file arch.py.


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