Miasm2
 All Classes Namespaces Files Functions Variables Typedefs Properties Macros
Classes | Functions | Variables
miasm2.arch.mips32.sem Namespace Reference

Classes

class  ir_mips32b
 
class  ir_mips32l
 

Functions

def addiu
 
def lw
 
def sw
 
def jal
 
def jalr
 
def bal
 
def l_b
 
def lbu
 
def lhu
 
def lb
 
def beq
 
def bgez
 
def bne
 
def lui
 
def nop
 
def j
 
def l_or
 
def nor
 
def l_and
 
def ext
 
def mul
 
def sltu
 
def slt
 
def l_sub
 
def sb
 
def sh
 
def movn
 
def movz
 
def srl
 
def sra
 
def srav
 
def sll
 
def srlv
 
def sllv
 
def l_xor
 
def seb
 
def seh
 
def bltz
 
def blez
 
def bgtz
 
def wsbh
 
def rotr
 
def add_d
 
def sub_d
 
def div_d
 
def mul_d
 
def mov_d
 
def mfc0
 
def mfc1
 
def mtc0
 
def mtc1
 
def tlbwi
 
def tlbp
 
def ins
 
def lwc1
 
def swc1
 
def c_lt_d
 
def c_eq_d
 
def c_le_d
 
def bc1t
 
def bc1f
 
def cvt_d_w
 
def mult
 
def multu
 
def mfhi
 
def mflo
 
def di
 
def ei
 
def ehb
 
def get_mnemo_expr
 

Variables

dictionary ctx
 
tuple sbuild = SemBuilder(ctx)
 
 mnemo_func = sbuild.functions
 

Function Documentation

def miasm2.arch.mips32.sem.add_d (   arg1,
  arg2,
  arg3 
)

Definition at line 264 of file sem.py.

265 def add_d(arg1, arg2, arg3):
266  # XXX TODO check
267  arg1 = 'fadd'(arg2, arg3)
268 
@sbuild.parse
def miasm2.arch.mips32.sem.addiu (   arg1,
  arg2,
  arg3 
)
Adds a register @arg3 and a sign-extended immediate value @arg2 and
stores the result in a register @arg1

Definition at line 17 of file sem.py.

17 
18 def addiu(arg1, arg2, arg3):
19  """Adds a register @arg3 and a sign-extended immediate value @arg2 and
20  stores the result in a register @arg1"""
21  arg1 = arg2 + arg3
22 
@sbuild.parse
def miasm2.arch.mips32.sem.bal (   arg1)

Definition at line 48 of file sem.py.

48 
49 def bal(arg1):
50  PC = arg1
51  ir.IRDst = arg1
52  RA = ExprId(ir.get_next_break_label(instr))
53 
@sbuild.parse
def miasm2.arch.mips32.sem.bc1f (   arg1,
  arg2 
)

Definition at line 356 of file sem.py.

357 def bc1f(arg1, arg2):
358  dst_o = ExprId(ir.get_next_break_label(instr)) if arg1 else arg2
359  PC = dst_o
360  ir.IRDst = dst_o
361 
@sbuild.parse
def miasm2.arch.mips32.sem.bc1t (   arg1,
  arg2 
)

Definition at line 350 of file sem.py.

351 def bc1t(arg1, arg2):
352  dst_o = arg2 if arg1 else ExprId(ir.get_next_break_label(instr))
353  PC = dst_o
354  ir.IRDst = dst_o
355 
@sbuild.parse
def miasm2.arch.mips32.sem.beq (   arg1,
  arg2,
  arg3 
)

Definition at line 76 of file sem.py.

76 
77 def beq(arg1, arg2, arg3):
78  "Branches on @arg3 if the quantities of two registers @arg1, @arg2 are eq"
79  dst = ExprId(ir.get_next_break_label(instr)) if arg1 - arg2 else arg3
80  PC = dst
81  ir.IRDst = dst
82 
@sbuild.parse
def miasm2.arch.mips32.sem.bgez (   arg1,
  arg2 
)
Branches on @arg2 if the quantities of register @arg1 is greater than or
equal to zero

