summaryrefslogtreecommitdiff
path: root/ocaml-binary-annot/testsuite/tests/asmcomp/tak.cmm
diff options
context:
space:
mode:
Diffstat (limited to 'ocaml-binary-annot/testsuite/tests/asmcomp/tak.cmm')
-rw-r--r--ocaml-binary-annot/testsuite/tests/asmcomp/tak.cmm23
1 files changed, 23 insertions, 0 deletions
diff --git a/ocaml-binary-annot/testsuite/tests/asmcomp/tak.cmm b/ocaml-binary-annot/testsuite/tests/asmcomp/tak.cmm
new file mode 100644
index 0000000000..de236fc8b8
--- /dev/null
+++ b/ocaml-binary-annot/testsuite/tests/asmcomp/tak.cmm
@@ -0,0 +1,23 @@
+(***********************************************************************)
+(* *)
+(* Objective Caml *)
+(* *)
+(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
+(* *)
+(* Copyright 1996 Institut National de Recherche en Informatique et *)
+(* en Automatique. All rights reserved. This file is distributed *)
+(* under the terms of the Q Public License version 1.0. *)
+(* *)
+(***********************************************************************)
+
+(* $Id: tak.cmm 3211 2000-06-25 19:54:50Z xleroy $ *)
+
+(function "tak" (x:int y:int z:int)
+ (if (> x y)
+ (app "tak" (app "tak" (- x 1) y z int)
+ (app "tak" (- y 1) z x int)
+ (app "tak" (- z 1) x y int) int)
+ z))
+
+(function "takmain" (dummy: int)
+ (app "tak" 18 12 6 int))