File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ let of_int8 v =
1717 (* TODO: add a check on v to make sure it is not too big ? *)
1818 make (Z. of_int v) 8
1919
20+ let of_int16 v =
21+ (* TODO: add a check on v to make sure it is not too big ? *)
22+ make (Z. of_int v) 16
23+
2024let of_int32 v = make (Z. of_int32 v) 32
2125
2226let of_int64 v = make (Z. of_int64 v) 64
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ val make : Z.t -> int -> t
44
55val of_int8 : int -> t
66
7+ val of_int16 : int -> t
8+
79val of_int32 : Int32 .t -> t
810
911val of_int64 : Int64 .t -> t
Original file line number Diff line number Diff line change @@ -813,6 +813,9 @@ module Make (M_with_make : M_with_make) : S_with_fresh = struct
813813 | Ty_bitv 8 ->
814814 let i8 = M.Interp. to_bitv v 8 in
815815 Value. Bitv (Bitvector. of_int8 (Int64. to_int i8))
816+ | Ty_bitv 16 ->
817+ let i16 = M.Interp. to_bitv v 16 in
818+ Value. Bitv (Bitvector. of_int16 (Int64. to_int i16))
816819 | Ty_bitv 32 ->
817820 let i32 = M.Interp. to_bitv v 32 in
818821 Value. Bitv (Bitvector. of_int32 (Int64. to_int32 i32))
You can’t perform that action at this time.
0 commit comments