diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2000-03-10 17:54:18 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2000-03-10 17:54:18 +0000 |
commit | 98af6cd8c3154eed234712cfa53ae015ee47ff3e (patch) | |
tree | bc44067fd803aec7ab72a3c85f9338fbe6d83fb0 /byterun/ints.c | |
parent | 484e2ce7784ec03eff8dd163b139f77993daefd0 (diff) |
Suite int64 non alignes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2942 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/ints.c')
-rw-r--r-- | byterun/ints.c | 17 |
1 files changed, 7 insertions, 10 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; } |