[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: Wed, 18 Aug 2010 16:15:16 -0300
User-agent: SquirrelMail/1.4.19

Paolo Bonzini wrote:
> 2010/8/18 Paolo Bonzini <address@hidden>:
>> 2010/8/18 Paulo César Pereira de Andrade <address@hidden>:
>>>  The macro arguments are always bytes, so, I believe the call to
>>> CMPLir must have been a typo.
>>>  This allows at least beqr_f (an alias to beqr_d) and beqr_d to
>>> work on i386 when compiled with -D_ASM_SAFETY.
>> Ok, thanks.
> Actually, it is better to change the operand to _EAX.  The
> AND before guarantees that the current code is correct,
> and there's probably a partial register stall if you use a cmpb.

  No problems.

> Paolo

  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.


Attachment: 0001-x86_64-return-patch-address-in-float-branch-test.patch
Description: Text Data

reply via email to

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