From ddd36ddcf76176576e9c40324170adb37cadf25e Mon Sep 17 00:00:00 2001 From: Vikas Date: Wed, 27 Feb 2019 16:38:36 +0800 Subject: [PATCH] Added implementation for aarch64 negs instruction --- miasm2/arch/aarch64/sem.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/miasm2/arch/aarch64/sem.py b/miasm2/arch/aarch64/sem.py index 7052f4235..a26f12661 100644 --- a/miasm2/arch/aarch64/sem.py +++ b/miasm2/arch/aarch64/sem.py @@ -339,6 +339,16 @@ def cmp(ir, instr, arg1, arg2): return e, [] +def negs(ir, instr, arg1, arg2): + e = [] + arg2 = extend_arg(arg1, arg2) + + e += update_flag_arith_sub_zn(arg1, arg2) + e += update_flag_arith_sub_co(arg1, arg2) + + return e, [] + + def cmn(ir, instr, arg1, arg2): e = [] arg2 = extend_arg(arg1, arg2) @@ -1295,6 +1305,7 @@ def smull(arg1, arg2, arg3): 'tst': tst, 'subs': subs, 'cmp': cmp, + 'negs': negs, 'cmn': cmn, 'movk': movk, 'ccmp': ccmp,