mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
small change in shims generation
as @fardalem points out, better be conservative on archictures and have 64bits popcount be the special case
This commit is contained in:
parent
e0f2c78edd
commit
09298b3324
1 changed files with 3 additions and 3 deletions
|
|
@ -201,8 +201,8 @@ let popcount (b:int) : int =
|
|||
b land 0x7f
|
||||
"
|
||||
|
||||
let shims_int_32bit = "
|
||||
(* we use the simple version for 32 bits. *)
|
||||
let shims_int_non_64bit = "
|
||||
(* we use the simple version for non-64 bits. *)
|
||||
let popcount (b:int) : int =
|
||||
let rec loop count x =
|
||||
if x=0 then count
|
||||
|
|
@ -232,5 +232,5 @@ let () =
|
|||
write_file "CCShimsMkLet_.ml" (if (major, minor) >= (4,8) then shims_let_op_post_408 else shims_let_op_pre_408);
|
||||
write_file "CCShimsInt_.ml"
|
||||
((if (major, minor) >= (4,8) then shims_int_post_408 else shims_int_pre_408)
|
||||
^ if Sys.word_size=32 then shims_int_32bit else shims_int_64bit);
|
||||
^ if Sys.word_size=64 then shims_int_64bit else shims_int_non_64bit);
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue