From 8725f182391c8b3e7b9288e9e0c1b32bf2ef1585 Mon Sep 17 00:00:00 2001 From: xleroy Date: Fri, 2 Mar 2007 15:41:39 +0000 Subject: Mettre les 2 demi-espaces dans 2 blocs separes git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@180 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- test/cminor/stopcopy.cmp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'test/cminor') diff --git a/test/cminor/stopcopy.cmp b/test/cminor/stopcopy.cmp index 366620d..9ac39be 100644 --- a/test/cminor/stopcopy.cmp +++ b/test/cminor/stopcopy.cmp @@ -171,15 +171,16 @@ extern "malloc" : int -> int "init_heap"(hsize) : int -> int { - var hbase; - - hbase = "malloc"(hsize * 2) : int -> int; - if (hbase == 0) return -1; - int32["fromspace_start_ptr"] = hbase; - int32["fromspace_end_ptr"] = hbase + hsize; - int32["tospace_start_ptr"] = hbase + hsize; - int32["tospace_end_ptr"] = hbase + hsize * 2; - int32["alloc_ptr"] = hbase; + var from, to; + + from = "malloc"(hsize) : int -> int; + to = "malloc"(hsize) : int -> int; + if (from == 0 || to == 0) return -1; + int32["fromspace_start_ptr"] = from; + int32["fromspace_end_ptr"] = from + hsize; + int32["tospace_start_ptr"] = to; + int32["tospace_end_ptr"] = to + hsize; + int32["alloc_ptr"] = from; return 0; } -- cgit v1.2.3