dotgnu-libjit
[Top][All Lists]
Advanced

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

Re: [Dotgnu-libjit] Possible Libjit bug


From: Klaus Treichel
Subject: Re: [Dotgnu-libjit] Possible Libjit bug
Date: Thu, 30 Sep 2010 20:54:36 +0200

Hi Simone,

i think i know what the problem is.

The problematic value has been assigned to a global register.
In your libjittest_incorrect sample the value is used before a value was
assigned to the register (from the program order view and not the
program flow view).
So the in_global_register flag is still 0 even if it should be 1 at the
start of each block.

At the end of each block the values are spilled back to the global
registers anyways so this should be ok.

The change would be setting in_global_register = 1 where
has_global_register is set to 1 too (in _jit_regs_alloc_global).

Looks like this problem is not x86 specific.
 
@Aleksey: What do you think?

Cheers,
Klaus

Am Mittwoch, den 29.09.2010, 15:28 -0400 schrieb Simone Campanoni:
> Hi all,
>     I would like to show a possible bug of Libjit I have found in the
> attached examples.
> I am using Libjit from the git repository and the Intel x86 back-end.
> 
> The program libjittest_correct.c and libjittest_incorrect.c should have
> the same behavior and they should return zero as output.
> If you try to compile them, you will find an incorrect execution of
> libjittest_incorrect.c (it will return 1 instead of 0).
> 
> My guess is that the error is within the usage of global registers of
> x86 back-end.
> 
> I hope you will find this useful to improve the Libjit library.
> 
> Thanks for your work,
> Simone Campanoni
> _______________________________________________
> Dotgnu-libjit mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/dotgnu-libjit

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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