summaryrefslogtreecommitdiff
path: root/common/Values.v
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-12-20 13:05:53 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-12-20 13:05:53 +0000
commit7698300cfe2d3f944ce2e1d4a60a263620487718 (patch)
tree74292bb5f65bc797906b5c768df2e2e937e869b6 /common/Values.v
parentc511207bd0f25c4199770233175924a725526bd3 (diff)
Merge of branch value-analysis.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2381 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'common/Values.v')
-rw-r--r--common/Values.v6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/Values.v b/common/Values.v
index b9594fc..99a994b 100644
--- a/common/Values.v
+++ b/common/Values.v
@@ -655,6 +655,12 @@ Definition cmpl (c: comparison) (v1 v2: val): option val :=
Definition cmplu (c: comparison) (v1 v2: val): option val :=
option_map of_bool (cmplu_bool c v1 v2).
+Definition maskzero_bool (v: val) (mask: int): option bool :=
+ match v with
+ | Vint n => Some (Int.eq (Int.and n mask) Int.zero)
+ | _ => None
+ end.
+
End COMPARISONS.
(** [load_result] reflects the effect of storing a value with a given