Definition at line 83 of file sem.py.

83 
84 def bgez(arg1, arg2):
85  """Branches on @arg2 if the quantities of register @arg1 is greater than or
86  equal to zero"""
87  dst = ExprId(ir.get_next_break_label(instr)) if arg1.msb() else arg2
88  PC = dst
89  ir.IRDst = dst
90 
@sbuild.parse
def miasm2.arch.mips32.sem.bgtz (   arg1,
  arg2 
)
Branches on @arg2 if the register @arg1 is greater than zero

Definition at line 245 of file sem.py.

246 def bgtz(arg1, arg2):
247  """Branches on @arg2 if the register @arg1 is greater than zero"""
248  cond = (i1(1) if arg1 else i1(0)) | arg1.msb()
249  dst_o = ExprId(ir.get_next_break_label(instr)) if cond else arg2
250  PC = dst_o
251  ir.IRDst = dst_o
252 
@sbuild.parse
def miasm2.arch.mips32.sem.blez (   arg1,
  arg2 
)
Branches on @arg2 if the register @arg1 is less than or equal to zero

Definition at line 237 of file sem.py.

238 def blez(arg1, arg2):
239  """Branches on @arg2 if the register @arg1 is less than or equal to zero"""
240  cond = (i1(1) if arg1 else i1(0)) | arg1.msb()
241  dst_o = arg2 if cond else ExprId(ir.get_next_break_label(instr))
242  PC = dst_o
243  ir.IRDst = dst_o
244 
@sbuild.parse
def miasm2.arch.mips32.sem.bltz (   arg1,
  arg2 
)
Branches on @arg2 if the register @arg1 is less than zero

Definition at line 230 of file sem.py.

231 def bltz(arg1, arg2):
232  """Branches on @arg2 if the register @arg1 is less than zero"""
233  dst_o = arg2 if arg1.msb() else ExprId(ir.get_next_break_label(instr))
234  PC = dst_o
235  ir.IRDst = dst_o
236 
@sbuild.parse
def miasm2.arch.mips32.sem.bne (   arg1,
  arg2,
  arg3 
)
Branches on @arg3 if the quantities of two registers @arg1, @arg2 are NOT
equal

Definition at line 91 of file sem.py.

91 
92 def bne(arg1, arg2, arg3):
93  """Branches on @arg3 if the quantities of two registers @arg1, @arg2 are NOT
94  equal"""
95  dst = arg3 if arg1 - arg2 else ExprId(ir.get_next_break_label(instr))
96  PC = dst
97  ir.IRDst = dst
98 
@sbuild.parse
def miasm2.arch.mips32.sem.c_eq_d (   arg1,
  arg2,
  arg3 
)

Definition at line 342 of file sem.py.

343 def c_eq_d(arg1, arg2, arg3):
344  arg1 = 'fcomp_eq'(arg2, arg3)
345 
@sbuild.parse
def miasm2.arch.mips32.sem.c_le_d (   arg1,
  arg2,
  arg3 
)

Definition at line 346 of file sem.py.

347 def c_le_d(arg1, arg2, arg3):
348  arg1 = 'fcomp_le'(arg2, arg3)
349 
@sbuild.parse
def miasm2.arch.mips32.sem.c_lt_d (   arg1,
  arg2,
  arg3 
)

Definition at line 338 of file sem.py.

339 def c_lt_d(arg1, arg2, arg3):
340  arg1 = 'fcomp_lt'(arg2, arg3)
341 
@sbuild.parse
def miasm2.arch.mips32.sem.cvt_d_w (   arg1,
  arg2 
)

Definition at line 362 of file sem.py.

363 def cvt_d_w(arg1, arg2):
364  # TODO XXX
365  arg1 = 'flt_d_w'(arg2)
366 
@sbuild.parse
def miasm2.arch.mips32.sem.di (   arg1)

Definition at line 393 of file sem.py.

