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

Public Member Functions

def flen
 
def encode
 
def decode
 
def clone
 
def __hash__
 

Public Attributes

 value
 
 l
 
 expr
 
 parent
 
 strbits
 
 cls
 
 fname
 
 order
 
 lmask
 
 fbits
 
 fmask
 
 flen
 
 kargs
 

Detailed Description

Definition at line 2501 of file arch.py.

Member Function Documentation

def miasm2.core.cpu.bsi.__hash__ (   self)
inherited

Definition at line 493 of file cpu.py.

494  def __hash__(self):
495  kargs = []
496  for k, v in self.kargs.items():
497  if isinstance(v, list):
498  v = tuple(v)
499  kargs.append((k, v))
500  l = [self.strbits, self.l, self.cls,
501  self.fname, self.order, self.lmask, self.fbits,
502  self.fmask, self.value] # + kargs
503 
504  return hash(tuple(l))
505 
def miasm2.core.cpu.bsi.clone (   self)
inherited

Definition at line 483 of file cpu.py.

484  def clone(self):
485  s = self.__class__(self.parent,
486  self.strbits, self.l, self.cls,
487  self.fname, self.order, self.lmask, self.fbits,
488  self.fmask, self.value, self.flen, **self.kargs)
489  s.__dict__.update(self.kargs)
490  if hasattr(self, 'expr'):
491  s.expr = self.expr
492  return s
def miasm2.arch.x86.arch.bs_cond_disp.decode (   self,
  v 
)

Definition at line 2548 of file arch.py.

2549  def decode(self, v):
2550  admode = self.parent.v_admode()
2551  v = swap_uint(self.l, v)
2552  self.value = v
2553  v = sign_ext(v, self.l, admode)
2554  v = ExprInt(v, admode)
2555  self.expr = v
2556  return True
2557 
def swap_uint
Definition: cpu.py:1578
def sign_ext
Definition: cpu.py:1602

+ Here is the call graph for this function:

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

Definition at line 2540 of file arch.py.

2541  def encode(self):
2542  if self.value is None:
2543  self.value = 0
2544  self.l = 0
2545  return True
2546  self.value = swap_uint(self.l, self.value)
2547  return True
def swap_uint
Definition: cpu.py:1578
def miasm2.arch.x86.arch.bs_cond_disp.flen (   cls,
  mode,
  v 
)

Definition at line 2505 of file arch.py.

2506  def flen(cls, mode, v):
2507  if admode_prefix((mode, v['opmode'], v['admode'])) == 16:
2508  if v['mod'] == 0b00:
2509  if v['rm'] == 0b110:
2510  return 16
2511  else:
2512  return None
2513  elif v['mod'] == 0b01:
2514  return 8
2515  elif v['mod'] == 0b10:
2516  return 16
2517  return None
2518  # 32, 64
2519  if 'sib_base' in v and v['sib_base'] == 0b101:
2520  if v['mod'] == 0b00:
2521  return 32
2522  elif v['mod'] == 0b01:
2523  return 8
2524  elif v['mod'] == 0b10:
2525  return 32
2526  else:
2527  return None
2528 
2529  if v['mod'] == 0b00:
2530  if v['rm'] == 0b101:
2531  return 32
2532  else:
2533  return None
2534  elif v['mod'] == 0b01:
2535  return 8
2536  elif v['mod'] == 0b10:
2537  return 32
2538  else:
2539  return None

+ Here is the call graph for this function:

Member Data Documentation

miasm2.core.cpu.bsi.cls
inherited

Definition at line 465 of file cpu.py.

miasm2.arch.x86.arch.bs_cond_disp.expr

Definition at line 2554 of file arch.py.

miasm2.core.cpu.bsi.fbits
inherited

Definition at line 469 of file cpu.py.

miasm2.core.cpu.bsi.flen
inherited

Definition at line 471 of file cpu.py.

miasm2.core.cpu.bsi.fmask
inherited

Definition at line 470 of file cpu.py.

miasm2.core.cpu.bsi.fname
inherited

Definition at line 466 of file cpu.py.

miasm2.core.cpu.bsi.kargs
inherited

Definition at line 473 of file cpu.py.

miasm2.arch.x86.arch.bs_cond_disp.l

Definition at line 2543 of file arch.py.

miasm2.core.cpu.bsi.lmask
inherited

Definition at line 468 of file cpu.py.

miasm2.core.cpu.bsi.order
inherited

Definition at line 467 of file cpu.py.

miasm2.core.cpu.bsi.parent
inherited

Definition at line 462 of file cpu.py.

miasm2.core.cpu.bsi.strbits
inherited

Definition at line 463 of file cpu.py.

miasm2.arch.x86.arch.bs_cond_disp.value

Definition at line 2542 of file arch.py.


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