Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] Runtime overflow and what to do
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] Runtime overflow and what to do
> BTW, i compile the sparc debian package on a sparc64 box which
> advertizes as a sparc box. Will i get access to the 64 bit integers in
> this case or not ?

The short answer is: it depends on the C compiler.  Caml integers
correspond to the C "long int" type, with one bit reserved for GC
purposes.  So, if the C compiler maps "long int" to 64-bit integers,
you get 63-bit Caml ints; if it chooses 32-bit integers for "long int",
you get 31-bit Caml ints.  Often, this can be controlled via flags to
the C compiler.

The above is for the bytecode interpreter.  For the native-code
compiler, the current Sparc code emitter mandates 32-bit integers.

- Xavier Leroy
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners