[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Dotgnu-libjit] A possible libjit bug
From: |
Aleksey Demakov |
Subject: |
Re: [Dotgnu-libjit] A possible libjit bug |
Date: |
Thu, 23 Jun 2011 03:43:02 +0700 |
Hi Simone,
Thanks for the bug report. Could you please provide the
details of your environment (cpu, os, gcc version) as in
my setup your test case worked fine.
Regards,
Aleksey
On Wed, Jun 8, 2011 at 11:31 PM, Simone Campanoni <address@hidden> wrote:
> Hi all,
> I attach the minimum C program I could find that shows a possible
> bug on Libjit.
> I am using the current git version of the library.
>
> The program store 0 to a variable called "shift_amount_var".
> It performs some operations that do not change the value of that
> variable and finally it returns "shift_amount_var".
> The result should be 0, but it is 1 instead.
>
> My guess is that the problem is on the register allocation of Libjit
> because the libjit intermediate seems correct to me.
> On the other hand, the assembly seems wrong because it uses a register
> for two variables: shift_amount_var and an intermediate result.
> The intermediate result is modified during the operations and therefore
> the return instruction (which uses the shared register) returns the
> modified value instead of shift_amount_var.
>
> I hope you will find useful the attached test.
>
> Thanks,
> Simone Campanoni
>
> _______________________________________________
> Dotgnu-libjit mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/dotgnu-libjit
>
>