diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2014-09-11 16:48:14 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2014-09-11 16:48:14 +0200 |
| commit | ce0ed3f17ae3eeb9023e3c95a7589356c316c2cf (patch) | |
| tree | 1da694b70bca46ac70d7d837c6362e3b81ce9ba0 | |
| parent | cf9fedd09e8eaa0624f749d1a4437c3db2d0e444 (diff) | |
| download | miasm-ce0ed3f17ae3eeb9023e3c95a7589356c316c2cf.tar.gz miasm-ce0ed3f17ae3eeb9023e3c95a7589356c316c2cf.zip | |
mips: add multu
| -rw-r--r-- | miasm2/arch/mips32/sem.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/miasm2/arch/mips32/sem.py b/miasm2/arch/mips32/sem.py index b513a481..cc51d2af 100644 --- a/miasm2/arch/mips32/sem.py +++ b/miasm2/arch/mips32/sem.py @@ -394,6 +394,15 @@ def mult(ir, instr, a, b): e.append(ExprAff(R_HI, r[32:])) return e, [] +def multu(ir, instr, a, b): + e = [] + size = a.size + r = a.zeroExtend(size * 2) * b.zeroExtend(size * 2) + + e.append(ExprAff(R_LO, r[:32])) + e.append(ExprAff(R_HI, r[32:])) + return e, [] + def mfhi(ir, instr, a): e = [] e.append(ExprAff(a, R_HI)) @@ -476,6 +485,7 @@ mnemo_func = { "bc1f" : bc1f, "cvt.d.w":cvt_d_w, "mult" : mult, + "multu" : multu, "mfhi" : mfhi, "mflo" : mflo, |