lightning
[Top][All Lists]
Advanced

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

Re: Some issues on 32-bit x86


From: Paul Cercueil
Subject: Re: Some issues on 32-bit x86
Date: Wed, 02 Aug 2023 13:58:21 +0200

Hi Paulo,

Le lundi 31 juillet 2023 à 14:24 -0300, Paulo César Pereira de Andrade
a écrit :
> Em dom., 30 de jul. de 2023 às 11:48, Paul Cercueil
> <paul@crapouillou.net> escreveu:
> > 
> > Hi Paulo,
> 
>   Hi Paul,
> 
> > I think there might still be one bug left related to register
> > lifetime
> > handling.
> > 
> > In the attached .tst, I generate one small piece of code without
> > function prolog/epilog. The JIT_V0 register contains a value that
> > is
> > set before this code is called, and the code is expected to update
> > the
> > value before it jumps to the next block of code.
> > 
> > This works fine everywhere but on 32-bit x86, where JIT_V0 (aka.
> > %ebx)
> > is used as a temporary for the second call to pushargi_i, as you
> > can
> > see in the attached result.txt. Lightning does seem to know that
> > it's
> > in use as %ebx is listed as "live" at every label, so I'm not sure
> > what's going on.
> 
>   This should hit only i686 in the pattern you are using. Please test
> with
> http://git.savannah.gnu.org/cgit/lightning.git/commit/?id=5dd07bef45a794f859a7d2f47d9433dbda652620
> that should fix the issue.
>   The problem could hit other patterns using temporaries, not
> exclusive
> to i686, and is now fixed.
>   The patch before it is not really required, it just corrects an
> inverted
> logic, but otherwise it is mostly a minor optimization.

I'm hitting a new issue on i686 still (maybe an unrelated one). See the
attached "newcode.txt".

The problem is that the caller-saved %ebx register is seen as dead
starting from the L4 label, without apparent reason. If you follow the
code flow it should remain live for the whole function.

This was generated with jit_print(), does it allow you to reproduce it?
Or is there a function I can use to generate something that can be used
directly with the check/lightning program?

Cheers,
-Paul

Attachment: newcode.txt
Description: Text document


reply via email to

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