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.bs_st Class Reference
+ Inheritance diagram for miasm2.arch.x86.arch.bs_st:
+ Collaboration diagram for miasm2.arch.x86.arch.bs_st:

Public Member Functions

def decode
 
def encode
 
def fromstring
 

Public Attributes

 expr
 
 value
 

Static Public Attributes

 reg_info = r_st_all
 
int rindex = 0
 
 parser = reg_info.parser
 

Detailed Description

Definition at line 1267 of file arch.py.

Member Function Documentation

def miasm2.arch.x86.arch.bs_eax.decode (   self,
  v 
)
inherited

Definition at line 1212 of file arch.py.

1213  def decode(self, v):
1214  p = self.parent
1215  expr = None
1216  if hasattr(p, 'w8') and p.w8.value == 0:
1217  expr = regs08_expr[self.rindex]
1218  else:
1219  expr = size2gpregs[p.v_opmode()].expr[self.rindex]
1220  self.expr = expr
1221  return True
def miasm2.arch.x86.arch.bs_eax.encode (   self)
inherited

Definition at line 1222 of file arch.py.

1223  def encode(self):
1224  self.value = 0
1225  p = self.parent
1226  expr = self.expr
1227  osize = p.v_opmode()
1228  if hasattr(p, 'w8'):
1229  if p.w8.value is None:
1230  # XXX TODO: priority in w8 erase?
1231  if expr.size == 8:
1232  p.w8.value = 0
1233  else:
1234  p.w8.value = 1
1235  if hasattr(p, 'w8') and p.w8.value == 0:
1236  return expr == regs08_expr[self.rindex]
1237  elif p.mode in [16, 32]:
1238  return expr == size2gpregs[osize].expr[self.rindex]
1239  elif p.mode == 64:
1240  if expr == size2gpregs[64].expr[self.rindex]:
1241  p.rex_w.value = 1
1242  return True
1243  elif expr == size2gpregs[osize].expr[self.rindex]:
1244  return True
1245  return False
1246  return False
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.x86.arch.bs_eax.expr
inherited

Definition at line 1219 of file arch.py.

miasm2.arch.x86.arch.bs_st.parser = reg_info.parser
static

Definition at line 1270 of file arch.py.

miasm2.arch.x86.arch.bs_st.reg_info = r_st_all
static

Definition at line 1268 of file arch.py.

int miasm2.arch.x86.arch.bs_st.rindex = 0
static

Definition at line 1269 of file arch.py.

miasm2.arch.x86.arch.bs_eax.value
inherited

Definition at line 1223 of file arch.py.


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