394 def di(arg1):
395  "NOP"
396 
@sbuild.parse
def miasm2.arch.mips32.sem.div_d (   arg1,
  arg2,
  arg3 
)

Definition at line 274 of file sem.py.

275 def div_d(arg1, arg2, arg3):
276  # XXX TODO check
277  arg1 = 'fdiv'(arg2, arg3)
278 
@sbuild.parse
def miasm2.arch.mips32.sem.ehb (   arg1)

Definition at line 401 of file sem.py.

402 def ehb(arg1):
403  "NOP"
def miasm2.arch.mips32.sem.ei (   arg1)

Definition at line 397 of file sem.py.

398 def ei(arg1):
399  "NOP"
400 
@sbuild.parse
def miasm2.arch.mips32.sem.ext (   arg1,
  arg2,
  arg3,
  arg4 
)

Definition at line 133 of file sem.py.

134 def ext(arg1, arg2, arg3, arg4):
135  pos = int(arg3.arg)
136  size = int(arg4.arg)
137  arg1 = arg2[pos:pos + size].zeroExtend(32)
138 
@sbuild.parse
def miasm2.arch.mips32.sem.get_mnemo_expr (   ir,
  instr,
  args 
)

Definition at line 430 of file sem.py.

431 def get_mnemo_expr(ir, instr, *args):
432  instr, extra_ir = mnemo_func[instr.name.lower()](ir, instr, *args)
433  return instr, extra_ir

+ Here is the caller graph for this function:

def miasm2.arch.mips32.sem.ins (   ir,
  instr,
  a,
  b,
  c,
  d 
)

Definition at line 312 of file sem.py.

313 def ins(ir, instr, a, b, c, d):
314  e = []
315  pos = int(c.arg)
316  l = int(d.arg)
317 
318  my_slices = []
319  if pos != 0:
320  my_slices.append((a[:pos], 0, pos))
321  if l != 0:
322  my_slices.append((b[:l], pos, pos+l))
323  if pos + l != 32:
324  my_slices.append((a[pos+l:], pos+l, 32))
325  r = m2_expr.ExprCompose(my_slices)
326  e.append(m2_expr.ExprAff(a, r))
327  return e, []
328 
329 
@sbuild.parse
def miasm2.arch.mips32.sem.j (   arg1)
Jump to an address @arg1

Definition at line 109 of file sem.py.

110 def j(arg1):
111  """Jump to an address @arg1"""
112  PC = arg1
113  ir.IRDst = arg1
114 
@sbuild.parse

+ Here is the caller graph for this function:

def miasm2.arch.mips32.sem.jal (   arg1)

Definition at line 33 of file sem.py.

33 
34 def jal(arg1):
35  "Jumps to the calculated address @arg1 and stores the return address in $RA"
36  PC = arg1
37  ir.IRDst = arg1
38  RA = ExprId(ir.get_next_break_label(instr))
39 
@sbuild.parse
def miasm2.arch.mips32.sem.jalr (   arg1,
  arg2 
)
Jump to an address stored in a register @arg1, and store the return
address in another register @arg2

Definition at line 40 of file sem.py.

40 
41 def jalr(arg1, arg2):
42  """Jump to an address stored in a register @arg1, and store the return
43  address in another register @arg2"""
44  PC = arg1
45  ir.IRDst = arg1
46  arg2 = ExprId(ir.get_next_break_label(instr))
47 
@sbuild.parse
def miasm2.arch.mips32.sem.l_and (   arg1,
  arg2,
  arg3 
)
Bitwise logical ands two registers @arg2, @arg3 and stores the result in
a register @arg1

Definition at line 127 of file sem.py.

128 def l_and(arg1, arg2, arg3):
129  """Bitwise logical ands two registers @arg2, @arg3 and stores the result in
130  a register @arg1"""
131  arg1 = arg2 & arg3
132 
@sbuild.parse
def miasm2.arch.mips32.sem.l_b (   arg1)

Definition at line 54 of file sem.py.

