diff --git a/Makefile b/Makefile index 2930e8ee..3f7e2701 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,8 @@ TESTS = print sum-tail gcd sum fib ack even-odd \ adder funcomp cls-rec cls-bug cls-bug2 cls-reg-bug \ shuffle spill spill2 spill3 join-stack join-stack2 join-stack3 \ join-reg join-reg2 non-tail-if non-tail-if2 \ -inprod inprod-rec inprod-loop matmul matmul-flat +inprod inprod-rec inprod-loop matmul matmul-flat \ +manyargs do_test: $(TESTS:%=test/%.cmp) diff --git a/test/PowerPC/manyargs.ml b/test/PowerPC/manyargs.ml new file mode 100644 index 00000000..4e134a82 --- /dev/null +++ b/test/PowerPC/manyargs.ml @@ -0,0 +1,5 @@ +(* thanks to https://twitter.com/gan13027830/status/791239623959687168 *) +(* exactly one more arguments than registers; does not copmile *) +let x = 42 in +let rec f y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 y17 y18 y19 y20 y21 y22 y23 y24 y25 = print_int (x + y1 + y2 + y3 + y4 + y5 + y6 + y7 + y8 + y9 + y10 + y11 + y12 + y13 + y14 + y15 + y16 + y17 + y18 + y19 + y20 + y21 + y22 + y23 + y24 + y25) in +f 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 diff --git a/test/PowerPC/toomanyargs.ml b/test/PowerPC/toomanyargs.ml new file mode 100644 index 00000000..5180a4f7 --- /dev/null +++ b/test/PowerPC/toomanyargs.ml @@ -0,0 +1,5 @@ +(* thanks to https://twitter.com/gan13027830/status/791239623959687168 *) +(* exactly one more arguments than registers; does not copmile *) +let x = 42 in +let rec f y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 y17 y18 y19 y20 y21 y22 y23 y24 y25 y26 = print_int x in +f 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 diff --git a/test/SPARC/manyargs.ml b/test/SPARC/manyargs.ml new file mode 100644 index 00000000..20b30ad9 --- /dev/null +++ b/test/SPARC/manyargs.ml @@ -0,0 +1,5 @@ +(* thanks to https://twitter.com/gan13027830/status/791239623959687168 *) +(* exactly one more arguments than registers; does not copmile *) +let x = 42 in +let rec f y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 = print_int (x + y1 + y2 + y3 + y4 + y5 + y6 + y7 + y8 + y9 + y10 + y11 + y12 + y13 + y14 + y15 + y16) in +f 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 diff --git a/test/SPARC/toomanyargs.ml b/test/SPARC/toomanyargs.ml new file mode 100644 index 00000000..7d920dd9 --- /dev/null +++ b/test/SPARC/toomanyargs.ml @@ -0,0 +1,5 @@ +(* thanks to https://twitter.com/gan13027830/status/791239623959687168 *) +(* exactly one more arguments than registers; does not copmile *) +let x = 42 in +let rec f y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 y17 = print_int x in +f 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 diff --git a/test/x86/manyargs.ml b/test/x86/manyargs.ml new file mode 100644 index 00000000..e8f50e19 --- /dev/null +++ b/test/x86/manyargs.ml @@ -0,0 +1,5 @@ +(* thanks to https://twitter.com/gan13027830/status/791239623959687168 *) +(* exactly one more arguments than registers; does not copmile *) +let x = 42 in +let rec f y1 y2 y3 y4 y5 = print_int (x + y1 + y2 + y3 + y4 + y5) in +f 1 2 3 4 5 diff --git a/test/manyargs.ml b/test/x86/toomanyargs.ml similarity index 78% rename from test/manyargs.ml rename to test/x86/toomanyargs.ml index 6314c294..77f3bfc0 100644 --- a/test/manyargs.ml +++ b/test/x86/toomanyargs.ml @@ -1,5 +1,5 @@ (* thanks to https://twitter.com/gan13027830/status/791239623959687168 *) (* exactly one more arguments than registers; does not copmile *) let x = 42 in -let rec f a b c d e f = print_int x in +let rec f y1 y2 y3 y4 y5 y6 = print_int x in f 1 2 3 4 5 6 diff --git a/to_ppc b/to_ppc index 38f92d09..227a352d 100755 --- a/to_ppc +++ b/to_ppc @@ -1,6 +1,6 @@ #!/usr/bin/env bash ln -sf PowerPC/{*.ml{,i},libmincaml.S} . -cd shootout; ln -sf PowerPC/Makefile . -cd ../bytemark; ln -sf PowerPC/Makefile . -cd ../min-rt; ln -sf PowerPC/globals.s . -cd .. +cd test; ln -sf PowerPC/{,too}manyargs.ml .; cd .. +cd shootout; ln -sf PowerPC/Makefile .; cd .. +cd bytemark; ln -sf PowerPC/Makefile .; cd .. +cd min-rt; ln -sf PowerPC/globals.s .; cd .. diff --git a/to_sparc b/to_sparc index 3ae336bd..4519ee4e 100755 --- a/to_sparc +++ b/to_sparc @@ -1,6 +1,6 @@ #!/usr/bin/env bash ln -sf SPARC/{*.ml{,i},libmincaml.S} . -cd shootout; ln -sf SPARC/Makefile . -cd ../bytemark; ln -sf SPARC/Makefile . -cd ../min-rt; ln -sf SPARC/globals.s . -cd .. +cd test; ln -sf SPARC/{,too}manyargs.ml .; cd .. +cd shootout; ln -sf SPARC/Makefile .; cd .. +cd bytemark; ln -sf SPARC/Makefile .; cd .. +cd min-rt; ln -sf SPARC/globals.s .; cd .. diff --git a/to_x86 b/to_x86 index bbbce030..cc989e49 100755 --- a/to_x86 +++ b/to_x86 @@ -1,6 +1,6 @@ #!/usr/bin/env bash ln -sf x86/{*.ml{,i},libmincaml.S} . -cd shootout; ln -sf x86/Makefile . -cd ../bytemark; ln -sf x86/Makefile . -cd ../min-rt; ln -sf x86/globals.s . -cd .. +cd test; ln -sf x86/{,too}manyargs.ml .; cd .. +cd shootout; ln -sf x86/Makefile .; cd .. +cd bytemark; ln -sf x86/Makefile .; cd .. +cd min-rt; ln -sf x86/globals.s .; cd ..