diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-12-20 13:05:53 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-12-20 13:05:53 +0000 |
commit | 7698300cfe2d3f944ce2e1d4a60a263620487718 (patch) | |
tree | 74292bb5f65bc797906b5c768df2e2e937e869b6 /common/Values.v | |
parent | c511207bd0f25c4199770233175924a725526bd3 (diff) | |
download | compcert-7698300cfe2d3f944ce2e1d4a60a263620487718.tar.gz compcert-7698300cfe2d3f944ce2e1d4a60a263620487718.zip |
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.v | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/Values.v b/common/Values.v index b9594fc9..99a994b9 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 |