src/hotspot/share/opto/mulnode.cpp
changeset 47765 b7c7428eaab9
parent 47216 71c04702a3d5
child 51050 96ea37459ca7
equal deleted inserted replaced
47764:029d5efaaa6c 47765:b7c7428eaab9
   233 const Type *MulINode::mul_ring(const Type *t0, const Type *t1) const {
   233 const Type *MulINode::mul_ring(const Type *t0, const Type *t1) const {
   234   const TypeInt *r0 = t0->is_int(); // Handy access
   234   const TypeInt *r0 = t0->is_int(); // Handy access
   235   const TypeInt *r1 = t1->is_int();
   235   const TypeInt *r1 = t1->is_int();
   236 
   236 
   237   // Fetch endpoints of all ranges
   237   // Fetch endpoints of all ranges
   238   int32_t lo0 = r0->_lo;
   238   jint lo0 = r0->_lo;
   239   double a = (double)lo0;
   239   double a = (double)lo0;
   240   int32_t hi0 = r0->_hi;
   240   jint hi0 = r0->_hi;
   241   double b = (double)hi0;
   241   double b = (double)hi0;
   242   int32_t lo1 = r1->_lo;
   242   jint lo1 = r1->_lo;
   243   double c = (double)lo1;
   243   double c = (double)lo1;
   244   int32_t hi1 = r1->_hi;
   244   jint hi1 = r1->_hi;
   245   double d = (double)hi1;
   245   double d = (double)hi1;
   246 
   246 
   247   // Compute all endpoints & check for overflow
   247   // Compute all endpoints & check for overflow
   248   int32_t A = java_multiply(lo0, lo1);
   248   int32_t A = java_multiply(lo0, lo1);
   249   if( (double)A != a*c ) return TypeInt::INT; // Overflow?
   249   if( (double)A != a*c ) return TypeInt::INT; // Overflow?