Exemplo n.º 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
}
Exemplo n.º 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
}
Exemplo n.º 3
0
CAMLprim value
nativeint_of_int128(value v)
{
  CAMLparam1(v);
  CAMLreturn (caml_copy_nativeint((int)Int128_val(v)));
}
Exemplo n.º 4
0
CAMLprim value
uint128_of_int128(value v)
{
  CAMLparam1(v);
  CAMLreturn (copy_uint128((__uint128_t)Int128_val(v)));
}
Exemplo n.º 5
0
CAMLprim value
float_of_int128(value v)
{
  CAMLparam1(v);
  CAMLreturn (caml_copy_double((double)Int128_val(v)));
}