about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2018-01-30 12:47:04 +0100
committerGitHub <noreply@github.com>2018-01-30 12:47:04 +0100
commitc07d153def937e501eaef50ec6ac79f302bc5f12 (patch)
treec59d9759665eea1690b382c85db86fd4185377bc
parentbbf3e9caf3d64a45b5305f04dd41d7935e110bf2 (diff)
parentd49055304583c8824741866317a3895d820f4308 (diff)
downloadmiasm-c07d153def937e501eaef50ec6ac79f302bc5f12.tar.gz
miasm-c07d153def937e501eaef50ec6ac79f302bc5f12.zip
Merge pull request #665 from GAJaloyan/arm
adding bics
Diffstat (limited to '')
-rw-r--r--miasm2/arch/aarch64/sem.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/miasm2/arch/aarch64/sem.py b/miasm2/arch/aarch64/sem.py
index ab45425c..a1c6b41d 100644
--- a/miasm2/arch/aarch64/sem.py
+++ b/miasm2/arch/aarch64/sem.py
@@ -73,6 +73,13 @@ def update_flag_sub_of(op1, op2, res):
     "Compote OF in @res = @op1 - @op2"
     return m2_expr.ExprAff(of, (((op1 ^ res) & (op1 ^ op2))).msb())
 
+
+# clearing cv flags for bics (see C5.6.25)
+
+def update_flag_bics ():
+    "Clear CF and OF"
+    return [ExprAff(cf, ExprInt (0,1)), ExprAff(of, ExprInt (0,1))]
+
 # z = x+y (+cf?)
 
 
@@ -189,6 +196,14 @@ def orn(arg1, arg2, arg3):
 @sbuild.parse
 def bic(arg1, arg2, arg3):
     arg1 = arg2 & (~extend_arg(arg2, arg3))
+    
+
+def bics(ir, instr, arg1, arg2, arg3):
+    e = []
+    arg1 = arg2 & (~extend_arg(arg2, arg3))
+    e += update_flag_logic (arg1)
+    e += update_flag_bics ()
+    return e, []
 
 
 @sbuild.parse
@@ -717,7 +732,9 @@ mnemo_func.update({
     'b.le': b_le,
     'b.ls': b_ls,
     'b.lt': b_lt,
-
+    
+    'bics': bics,
+    
     'ret': ret,
     'stp': stp,
     'ldp': ldp,