Exemple #1
0
CAMLprim value
uint40_of_int128(value v)
{
  CAMLparam1(v);
#ifdef HAVE_INT128
  CAMLreturn (copy_uint64(((uint64_t)Int128_val(v)) << 24));
#else
  failwith("unimplemented");
  CAMLreturn(Val_unit);
#endif
}
Exemple #2
0
CAMLprim value
nativeint_of_int128(value v)
{
  CAMLparam1(v);
#ifdef HAVE_INT128
  CAMLreturn (caml_copy_nativeint((int)Int128_val(v)));
#else
  failwith("unimplemented");
  CAMLreturn(Val_unit);
#endif
}
CAMLprim value
nativeint_of_int128(value v)
{
  CAMLparam1(v);
  CAMLreturn (caml_copy_nativeint((int)Int128_val(v)));
}
CAMLprim value
uint128_of_int128(value v)
{
  CAMLparam1(v);
  CAMLreturn (copy_uint128((__uint128_t)Int128_val(v)));
}
Exemple #5
0
CAMLprim value
float_of_int128(value v)
{
  CAMLparam1(v);
  CAMLreturn (caml_copy_double((double)Int128_val(v)));
}