Miasm2
 All Classes Namespaces Files Functions Variables Typedefs Properties Macros
Classes | Functions | Variables
miasm2.expression.modint Namespace Reference

Classes

class  modint
 
class  moduint
 

Functions

def is_modint
 
def size2mask
 
def define_common_int
 

Variables

dictionary mod_size2uint = {}
 
dictionary mod_size2int = {}
 
dictionary mod_uint2size = {}
 
dictionary mod_int2size = {}
 

Function Documentation

def miasm2.expression.modint.define_common_int ( )

Definition at line 202 of file modint.py.

203 def define_common_int():
204  "Define common int: ExprInt1, ExprInt2, .."
205  global mod_size2int, mod_int2size, mod_size2uint, mod_uint2size
206 
207  common_int = xrange(1, 257)
208 
209  for i in common_int:
210  name = 'uint%d' % i
211  c = type(name, (moduint,), {"size": i, "limit": 1 << i})
212  globals()[name] = c
213  mod_size2uint[i] = c
214  mod_uint2size[c] = i
215 
216  for i in common_int:
217  name = 'int%d' % i
218  c = type(name, (modint,), {"size": i, "limit": 1 << i})
219  globals()[name] = c
220  mod_size2int[i] = c
221  mod_int2size[c] = i
222 
def miasm2.expression.modint.is_modint (   a)

Definition at line 188 of file modint.py.

189 def is_modint(a):
190  return isinstance(a, moduint)
191 

+ Here is the caller graph for this function:

def miasm2.expression.modint.size2mask (   size)

Definition at line 192 of file modint.py.

193 def size2mask(size):
194  return (1 << size) - 1

+ Here is the caller graph for this function:

Variable Documentation

dictionary miasm2.expression.modint.mod_int2size = {}

Definition at line 199 of file modint.py.

dictionary miasm2.expression.modint.mod_size2int = {}

Definition at line 196 of file modint.py.

dictionary miasm2.expression.modint.mod_size2uint = {}

Definition at line 195 of file modint.py.

dictionary miasm2.expression.modint.mod_uint2size = {}

Definition at line 198 of file modint.py.