summaryrefslogtreecommitdiff
path: root/src/monomorphise.ml
diff options
context:
space:
mode:
authorRobert Norton2018-04-18 11:50:34 +0100
committerRobert Norton2018-04-18 11:50:34 +0100
commit6241cb04b8500e52413ab5b84737247cbfe44d45 (patch)
tree9c0b0ef077b2be39b81a55c4741543be929b870d /src/monomorphise.ml
parenta7df7fd3b7e99067c9e9bb76cd1b28a42d38cb12 (diff)
parent1896c2d61b25563496e5e06413f03771c7d74b9d (diff)
Merge branch 'sail2' of github.com:rems-project/sail into sail2
Diffstat (limited to 'src/monomorphise.ml')
-rw-r--r--src/monomorphise.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/monomorphise.ml b/src/monomorphise.ml
index 78ccee24..f417d292 100644
--- a/src/monomorphise.ml
+++ b/src/monomorphise.ml
@@ -779,14 +779,14 @@ let bits_of_lit = function
let slice_lit (L_aux (lit,ll)) i len (Ord_aux (ord,_)) =
let i = Big_int.to_int i in
let len = Big_int.to_int len in
+ let bin = bits_of_lit lit in
match match ord with
| Ord_inc -> Some i
- | Ord_dec -> Some (len - i)
+ | Ord_dec -> Some (String.length bin - i - len)
| Ord_var _ -> None
with
| None -> None
| Some i ->
- let bin = bits_of_lit lit in
Some (L_aux (L_bin (String.sub bin i len),Generated ll))
let concat_vec lit1 lit2 =