diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-10-06 15:46:47 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-10-06 15:46:47 +0000 |
commit | f7693b3d897b90fd3bc2533be002dc0bdcd9f6c2 (patch) | |
tree | 93ea9491693324d2d690c4236a2c88c3b461e225 /test/cminor | |
parent | 261ef24f7fd2ef443f73c468b9b1fa496371f3bf (diff) |
Merge of branch seq-and-or. See Changelog for details.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2059 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test/cminor')
-rw-r--r-- | test/cminor/almabench.cmp | 12 | ||||
-rw-r--r-- | test/cminor/qsort.cm | 6 | ||||
-rw-r--r-- | test/cminor/stopcopy.cmp | 3 |
3 files changed, 13 insertions, 8 deletions
diff --git a/test/cminor/almabench.cmp b/test/cminor/almabench.cmp index bafcb5d..caedf8b 100644 --- a/test/cminor/almabench.cmp +++ b/test/cminor/almabench.cmp @@ -46,10 +46,12 @@ extern "fmod": float -> float -> float "anpm"(a): float -> float { - var w; + var w, t; w = fmod(a,TWOPI); - if (absf(w) >=f PI) - w = w -f ((a <f 0.0) ? -f TWOPI : TWOPI); + if (absf(w) >=f PI) { + if (a <f 0.0) { t = -f TWOPI; } else { t = TWOPI; } + w = w -f t; + } return w; } @@ -109,8 +111,8 @@ extern "fmod": float -> float -> float ae = ae +f dae; k = k + 1; - if ((k >= 10) || (absf(dae) <f 1e-12)) - exit; + if (k >= 10) exit; + if (absf(dae) <f 1e-12) exit; } }} ae2 = ae /f 2.0; diff --git a/test/cminor/qsort.cm b/test/cminor/qsort.cm index 004f8cd..8c73584 100644 --- a/test/cminor/qsort.cm +++ b/test/cminor/qsort.cm @@ -9,11 +9,13 @@ {{ loop { if (! (i < j)) exit; {{ loop { - if (i >= hi || int32[a + i * 4] > pivot) exit; + if (i >= hi) exit; + if (int32[a + i * 4] > pivot) exit; i = i + 1; } }} {{ loop { - if (j <= lo || int32[a + j * 4] < pivot) exit; + if (j <= lo) exit; + if (int32[a + j * 4] < pivot) exit; j = j - 1; } }} if (i < j) { diff --git a/test/cminor/stopcopy.cmp b/test/cminor/stopcopy.cmp index 9ac39be..eb2b3e1 100644 --- a/test/cminor/stopcopy.cmp +++ b/test/cminor/stopcopy.cmp @@ -174,8 +174,9 @@ extern "malloc" : int -> int var from, to; from = "malloc"(hsize) : int -> int; + if (from == 0) return -1; to = "malloc"(hsize) : int -> int; - if (from == 0 || to == 0) return -1; + if (to == 0) return -1; int32["fromspace_start_ptr"] = from; int32["fromspace_end_ptr"] = from + hsize; int32["tospace_start_ptr"] = to; |