1234567891011121314151617181920212223242526272829303132333435363738# 1 "uint63/uint63_31.ml"(************************************************************************)(* * The Coq Proof Assistant / The Coq Development Team *)(* v * Copyright INRIA, CNRS and contributors *)(* <O___,, * (see version control and CREDITS file for authors & dates) *)(* \VV/ **************************************************************)(* // * This file is distributed under the terms of the *)(* * GNU Lesser General Public License Version 2.1 *)(* * (see CIL/LICENSE.coq file for the text of the license) *)(************************************************************************)(* Invariant: the msb should be 0 *)typet=Int64.tlet_=assert(Sys.word_size=32)letmaxuint63=0x7FFF_FFFF_FFFF_FFFFLletmask63i=Int64.logandimaxuint63letof_inti=mask63(Int64.of_inti)letto_int2i=(Int64.to_int(Int64.shift_right_logicali31),Int64.to_inti)lethashi=let(h,l)=to_int2iinh*65599+lletequal(x:t)y=x=yletcomparesxy=Int64.(compare(shift_leftx1)(shift_lefty1))letto_string=Int64.to_stringletaddxy=mask63(Int64.addxy)letlexy=Int64.comparexy<=0