dotgnu-libjit
[Top][All Lists]
Advanced

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

Re: [Dotgnu-libjit] A possible libjit bug


From: Simone Campanoni
Subject: Re: [Dotgnu-libjit] A possible libjit bug
Date: Tue, 05 Jul 2011 09:55:10 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Thunderbird/3.1.10

Thanks Aleksey for your fix.
I have tested your patch on a regression test that includes more than
2000 benchmarks and it effectively works :)

Thanks again,
Simone

On 07/01/2011 04:14 PM, Aleksey Demakov wrote:
> Hi Simone,
>
> The attached patch should fix the problem.
>
> I only tested it with your testcase and libjit "make check"
> though. I gather you have a big test suite, so please check
> if the patch stands against it.
>
> Regards,
> Aleksey
>
>
> On Thu, Jun 23, 2011 at 7:37 PM, Simone Campanoni <address@hidden> wrote:
>> Hi Aleksey,
>>    you right, I forgot to write the details of my environment.
>> The CPU is Intel i7 with Ubuntu 11.04.
>> Libjit has been compiled for a 32 bits machine (with the "-m32" flag of
>> gcc).
>> To compile Libjit I have used gcc 4.5.2 coming from the Ubuntu distribution.
>>
>> I attach the Libjit intermediate representation dumped with
>> jit_dump_function and the correspondent assembly instructions.
>>
>> Thanks,
>> Simone
>>
>> On 06/22/2011 04:43 PM, Aleksey Demakov wrote:
>>> 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
>>>>
>>>>



reply via email to

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