[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Lightning] Re: PATCH - Correct comparison of float branch test on i386
From: |
Paulo César Pereira de Andrade |
Subject: |
[Lightning] Re: PATCH - Correct comparison of float branch test on i386 |
Date: |
Thu, 19 Aug 2010 16:03:52 -0300 |
User-agent: |
SquirrelMail/1.4.19 |
Paolo Bonzini wrote:
> On 08/18/2010 09:15 PM, Paulo César Pereira de Andrade wrote:
>> Now, changing it to
>> #define FLOAT_BRANCH_WORKS 1
>> I get a problem in x86_64... The attached patch is somewhat simple
>> minded, and just a suggestion of possible way to correct the issue.
>> Since the macros UCOMISSrr and UCOMISDrr are called in other places,
>> and some of the float branch test macros have a longer body, I added
>> jit_fp_btest receiving only one argument.
>>
>> With this change, it now works correctly in x86_64 also, with either
>> approach to branch on float compare.
>>
>> Please review.
>
> Thanks, looks good, but I inlined jit_fp_btest inside every use instead.
>
> Paolo
I just git pull'ed lightning, but it still misses returning the
patch address.
In my testing tool:
$ ./lightning ldst.tst
ldst.tst:176: error: bad patch
(1 prepare 1 prepare_d 2 extr_f_d %f0 %f0 pusharg_d %f0 extr_f_d %f1 %f1
pu...)
that means that it got null/0 as the patch address. Actually, it should
be extended to check if the address returned is in bounds of
>= code_start and < code_end, or instead of < code_end, use
<= jit_get_label() (I will add this change to the testing tool).
Paulo