54 
55 def l_b(arg1):
56  PC = arg1
57  ir.IRDst = arg1
58 
@sbuild.parse
def miasm2.arch.mips32.sem.l_or (   arg1,
  arg2,
  arg3 
)
Bitwise logical ors two registers @arg2, @arg3 and stores the result in a
register @arg1

Definition at line 115 of file sem.py.

116 def l_or(arg1, arg2, arg3):
117  """Bitwise logical ors two registers @arg2, @arg3 and stores the result in a
118  register @arg1"""
119  arg1 = arg2 | arg3
120 
@sbuild.parse
def miasm2.arch.mips32.sem.l_sub (   arg1,
  arg2,
  arg3 
)

Definition at line 156 of file sem.py.

157 def l_sub(arg1, arg2, arg3):
158  arg1 = arg2 - arg3
159 
@sbuild.parse
def miasm2.arch.mips32.sem.l_xor (   arg1,
  arg2,
  arg3 
)
Exclusive ors two registers @arg2, @arg3 and stores the result in a
register @arg3

Definition at line 216 of file sem.py.

217 def l_xor(arg1, arg2, arg3):
218  """Exclusive ors two registers @arg2, @arg3 and stores the result in a
219  register @arg3"""
220  arg1 = arg2 ^ arg3
221 
@sbuild.parse
def miasm2.arch.mips32.sem.lb (   arg1,
  arg2 
)

Definition at line 71 of file sem.py.

71 
72 def lb(arg1, arg2):
73  "A byte is loaded into a register @arg1 from the specified address @arg2."
74  arg1 = mem8[arg2.arg].signExtend(32)
75 
@sbuild.parse
def miasm2.arch.mips32.sem.lbu (   arg1,
  arg2 
)
A byte is loaded (unsigned extended) into a register @arg1 from the
specified address @arg2.

Definition at line 59 of file sem.py.

59 
60 def lbu(arg1, arg2):
61  """A byte is loaded (unsigned extended) into a register @arg1 from the
62  specified address @arg2."""
63  arg1 = mem8[arg2.arg].zeroExtend(32)
64 
@sbuild.parse
def miasm2.arch.mips32.sem.lhu (   arg1,
  arg2 
)
A word is loaded (unsigned extended) into a register @arg1 from the
specified address @arg2.

Definition at line 65 of file sem.py.

65 
66 def lhu(arg1, arg2):
67  """A word is loaded (unsigned extended) into a register @arg1 from the
68  specified address @arg2."""
69  arg1 = mem16[arg2.arg].zeroExtend(32)
70 
@sbuild.parse
def miasm2.arch.mips32.sem.lui (   arg1,
  arg2 
)
The immediate value @arg2 is shifted left 16 bits and stored in the
register @arg1. The lower 16 bits are zeroes.

Definition at line 99 of file sem.py.

99 
100 def lui(arg1, arg2):
101  """The immediate value @arg2 is shifted left 16 bits and stored in the
102  register @arg1. The lower 16 bits are zeroes."""
103  arg1 = ExprCompose([(i16(0), 0, 16), (arg2[:16], 16, 32)])
104 
@sbuild.parse
def miasm2.arch.mips32.sem.lw (   arg1,
  arg2 
)

Definition at line 23 of file sem.py.

23 
24 def lw(arg1, arg2):
25  "A word is loaded into a register @arg1 from the specified address @arg2."
26  arg1 = arg2
27 
@sbuild.parse
def miasm2.arch.mips32.sem.lwc1 (   arg1,
  arg2 
)

Definition at line 330 of file sem.py.

331 def lwc1(arg1, arg2):
332  arg1 = ('mem_%.2d_to_single' % arg2.size)(arg2)
333 
@sbuild.parse
def miasm2.arch.mips32.sem.mfc0 (   arg1,
  arg2 
)

Definition at line 289 of file sem.py.

290 def mfc0(arg1, arg2):
291  arg1 = arg2
292 
@sbuild.parse
def miasm2.arch.mips32.sem.mfc1 (   arg1,
  arg2 
)

Definition at line 293 of file sem.py.

