aboutsummaryrefslogtreecommitdiffstats
path: root/checklink/Bitstring_utils.ml
diff options
context:
space:
mode:
authorJacques-Henri Jourdan <jacques-henri.jourdan@inria.fr>2015-11-04 03:04:21 +0100
committerJacques-Henri Jourdan <jacques-henri.jourdan@inria.fr>2015-11-04 03:04:21 +0100
commit5664fddcab15ef4482d583673c75e07bd1e96d0a (patch)
tree878b22860e69405ba5cf6fd2798731dac8ce660c /checklink/Bitstring_utils.ml
parentb960c83725d7e185ac5c6e3c0d6043c7dcd2f556 (diff)
parentfe73ed58ef80da7c53c124302a608948fb190229 (diff)
downloadcompcert-5664fddcab15ef4482d583673c75e07bd1e96d0a.tar.gz
compcert-5664fddcab15ef4482d583673c75e07bd1e96d0a.zip
Merge remote-tracking branch 'origin/master' into parser_fix
Diffstat (limited to 'checklink/Bitstring_utils.ml')
-rw-r--r--checklink/Bitstring_utils.ml33
1 files changed, 0 insertions, 33 deletions
diff --git a/checklink/Bitstring_utils.ml b/checklink/Bitstring_utils.ml
deleted file mode 100644
index 3218f898..00000000
--- a/checklink/Bitstring_utils.ml
+++ /dev/null
@@ -1,33 +0,0 @@
-(** Note that a bitstring is a triple (string * int * int), where the string
- contains the contents (the last char is filled up with zeros if necessary),
- the firts int gives the first bit to consider, and the second int gives the
- bit length of the considered bitstring.
-*)
-type bitstring = Bitstring.bitstring
-
-(** Checks whether a given number of bits of a bitstring are zeroed. The
- 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
- then (
- bitmatch bs with
- | { 0L : 64 : int ; rest : -1 : bitstring } ->
- is_zeros rest (size - 64)
- | { _ } -> false
- )
- else (
- bitmatch bs with
- | { 0L : size : int } -> true
- | { _ } -> false
- )
-*)