diff options
| author | Damien George <damien.p.george@gmail.com> | 2015-06-04 14:00:29 +0000 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2015-06-04 14:00:29 +0000 |
| commit | 567b349c2b271c0f04add0f1beb36495835f66f8 (patch) | |
| tree | eec69f15a26a3eef7a057c8075f23bb514362d5d /tests/micropython/viper_binop_arith.py | |
| parent | 4d9cad180dbaf25cdbb9dd0c54a637483db933a7 (diff) | |
py: Implement native multiply operation in viper emitter.
Diffstat (limited to 'tests/micropython/viper_binop_arith.py')
| -rw-r--r-- | tests/micropython/viper_binop_arith.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/micropython/viper_binop_arith.py b/tests/micropython/viper_binop_arith.py index d37450315..4d711f1a9 100644 --- a/tests/micropython/viper_binop_arith.py +++ b/tests/micropython/viper_binop_arith.py @@ -19,6 +19,17 @@ sub(-1, 2) sub(-42, -3) @micropython.viper +def mul(x:int, y:int): + print(x * y) + print(y * x) +mul(0, 1) +mul(1, -1) +mul(1, 2) +mul(8, 3) +mul(-3, 4) +mul(-9, -6) + +@micropython.viper def shl(x:int, y:int): print(x << y) shl(1, 0) |