294 def mfc1(arg1, arg2):
295  arg1 = arg2
296 
@sbuild.parse
def miasm2.arch.mips32.sem.mfhi (   arg1)

Definition at line 383 of file sem.py.

384 def mfhi(arg1):
385  "The contents of register $R_HI are moved to the specified register @arg1."
386  arg1 = R_HI
387 
@sbuild.parse
def miasm2.arch.mips32.sem.mflo (   arg1)

Definition at line 388 of file sem.py.

389 def mflo(arg1):
390  "The contents of register R_LO are moved to the specified register @arg1."
391  arg1 = R_LO
392 
@sbuild.parse
def miasm2.arch.mips32.sem.mov_d (   arg1,
  arg2 
)

Definition at line 284 of file sem.py.

285 def mov_d(arg1, arg2):
286  # XXX TODO check
287  arg1 = arg2
288 
@sbuild.parse
def miasm2.arch.mips32.sem.movn (   arg1,
  arg2,
  arg3 
)

Definition at line 170 of file sem.py.

171 def movn(arg1, arg2, arg3):
172  if arg3:
173  arg1 = arg2
174 
@sbuild.parse
def miasm2.arch.mips32.sem.movz (   arg1,
  arg2,
  arg3 
)

Definition at line 175 of file sem.py.

176 def movz(arg1, arg2, arg3):
177  if not arg3:
178  arg1 = arg2
179 
@sbuild.parse
def miasm2.arch.mips32.sem.mtc0 (   arg1,
  arg2 
)

Definition at line 297 of file sem.py.

298 def mtc0(arg1, arg2):
299  arg2 = arg1
300 
@sbuild.parse
def miasm2.arch.mips32.sem.mtc1 (   arg1,
  arg2 
)

Definition at line 301 of file sem.py.

302 def mtc1(arg1, arg2):
303  arg2 = arg1
304 
@sbuild.parse
def miasm2.arch.mips32.sem.mul (   arg1,
  arg2,
  arg3 
)
Multiplies @arg2 by $arg3 and stores the result in @arg1.

Definition at line 139 of file sem.py.

140 def mul(arg1, arg2, arg3):
141  """Multiplies @arg2 by $arg3 and stores the result in @arg1."""
142  arg1 = 'imul'(arg2, arg3)
143 
@sbuild.parse
def miasm2.arch.mips32.sem.mul_d (   arg1,
  arg2,
  arg3 
)

Definition at line 279 of file sem.py.

280 def mul_d(arg1, arg2, arg3):
281  # XXX TODO check
282  arg1 = 'fmul'(arg2, arg3)
283 
@sbuild.parse
def miasm2.arch.mips32.sem.mult (   arg1,
  arg2 
)
Multiplies (signed) @arg1 by @arg2 and stores the result in $R_HI:$R_LO

Definition at line 367 of file sem.py.

368 def mult(arg1, arg2):
369  """Multiplies (signed) @arg1 by @arg2 and stores the result in $R_HI:$R_LO"""
370  size = arg1.size
371  result = arg1.signExtend(size * 2) * arg2.signExtend(size * 2)
372  R_LO = result[:32]
373  R_HI = result[32:]
374 
@sbuild.parse
def miasm2.arch.mips32.sem.multu (   arg1,
  arg2 
)
Multiplies (unsigned) @arg1 by @arg2 and stores the result in $R_HI:$R_LO

Definition at line 375 of file sem.py.

376 def multu(arg1, arg2):
377  """Multiplies (unsigned) @arg1 by @arg2 and stores the result in $R_HI:$R_LO"""
378  size = arg1.size
379  result = arg1.zeroExtend(size * 2) * arg2.zeroExtend(size * 2)
380  R_LO = result[:32]
381  R_HI = result[32:]
382 
@sbuild.parse
def miasm2.arch.mips32.sem.nop ( )
Do nothing

Definition at line 105 of file sem.py.

106 def nop():
107  """Do nothing"""
108 
@sbuild.parse
def miasm2.arch.mips32.sem.nor (   arg1,
  arg2,
  arg3 
)
Bitwise logical Nors two registers @arg2, @arg3 and stores the result in
a register @arg1

