aboutsummaryrefslogtreecommitdiffstats
path: root/checklink/Bitstring_utils.ml
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2014-12-17 15:28:01 +0100
committerXavier Leroy <xavier.leroy@inria.fr>2014-12-17 15:28:01 +0100
commit4461db2bd92973b83bbd74c8f2eec16d702cffed (patch)
treeb02c8d646631662a5309238c13306a7d1f3e72db /checklink/Bitstring_utils.ml
parent20c70573181f81c99ea4e8797615dac8308a9b18 (diff)
parentc1daedb244d1f7586c12749642b0d78ae910e60a (diff)
downloadcompcert-4461db2bd92973b83bbd74c8f2eec16d702cffed.tar.gz
compcert-4461db2bd92973b83bbd74c8f2eec16d702cffed.zip
Merge branch 'master' into pure-makefiles
Diffstat (limited to 'checklink/Bitstring_utils.ml')
-rw-r--r--checklink/Bitstring_utils.ml8
1 files changed, 8 insertions, 0 deletions
diff --git a/checklink/Bitstring_utils.ml b/checklink/Bitstring_utils.ml
index 2253b63f..3218f898 100644
--- a/checklink/Bitstring_utils.ml
+++ b/checklink/Bitstring_utils.ml
@@ -9,6 +9,13 @@ type bitstring = Bitstring.bitstring
bitstring may be longer.
@param size number of bits to check
*)
+
+let is_zeros (bs: bitstring) (size: int): bool =
+ Bitstring.bitstring_length bs >= size
+ && Bitstring.is_zeroes_bitstring (Bitstring.subbitstring bs 0 size)
+
+(*
+
let rec is_zeros (bs: bitstring) (size: int): bool =
size = 0 ||
if size >= 64
@@ -23,3 +30,4 @@ let rec is_zeros (bs: bitstring) (size: int): bool =
| { 0L : size : int } -> true
| { _ } -> false
)
+*)