RFR(S): 8063086: Math.pow yields different results upon repeated calls
Roland Westrelin
roland.westrelin at oracle.com
Thu Jan 8 16:59:59 UTC 2015
Thanks for the re-review, Vladimir.
Roland.
> On Jan 8, 2015, at 5:58 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
>
> Okay.
>
> Thanks,
> Vladimir
>
> On 1/8/15 1:26 AM, Roland Westrelin wrote:
>> When trying to push this through jprt I had an assert failure due to an unreachable address. Here is a new webrev:
>>
>> http://cr.openjdk.java.net/~roland/8063086/webrev.01/
>>
>> with the following change:
>>
>> --- a/src/cpu/x86/vm/macroAssembler_x86.cpp
>> +++ b/src/cpu/x86/vm/macroAssembler_x86.cpp
>> @@ -3189,7 +3189,9 @@
>> static double two = 2.0;
>> ExternalAddress two_addr((address)&two);
>>
>> - fld_d(two_addr); // Stack: 2 X Y
>> + // constant maybe too far on 64 bit
>> + lea(tmp2, two_addr);
>> + fld_d(Address(tmp2, 0)); // Stack: 2 X Y
>> fcmp(tmp, 2, true, false); // Stack: X Y
>> jcc(Assembler::parity, y_not_2);
>> jcc(Assembler::notEqual, y_not_2);
>>
>> Roland.
>>
>>> On Jan 7, 2015, at 2:20 PM, Roland Westrelin <roland.westrelin at oracle.com> wrote:
>>>
>>>> Looks good. Make sure to run new test with -Xcomp and -XX:-TieredCompilation and Client VM.
>>>
>>> Thanks for the review. I checked the test runs fine in these cases.
>>>
>>> Roland.
>>>
>>>>
>>>> Thanks,
>>>> Vladimir
>>>>
>>>> On 1/5/15 8:38 AM, Roland Westrelin wrote:
>>>>> http://cr.openjdk.java.net/~roland/8063086/webrev.00/
>>>>>
>>>>> With 8029302, C2 computes x^2 as x*x. The interpreter and C1 code don’t have the special case code and as a result an application can see different result for the same computation whether it’s executed by the interpreter/c1 or c2. Fixed by adding the special case to the interpreter and C1.
>>>>>
>>>>> Roland.
>>>>>
>>>
>>
More information about the hotspot-compiler-dev
mailing list