about summary refs log tree commit diff stats
path: root/miasm2/arch/arm/sem.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--miasm2/arch/arm/sem.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/miasm2/arch/arm/sem.py b/miasm2/arch/arm/sem.py
index d40c86eb..e23e2da8 100644
--- a/miasm2/arch/arm/sem.py
+++ b/miasm2/arch/arm/sem.py
@@ -802,25 +802,26 @@ cond_dct = {
 
 
 tab_cond = {COND_EQ: zf,
-            COND_NE: ExprOp('==', zf, ExprInt1(0)),
+            COND_NE: ExprCond(zf, ExprInt1(0), ExprInt1(1)),
             COND_CS: cf,
-            COND_CC: ExprOp('==', cf, ExprInt1(0)),
+            COND_CC: ExprCond(cf, ExprInt1(0), ExprInt1(1)),
             COND_MI: nf,
-            COND_PL: ExprOp('==', nf, ExprInt1(0)),
+            COND_PL: ExprCond(nf, ExprInt1(0), ExprInt1(1)),
             COND_VS: of,
-            COND_VC: ExprOp('==', of, ExprInt1(0)),
-            COND_HI: cf & ExprOp('==', zf, ExprInt1(0)),
+            COND_VC: ExprCond(of, ExprInt1(0), ExprInt1(1)),
+            COND_HI: cf & ExprCond(zf, ExprInt1(0), ExprInt1(1)),
             # COND_HI: cf,
             # COND_HI: ExprOp('==',
             #                ExprOp('|', cf, zf),
             #                ExprInt1(0)),
-            COND_LS: ExprOp('==', cf, ExprInt1(0)) | zf,
-            COND_GE: ExprOp('==', nf, of),
+            COND_LS: ExprCond(cf, ExprInt1(0), ExprInt1(1)) | zf,
+            COND_GE: ExprCond(nf - of, ExprInt1(0), ExprInt1(1)),
             COND_LT: nf ^ of,
             # COND_GT: ExprOp('|',
             #                ExprOp('==', zf, ExprInt1(0)) & (nf | of),
             # ExprOp('==', nf, ExprInt1(0)) & ExprOp('==', of, ExprInt1(0))),
-            COND_GT: ExprOp('==', zf, ExprInt1(0)) & ExprOp('==', nf, of),
+            COND_GT: (ExprCond(zf, ExprInt1(0), ExprInt1(1)) &
+                      ExprCond(nf - of, ExprInt1(0), ExprInt1(1))),
             COND_LE: zf | (nf ^ of),
             }