diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-10-20 13:32:18 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-10-20 13:32:18 +0200 |
commit | 4d542bc7eafadb16b845cf05d1eb4988eb55ed0f (patch) | |
tree | 1961b41815fc6e392cc0bd2beeb0fb504bc160ce /cparser/Ceval.ml | |
parent | 7a6bb90048db7a254e959b1e3c308bac5fe6c418 (diff) | |
download | compcert-kvx-4d542bc7eafadb16b845cf05d1eb4988eb55ed0f.tar.gz compcert-kvx-4d542bc7eafadb16b845cf05d1eb4988eb55ed0f.zip |
Updated PR by removing whitespaces. Bug 17450.
Diffstat (limited to 'cparser/Ceval.ml')
-rw-r--r-- | cparser/Ceval.ml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cparser/Ceval.ml b/cparser/Ceval.ml index ba7cdabc..74b535d4 100644 --- a/cparser/Ceval.ml +++ b/cparser/Ceval.ml @@ -124,7 +124,7 @@ let comparison env direction ptraction tyop ty1 v1 ty2 v2 = (* tyop = type at which the comparison is done *) let b = match cast env tyop ty1 v1, cast env tyop ty2 v2 with - | I n1, I n2 -> + | I n1, I n2 -> if is_signed env tyop then direction (compare n1 n2) 0 else direction (int64_unsigned_compare n1 n2) 0 (* including pointers *) @@ -162,7 +162,7 @@ let binop env op tyop tyres ty1 v1 ty2 v2 = end | Odiv -> begin match cast env tyop ty1 v1, cast env tyop ty2 v2 with - | I n1, I n2 -> + | I n1, I n2 -> if n2 = 0L then raise Notconst else if is_signed env tyop then I (Int64.div n1 n2) else I (int64_unsigned_div n1 n2) @@ -170,7 +170,7 @@ let binop env op tyop tyres ty1 v1 ty2 v2 = end | Omod -> begin match v1, v2 with - | I n1, I n2 -> + | I n1, I n2 -> if n2 = 0L then raise Notconst else if is_signed env tyop then I (Int64.rem n1 n2) else I (int64_unsigned_mod n1 n2) @@ -220,11 +220,11 @@ let binop env op tyop tyres ty1 v1 ty2 v2 = | Ocomma -> v2 | Ologand -> - if boolean_value v1 + if boolean_value v1 then if boolean_value v2 then I 1L else I 0L else I 0L | Ologor -> - if boolean_value v1 + if boolean_value v1 then I 1L else if boolean_value v2 then I 1L else I 0L | _ -> raise Notconst |