review (S) for 6717150

Chuck Rasbold Chuck.Rasbold at Sun.COM
Mon Oct 13 13:22:44 PDT 2008

C2 is relying on the native compiler semantics to accurately
do constant folding.  This is a pretty safe bet for integers,
but the it gets risky when the x86 FP stack is used, specifically
when strictfp is called for.

Our VMs on 64-bit aren't compiled to make use of the FP stack, so we 
don't see the problem there.

A better implementation would have a library of routines to do
the constant folding according to strictfp standards.  An ideal
implementation might use the interpreter as that library.  I think
Maxine does that.

-- Chuck

On 10/13/08 12:37, Vladimir Kozlov wrote:
> Chuck,
> Why it is not a problem in 64-bits VM?
> Otherwise looks good.
> Thanks,
> Vladimir
> Chuck Rasbold wrote:
>> 6717150: improper constant folding of subnormal strictfp 
>> multiplications and divides
>> Summary: suppress constant folding of double divides and 
>> multiplications on ia32
>> Reviewed-by:
>> This workaround fix is already in HS13, needs to be brought forward
>> into HS14.  We should do a more elegant fix in the future.

More information about the hotspot-compiler-dev mailing list