From c488c7780ada00daa5b1ca8a27a585abfacd2905 Mon Sep 17 00:00:00 2001 From: Ajax Date: Fri, 13 Nov 2015 17:25:37 +0100 Subject: Simplifications: add cst_propagation for >>>/<<< c_rez --- test/expression/simplifications.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/expression/simplifications.py') diff --git a/test/expression/simplifications.py b/test/expression/simplifications.py index 60609df4..7b68c1bf 100644 --- a/test/expression/simplifications.py +++ b/test/expression/simplifications.py @@ -18,8 +18,10 @@ f = ExprId('f', size=64) m = ExprMem(a) s = a[:8] +i0 = ExprInt(uint32(0x0)) i1 = ExprInt(uint32(0x1)) i2 = ExprInt(uint32(0x2)) +icustom = ExprInt(uint32(0x12345678)) cc = ExprCond(a, b, c) o = ExprCompose([(a[:8], 8, 16), @@ -301,6 +303,18 @@ to_test = [(ExprInt32(1) - ExprInt32(1), ExprInt32(0)), (expr_cmps(ExprInt32(-10), ExprInt32(-5)), ExprInt1(0)), + (ExprOp("<<>>c_rez", icustom, i0, i0), + icustom), + (ExprOp(">>>c_rez", icustom, i1, i0), + ExprInt32(0x91A2B3C)), + (ExprOp(">>>c_rez", icustom, i1, i1), + ExprInt32(0x891A2B3C)), ] for e, e_check in to_test[:]: -- cgit 1.4.1