Ejemplo n.º 1
0
CAMLprim value
uint40_of_uint128(value v)
{
  CAMLparam1(v);
#ifdef HAVE_UINT128
  CAMLreturn (copy_uint64(((uint64_t)Uint128_val(v)) << 24));
#else
  failwith("unimplemented");
  CAMLreturn(Val_unit);
#endif
}
Ejemplo n.º 2
0
CAMLprim value
nativeint_of_uint128(value v)
{
  CAMLparam1(v);
#ifdef HAVE_UINT128
  CAMLreturn (caml_copy_nativeint((int)Uint128_val(v)));
#else
  failwith("unimplemented");
  CAMLreturn(Val_unit);
#endif
}
Ejemplo n.º 3
0
CAMLprim value
int32_of_uint128(value v)
{
  CAMLparam1(v);
#ifdef HAVE_UINT128
  CAMLreturn (copy_int32((int32_t)Uint128_val(v)));
#else
  failwith("unimplemented");
  CAMLreturn(Val_unit);
#endif
}
Ejemplo n.º 4
0
CAMLprim value
nativeint_of_uint128(value v)
{
  CAMLparam1(v);
  CAMLreturn (caml_copy_nativeint((int)Uint128_val(v)));
}
Ejemplo n.º 5
0
CAMLprim value
float_of_uint128(value v)
{
  CAMLparam1(v);
  CAMLreturn (caml_copy_double((double)Uint128_val(v)));
}
Ejemplo n.º 6
0
CAMLprim value
int8_of_uint128(value v)
{
  CAMLparam1(v);
  CAMLreturn (copy_int8((int8_t)Uint128_val(v)));
}