Definition at line 121 of file sem.py.

122 def nor(arg1, arg2, arg3):
123  """Bitwise logical Nors two registers @arg2, @arg3 and stores the result in
124  a register @arg1"""
125  arg1 = (arg2 | arg3) ^ i32(-1)
126 
@sbuild.parse
def miasm2.arch.mips32.sem.rotr (   arg1,
  arg2,
  arg3 
)

Definition at line 260 of file sem.py.

261 def rotr(arg1, arg2, arg3):
262  arg1 = '>>>'(arg2, arg3)
263 
@sbuild.parse
def miasm2.arch.mips32.sem.sb (   arg1,
  arg2 
)
The least significant byte of @arg1 is stored at the specified address
@arg2.

Definition at line 160 of file sem.py.

161 def sb(arg1, arg2):
162  """The least significant byte of @arg1 is stored at the specified address
163  @arg2."""
164  mem8[arg2.arg] = arg1[:8]
165 
@sbuild.parse
def miasm2.arch.mips32.sem.seb (   arg1,
  arg2 
)

Definition at line 222 of file sem.py.

223 def seb(arg1, arg2):
224  arg1 = arg2[:8].signExtend(32)
225 
@sbuild.parse
def miasm2.arch.mips32.sem.seh (   arg1,
  arg2 
)

Definition at line 226 of file sem.py.

227 def seh(arg1, arg2):
228  arg1 = arg2[:16].signExtend(32)
229 
@sbuild.parse
def miasm2.arch.mips32.sem.sh (   arg1,
  arg2 
)

Definition at line 166 of file sem.py.

167 def sh(arg1, arg2):
168  mem16[arg2.arg] = arg1[:16]
169 
@sbuild.parse
def miasm2.arch.mips32.sem.sll (   arg1,
  arg2,
  arg3 
)

Definition at line 198 of file sem.py.

199 def sll(arg1, arg2, arg3):
200  arg1 = arg2 << arg3
201 
@sbuild.parse
def miasm2.arch.mips32.sem.sllv (   arg1,
  arg2,
  arg3 
)
Shifts a register value @arg2 left by the amount specified in @arg3 and
places the value in the destination register @arg1.
Zeroes are shifted in.

Definition at line 209 of file sem.py.

210 def sllv(arg1, arg2, arg3):
211  """Shifts a register value @arg2 left by the amount specified in @arg3 and
212  places the value in the destination register @arg1.
213  Zeroes are shifted in."""
214  arg1 = arg2 << (arg3 & i32(0x1F))
215 
@sbuild.parse
def miasm2.arch.mips32.sem.slt (   arg1,
  arg2,
  arg3 
)
If @arg3 is less than @arg2 (signed), @arg1 is set to one. It gets zero
otherwise.

Definition at line 150 of file sem.py.

151 def slt(arg1, arg2, arg3):
152  """If @arg3 is less than @arg2 (signed), @arg1 is set to one. It gets zero
153  otherwise."""
154  arg1 = ((arg2 - arg3) ^ ((arg2 ^ arg3) & ((arg2 - arg3) ^ arg2))).msb().zeroExtend(32)
155 
@sbuild.parse
def miasm2.arch.mips32.sem.sltu (   arg1,
  arg2,
  arg3 
)
If @arg3 is less than @arg2 (unsigned), @arg1 is set to one. It gets zero
otherwise.

Definition at line 144 of file sem.py.

145 def sltu(arg1, arg2, arg3):
146  """If @arg3 is less than @arg2 (unsigned), @arg1 is set to one. It gets zero
147  otherwise."""
148  arg1 = (((arg2 - arg3) ^ ((arg2 ^ arg3) & ((arg2 - arg3) ^ arg2))) ^ arg2 ^ arg3).msb().zeroExtend(32)
149 
@sbuild.parse
def miasm2.arch.mips32.sem.sra (   arg1,
  arg2,
  arg3 
)
Shifts arg1 register value @arg2 right by the shift amount @arg3 and
places the value in the destination register @arg1. The sign bit is shifted
in.

