summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2009-01-11 12:07:11 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2009-01-11 12:07:11 +0000
commitf6ecbb948ccf7f8a4e156eb29e3a41e7f2953407 (patch)
treead958b2313ad00c2fdde49bd5f243f82d1e3ea58 /test
parentbb9d14a3f95fc0e3c8cad10d8ea8e2b2738da7fc (diff)
Elimination of "alloc" instruction in Caml files and test files.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@946 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test')
-rw-r--r--test/cminor/lists.cm6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/cminor/lists.cm b/test/cminor/lists.cm
index c445623..6007f3c 100644
--- a/test/cminor/lists.cm
+++ b/test/cminor/lists.cm
@@ -1,11 +1,13 @@
/* List manipulations */
+extern "malloc" : int -> int
+
"buildlist"(n): int -> int
{
var b;
if (n < 0) return 0;
- b = alloc 8;
+ b = "malloc"(8) : int -> int;
int32[b] = n;
int32[b+4] = "buildlist"(n - 1) : int -> int;
return b;
@@ -17,7 +19,7 @@
r = 0;
loop {
if (l == 0) return r;
- r2 = alloc 8;
+ r2 = "malloc"(8) : int -> int;
int32[r2] = int32[l];
int32[r2+4] = r;
r = r2;