RFR: 8266950: Remove vestigial support for non-strict floating-point execution [v2]

David Holmes david.holmes at oracle.com
Sun May 23 00:02:41 UTC 2021


On 22/05/2021 11:51 pm, Vladimir Ivanov wrote:
> On Tue, 18 May 2021 04:26:00 GMT, David Holmes <dholmes at openjdk.org> wrote:
> 
>>> As part of JEP 306, the vestiges of HotSpot support for non-strict floating-point execution can be removed. All methods implicitly have strictfp semantics so the explicit checks for is_strict() can be replaced by true and the code reformulated accordingly.
>>>
>>> There are still some names that include "strict" that could potentially be renamed to remove it, but the fact we have to have strict fp semantics is still important on some platforms, so the names help reinforce that IMO.
>>>
>>> Testing: tiers 1-3
>>>
>>> Thanks,
>>> David
>>
>> David Holmes has updated the pull request incrementally with one additional commit since the last revision:
>>
>>    lir_div_strictfp and lir_mul_strictfp
> 
> Thanks, Jie.
> 
> I think there's `result->is_double_fpu()` check missing in `FpuStackAllocator::handle_op2`:
> 
>       case lir_mul:
>       case lir_div: {
>         assert(op2->tmp1_opr()->is_fpu_register(), "strict operations need temporary fpu stack slot");
>         insert_free_if_dead(op2->tmp1_opr());
>         assert(sim()->stack_size() <= 7, "at least one stack slot must be free");
>         // fall-through: continue with the normal handling of lir_mul and lir_div
>       }
> 
> The code should be guarded by `result->is_double_fpu()` since special handling (additional temp operand) is needed only for `mul`/`div` on doubles.

Where was that guard on the existing strict version?

This failure is suggesting to me that there may be a pre-existing bug in 
the strict/non-strict code on x86. I need to check exactly what cases 
the failing test is failing on so that I can see which code change is in 
play. I have a suspicion but can't check it yet.

> src/hotspot/share/c1/c1_GraphBuilder.cpp line 1126:
> 
>> 1124:   Value y = pop(type);
>> 1125:   Value x = pop(type);
>> 1126:   Value res = new ArithmeticOp(code, x, y,state_before);
> 
> Please, put a space before `state_before`.

Will do.

Thanks,
David

> -------------
> 
> PR: https://git.openjdk.java.net/jdk/pull/3991
> 


More information about the hotspot-runtime-dev mailing list