RFR(S): 8063086: Math.pow yields different results upon repeated calls
roland.westrelin at oracle.com
Thu Jan 8 09:26:40 UTC 2015
When trying to push this through jprt I had an assert failure due to an unreachable address. Here is a new webrev:
with the following change:
@@ -3189,7 +3189,9 @@
static double two = 2.0;
- 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
> 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.
>> On 1/5/15 8:38 AM, Roland Westrelin wrote:
>>> 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.
More information about the hotspot-compiler-dev