src/share/vm/opto/mulnode.cpp

changeset 839
78c058bc5cdc
parent 631
d1605aabd0a1
child 993
3b5ac9e7e6ea
     1.1 --- a/src/share/vm/opto/mulnode.cpp	Fri Oct 10 09:47:56 2008 -0700
     1.2 +++ b/src/share/vm/opto/mulnode.cpp	Tue Oct 14 06:58:58 2008 -0700
     1.3 @@ -152,6 +152,14 @@
     1.4    if( t1 == Type::BOTTOM || t2 == Type::BOTTOM )
     1.5      return bottom_type();
     1.6  
     1.7 +#if defined(IA32)
     1.8 +  // Can't trust native compilers to properly fold strict double
     1.9 +  // multiplication with round-to-zero on this platform.
    1.10 +  if (op == Op_MulD && phase->C->method()->is_strict()) {
    1.11 +    return TypeD::DOUBLE;
    1.12 +  }
    1.13 +#endif
    1.14 +
    1.15    return mul_ring(t1,t2);            // Local flavor of type multiplication
    1.16  }
    1.17  
    1.18 @@ -360,7 +368,7 @@
    1.19  // Compute the product type of two double ranges into this node.
    1.20  const Type *MulDNode::mul_ring(const Type *t0, const Type *t1) const {
    1.21    if( t0 == Type::DOUBLE || t1 == Type::DOUBLE ) return Type::DOUBLE;
    1.22 -  // We must be adding 2 double constants.
    1.23 +  // We must be multiplying 2 double constants.
    1.24    return TypeD::make( t0->getd() * t1->getd() );
    1.25  }
    1.26  

mercurial