diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2015-03-25 06:50:09 +0100 |
|---|---|---|
| committer | serpilliere <serpilliere@users.noreply.github.com> | 2015-03-25 06:50:09 +0100 |
| commit | 31b70a4a6dc770bb21db97cdac27f7f1e54055d7 (patch) | |
| tree | cfa8cda5f11b96dacbe97949accac258d633537d | |
| parent | 9a51483f6debb6e9269e756800cdf9e1e50ad3d2 (diff) | |
| parent | 077698af51175bae73e5faf9d79b91d1cc12f92b (diff) | |
| download | miasm-31b70a4a6dc770bb21db97cdac27f7f1e54055d7.tar.gz miasm-31b70a4a6dc770bb21db97cdac27f7f1e54055d7.zip | |
Merge pull request #131 from mrphrazer/x86_semantics
added semantics for x86 pxor
| -rw-r--r-- | miasm2/arch/x86/sem.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index 94066519..8c3a351d 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -302,6 +302,16 @@ def xor(ir, instr, a, b): return e, [] +def pxor(ir, instr, a, b): + e = [] + if isinstance(a, m2_expr.ExprMem): + a = m2_expr.ExprMem(a.arg, b.size) + if isinstance(b, m2_expr.ExprMem): + b = m2_expr.ExprMem(b.arg, a.size) + c = a ^ b + e.append(m2_expr.ExprAff(a, c)) + return e, [] + def l_or(ir, instr, a, b): e = [] c = a | b @@ -3138,6 +3148,7 @@ mnemo_func = {'mov': mov, 'not': l_not, 'cmp': l_cmp, 'xor': xor, + 'pxor': pxor, 'or': l_or, 'and': l_and, 'test': l_test, |