[Ecls-list] ECL on LLP64 machines

Gabriel Dos Reis gdr at integrable-solutions.net
Wed Aug 11 14:39:16 UTC 2010

On Wed, Aug 11, 2010 at 3:41 AM, Juan Jose Garcia-Ripoll
<juanjose.garciaripoll at googlemail.com> wrote:
> Hi Gabriel,
> ECL just needs an integer type that fits a pointer. That type is used
> for defining cl_fixnum / cl_index, and in various places you will find
> conversions to and from cl_object. In the LLP model, which I did not
> know of until now  (*), both "int" and "long" are 32-bit and pointers
> are 64-bits,


>  which means they can not be used to implement cl_fixnum /
> cl_integer.

Thanks.  I knew for cl_fixnum by going through src/aclocal.m4 and
src/h/config.h.in, but I failed to notice that cl_integer has the same
issue.  Thanks!

>  If you find time, ECL's autoconf may be fixed to add that
> additional type to the list of candidates for cl_fixnum / cl_integer.

I did try last night to get ECL use intptr_t, when available, for cl_fixnum.
That discovered some overflow arithmetics in the C code.  I was too tired
to investigate it.  I'm on vacation with my family and I am supposed to
be away from computing devices, so I will do that when everybody is

> Juanjo
> (*) From a lot of code out there I gave for granted that "long" must
> be long enough to fit a pointer, which is why ECL's autoconf just uses
> "int" and "long" as candidates for cl_fixnum.  This is probably a too
> old assumption, but I fail to see the utility of the LLP model given
> that :-/

I wondered the same.  My speculative conclusion was that maybe
that is needed for having LP32 binaries run on LLP64 without change.

-- Gaby

More information about the ecl-devel mailing list