From c0bc3bd736a3442d6fecaf54bd09139f3801551f Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 14 Dec 2014 03:24:17 +0200 Subject: asmarm: Fix bug with encoding small negative ints using MVN instruction. --- tests/micropython/viper_binop_comp_imm.py | 9 +++++++++ tests/micropython/viper_binop_comp_imm.py.exp | 4 ++++ 2 files changed, 13 insertions(+) create mode 100644 tests/micropython/viper_binop_comp_imm.py create mode 100644 tests/micropython/viper_binop_comp_imm.py.exp (limited to 'tests/micropython') diff --git a/tests/micropython/viper_binop_comp_imm.py b/tests/micropython/viper_binop_comp_imm.py new file mode 100644 index 000000000..c7c040895 --- /dev/null +++ b/tests/micropython/viper_binop_comp_imm.py @@ -0,0 +1,9 @@ +# comparisons with immediate boundary values +@micropython.viper +def f(a: int): + print(a == -1, a == -255, a == -256, a == -257) + +f(-1) +f(-255) +f(-256) +f(-257) diff --git a/tests/micropython/viper_binop_comp_imm.py.exp b/tests/micropython/viper_binop_comp_imm.py.exp new file mode 100644 index 000000000..3da9d09fb --- /dev/null +++ b/tests/micropython/viper_binop_comp_imm.py.exp @@ -0,0 +1,4 @@ +True False False False +False True False False +False False True False +False False False True -- cgit v1.2.3