about summary refs log tree commit diff stats
path: root/test/expression/simplifications.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2020-06-25 13:41:24 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2020-06-25 13:41:24 +0200
commitce175bb51b8d391ea0da2ef1396b79b495b8cdf5 (patch)
tree6fa89ff7a6e0df5df12e8b7801e9cfbbf01b2aed /test/expression/simplifications.py
parentb54727ab6a8c2764fd2f2e42cb3020f41c4cb772 (diff)
downloadmiasm-ce175bb51b8d391ea0da2ef1396b79b495b8cdf5.tar.gz
miasm-ce175bb51b8d391ea0da2ef1396b79b495b8cdf5.zip
Add cond CC flag simplification
Diffstat (limited to 'test/expression/simplifications.py')
-rw-r--r--test/expression/simplifications.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/expression/simplifications.py b/test/expression/simplifications.py
index 1f243425..c75dc0d3 100644
--- a/test/expression/simplifications.py
+++ b/test/expression/simplifications.py
@@ -784,6 +784,31 @@ to_test = [
         ExprOp(TOK_EQUAL, a, i0)
     ),
 
+
+    (
+        ExprCond(
+            ExprOp("CC_U<", a[0:1]),
+            b, c
+        ),
+        ExprCond(
+            a[0:1],
+            b, c
+        ),
+    ),
+
+    (
+        ExprCond(
+            ExprOp("CC_U>=", a[0:1]),
+            b, c
+        ),
+        ExprCond(
+            a[0:1],
+            c, b
+        ),
+    ),
+
+
+
 ]
 
 for e_input, e_check in to_test: