summaryrefslogtreecommitdiff
path: root/js/src/lirasm/tests/mulov_xyz.in
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/lirasm/tests/mulov_xyz.in')
-rw-r--r--js/src/lirasm/tests/mulov_xyz.in13
1 files changed, 13 insertions, 0 deletions
diff --git a/js/src/lirasm/tests/mulov_xyz.in b/js/src/lirasm/tests/mulov_xyz.in
new file mode 100644
index 0000000..4967440
--- /dev/null
+++ b/js/src/lirasm/tests/mulov_xyz.in
@@ -0,0 +1,13 @@
+; 1073741824 * 2 >= 2^31, and will overflow.
+big = immi 1073741824
+two = immi 2
+
+res = mulxovi big two ; overflow, so we exit here
+
+; Ensure that 'big' and 'two' get their own registers and
+; aren't shared with 'res'. Also store 'res' so it isn't dead.
+m = allocp 12
+sti big m 0
+sti two m 4
+sti res m 8
+x ; we don't exit here