lightning
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lightning] x86_64 and jit_addxi_l


From: Paulo César Pereira de Andrade
Subject: Re: [Lightning] x86_64 and jit_addxi_l
Date: Fri, 7 Jan 2011 13:00:30 -0200

2011/1/6 Denis Washington <address@hidden>:
> Hi,
>
> I tried to compile GNU Smalltalk with JIT compilation enabled on Linux
> x86_64 and after some fiddling [1] got it almost to compile. However, one
> problem remains:

  Do you have an easy procedure to reproduce the build using system
lightning? Or some patch to add some configure option?

  I did some some work in lightning for my own language (I do not code
in smalltalk, just some basic knowledge of squeak :-), and would
be interesting to know if it works, but I can do any patches required,
to make it work with http://github.com/pcpa/lightning

>  xlat.c:1714:8: warning: implicit declaration of function 'jit_mulr_l_'
> xlat.c:1714:8: warning: implicit declaration of function 'jit_addci_l'
>  xlat.c:1715:8: warning: implicit declaration of function 'jit_addxi_l'
>
> and as a consequence:
>
>  libgst/.libs/libgst.so: undefined reference to `jit_addxi_l'
>  libgst/.libs/libgst.so: undefined reference to `jit_addci_l'
>  libgst/.libs/libgst.so: undefined reference to `jit_mulr_l_'

  Most of these are known to be broken in upstream lightning,
this was one of the reasons I started the git-hub fork. For
jit_add{x,c}i_l, you should get it to work by using an extra
register, using jit_movi_l, and then using jit_add{x,c}r_l.
The code does not properly handle 64 bit literals; I think
it did only handle correctly signed 32 bit positive values
for x86_64. If I recall correctly, multiplication was broken
because it had registers reversed in the rex prefix.

> I investigated the situation concerning `jit_addxi_l' and the only
> definition I found was in core-common.h, and then only as an alias for
> jit_addxi_l for the case that int has the same size as long (which is not
> the case on Linux x86_64, naturally). So my feeling is that there must be a
> definition of jit_addxi_l in Lightning's x86_64 port, but grep doesn't yield
> any such definition in lightning/i386/*.h. Was it forgotten? Is it not
> implemented yet? Or is this simply a problem on my part?

  The code in my lightning fork has a very exhaustive
regression testing, that tests and validates most possible
register combinations and operations, but it still may have
bugs on paths not tested, so, I would welcome any tests,
or hints to reproduce the procedure.

> Regards,
> Denis
>
> [1] I needed to ensure that the only the installed Lightning from git and
> not the one shipped with gst was used by renaming the lightning/ folder, but
> that is for a bug report in the GNU Smalltalk issue tracker.

Paulo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]