diff options
-rw-r--r-- | byterun/ints.c | 17 | ||||
-rw-r--r-- | byterun/mlvalues.h | 2 |
2 files changed, 7 insertions, 12 deletions
diff --git a/byterun/ints.c b/byterun/ints.c index 45cbfdc25..cc2b0153c 100644 --- a/byterun/ints.c +++ b/byterun/ints.c @@ -255,16 +255,6 @@ int64 Int64_val(value v) return buffer.j; } -void Store_int64_val(value v, int64 n) -{ - union { int32 i[2]; int64 j; } buffer; - buffer.j = n; - ((int32 *) Data_custom_val(v))[0] = buffer.i[0]; - ((int32 *) Data_custom_val(v))[1] = buffer.i[1]; -} - -#endif - #endif static int int64_compare(value v1, value v2) @@ -304,7 +294,14 @@ struct custom_operations int64_ops = { value copy_int64(int64 i) { value res = alloc_custom(&int64_ops, 8, 0, 1); +#ifndef ARCH_ALIGN_INT64 Int64_val(res) = i; +#else + union { int32 i[2]; int64 j; } buffer; + buffer.j = i; + ((int32 *) Data_custom_val(res))[0] = buffer.i[0]; + ((int32 *) Data_custom_val(res))[1] = buffer.i[1]; +#endif return res; } diff --git a/byterun/mlvalues.h b/byterun/mlvalues.h index 0bc493c61..cfa06d26d 100644 --- a/byterun/mlvalues.h +++ b/byterun/mlvalues.h @@ -227,10 +227,8 @@ struct custom_operations; /* defined in [custom.h] */ #define Nativeint_val(v) (*((long *) Data_custom_val(v))) #ifndef ARCH_ALIGN_INT64 #define Int64_val(v) (*((int64 *) Data_custom_val(v))) -#define Store_int64_val(v,i) (*((int64 *) Data_custom_val(v)) = (i)) #else extern int64 Int64_val(value v); -extern void Store_int64_val(value v, int64 i); #endif /* 3- Atoms are 0-tuples. They are statically allocated once and for all. */ |