Miasm2
 All Classes Namespaces Files Functions Variables Typedefs Properties Macros
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
miasm2.arch.x86.arch.x86_rm_reg_mm Class Reference
+ Inheritance diagram for miasm2.arch.x86.arch.x86_rm_reg_mm:
+ Collaboration diagram for miasm2.arch.x86.arch.x86_rm_reg_mm:

Public Member Functions

def decode
 
def encode
 
def fromstring
 
def getrexsize
 
def setrexsize
 
def fromstring
 

Public Attributes

 expr
 
 value
 

Static Public Attributes

 selreg = gpregs_mm
 
int prio = default_prio+1
 
 parser = gpreg
 

Detailed Description

Definition at line 2361 of file arch.py.

Member Function Documentation

def miasm2.arch.x86.arch.x86_rm_reg_mm.decode (   self,
  v 
)

Definition at line 2363 of file arch.py.

2364  def decode(self, v):
2365  if self.parent.mode == 64 and self.getrexsize():
2366  v |= 0x8
2367  self.expr = self.selreg.expr[v]
2368  return True

+ Here is the call graph for this function:

def miasm2.arch.x86.arch.x86_rm_reg_mm.encode (   self)

Definition at line 2369 of file arch.py.

2370  def encode(self):
2371  if not isinstance(self.expr, ExprId):
2372  return False
2373  if self.expr not in self.selreg.expr:
2374  return False
2375  i = self.selreg.expr.index(self.expr)
2376  if self.parent.mode == 64 and i > 7:
2377  i -= 8
2378  self.setrexsize(1)
2379  self.value = i
2380  if self.value > self.lmask:
2381  log.debug("cannot encode field value %x %x",
2382  self.value, self.lmask)
2383  return False
2384  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.arch.x86.arch.x86_rm_reg_noarg.fromstring (   self,
  s,
  parser_result = None 
)
inherited

Definition at line 2277 of file arch.py.

2278  def fromstring(self, s, parser_result=None):
2279  if not hasattr(self.parent, 'sx') and hasattr(self.parent, "w8"):
2280  self.parent.w8.value = 1
2281  if parser_result:
2282  e, start, stop = parser_result[self.parser]
2283  if e is None:
2284  return None, None
2285  self.expr = e
2286  if self.expr.size == 8:
2287  if hasattr(self.parent, 'sx') or not hasattr(self.parent, 'w8'):
2288  return None, None
2289  self.parent.w8.value = 0
2290  return start, stop
2291  try:
2292  v, start, stop = self.parser.scanString(s).next()
2293  except StopIteration:
2294  return None, None
2295  self.expr = v[0]
2296  if self.expr.size == 0:
2297  if hasattr(self.parent, 'sx') or not hasattr(self.parent, 'w8'):
2298  return None, None
2299  self.parent.w8.value = 0
2300 
2301  return start, stop
def miasm2.arch.x86.arch.x86_rm_reg_noarg.getrexsize (   self)
inherited

Definition at line 2302 of file arch.py.

2303  def getrexsize(self):
2304  return self.parent.rex_r.value

+ Here is the caller graph for this function:

def miasm2.arch.x86.arch.x86_rm_reg_noarg.setrexsize (   self,
  v 
)
inherited

Definition at line 2305 of file arch.py.

2306  def setrexsize(self, v):
2307  self.parent.rex_r.value = v

+ Here is the caller graph for this function:

Member Data Documentation

miasm2.arch.x86.arch.x86_rm_reg_mm.expr

Definition at line 2366 of file arch.py.

miasm2.arch.x86.arch.x86_rm_reg_noarg.parser = gpreg
staticinherited

Definition at line 2275 of file arch.py.

int miasm2.arch.x86.arch.x86_rm_reg_noarg.prio = default_prio+1
staticinherited

Definition at line 2273 of file arch.py.

miasm2.arch.x86.arch.x86_rm_reg_mm.selreg = gpregs_mm
static

Definition at line 2362 of file arch.py.

miasm2.arch.x86.arch.x86_rm_reg_mm.value

Definition at line 2378 of file arch.py.


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