diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2007-03-02 15:41:39 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2007-03-02 15:41:39 +0000 |
commit | 8725f182391c8b3e7b9288e9e0c1b32bf2ef1585 (patch) | |
tree | a2cdd196ace36a61473f7d440a024f2dde403512 | |
parent | a5ea703d90b6337c0aa7501ba39f346e8f12c093 (diff) | |
download | compcert-8725f182391c8b3e7b9288e9e0c1b32bf2ef1585.tar.gz compcert-8725f182391c8b3e7b9288e9e0c1b32bf2ef1585.zip |
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
-rw-r--r-- | test/cminor/stopcopy.cmp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/test/cminor/stopcopy.cmp b/test/cminor/stopcopy.cmp index 366620d6..9ac39be8 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; } |