Definition at line 187 of file sem.py.

188 def sra(arg1, arg2, arg3):
189  """Shifts arg1 register value @arg2 right by the shift amount @arg3 and
190  places the value in the destination register @arg1. The sign bit is shifted
191  in."""
192  arg1 = 'a>>'(arg2, arg3)
193 
@sbuild.parse
def miasm2.arch.mips32.sem.srav (   arg1,
  arg2,
  arg3 
)

Definition at line 194 of file sem.py.

195 def srav(arg1, arg2, arg3):
196  arg1 = 'a>>'(arg2, arg3 & i32(0x1F))
197 
@sbuild.parse
def miasm2.arch.mips32.sem.srl (   arg1,
  arg2,
  arg3 
)
Shifts arg1 register value @arg2 right by the shift amount @arg3 and
places the value in the destination register @arg1.
Zeroes are shifted in.

Definition at line 180 of file sem.py.

181 def srl(arg1, arg2, arg3):
182  """Shifts arg1 register value @arg2 right by the shift amount @arg3 and
183  places the value in the destination register @arg1.
184  Zeroes are shifted in."""
185  arg1 = arg2 >> arg3
186 
@sbuild.parse
def miasm2.arch.mips32.sem.srlv (   arg1,
  arg2,
  arg3 
)
Shifts a register value @arg2 right by the amount specified in @arg3 and
places the value in the destination register @arg1.
Zeroes are shifted in.

Definition at line 202 of file sem.py.

203 def srlv(arg1, arg2, arg3):
204  """Shifts a register value @arg2 right by the amount specified in @arg3 and
205  places the value in the destination register @arg1.
206  Zeroes are shifted in."""
207  arg1 = arg2 >> (arg3 & i32(0x1F))
208 
@sbuild.parse
def miasm2.arch.mips32.sem.sub_d (   arg1,
  arg2,
  arg3 
)

Definition at line 269 of file sem.py.

270 def sub_d(arg1, arg2, arg3):
271  # XXX TODO check
272  arg1 = 'fsub'(arg2, arg3)
273 
@sbuild.parse
def miasm2.arch.mips32.sem.sw (   arg1,
  arg2 
)

Definition at line 28 of file sem.py.

28 
29 def sw(arg1, arg2):
30  "The contents of @arg2 is stored at the specified address @arg1."
31  arg2 = arg1
32 
@sbuild.parse
def miasm2.arch.mips32.sem.swc1 (   arg1,
  arg2 
)

Definition at line 334 of file sem.py.

335 def swc1(arg1, arg2):
336  arg2 = ('single_to_mem_%.2d' % arg1.size)(arg1)
337 
@sbuild.parse
def miasm2.arch.mips32.sem.tlbp ( )

Definition at line 309 of file sem.py.

310 def tlbp():
311  "TODO XXX"
def miasm2.arch.mips32.sem.tlbwi ( )

Definition at line 305 of file sem.py.

306 def tlbwi():
307  "TODO XXX"
308 
@sbuild.parse
def miasm2.arch.mips32.sem.wsbh (   arg1,
  arg2 
)

Definition at line 253 of file sem.py.

254 def wsbh(arg1, arg2):
255  arg1 = ExprCompose([(arg2[8:16], 0, 8),
256  (arg2[0:8] , 8, 16),
257  (arg2[24:32], 16, 24),
258  (arg2[16:24], 24, 32)])
259 
@sbuild.parse

Variable Documentation

dictionary miasm2.arch.mips32.sem.ctx
Initial value:
1 = {"R_LO": R_LO,
2  "R_HI": R_HI,
3  "PC": PC,
4  "RA": RA}

Definition at line 9 of file sem.py.

miasm2.arch.mips32.sem.mnemo_func = sbuild.functions

Definition at line 404 of file sem.py.

tuple miasm2.arch.mips32.sem.sbuild = SemBuilder(ctx)

Definition at line 13 of file sem.py.