< prev index next >

src/hotspot/cpu/x86/sharedRuntime_x86.cpp

Print this page

 51     Label Continue;
 52     // return 0 for null reference input
 53     __ cmpptr(obj_reg, NULL_WORD);
 54     __ jcc(Assembler::notEqual, Continue);
 55     __ xorptr(result, result);
 56     __ ret(0);
 57     __ bind(Continue);
 58   }
 59 
 60   __ movptr(result, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
 61 
 62   // check if locked
 63   __ testptr(result, markWord::unlocked_value);
 64   __ jcc(Assembler::zero, slowCase);
 65 
 66   // get hash
 67 #ifdef _LP64
 68   // Read the header and build a mask to get its hash field.
 69   // Depend on hash_mask being at most 32 bits and avoid the use of hash_mask_in_place
 70   // because it could be larger than 32 bits in a 64-bit vm. See markWord.hpp.
 71   __ shrptr(result, markWord::hash_shift);
 72   __ andptr(result, markWord::hash_mask);





 73 #else
 74   __ andptr(result, markWord::hash_mask_in_place);
 75 #endif //_LP64
 76 
 77   // test if hashCode exists
 78   __ jcc(Assembler::zero, slowCase);
 79 #ifndef _LP64
 80   __ shrptr(result, markWord::hash_shift);
 81 #endif
 82   __ ret(0);
 83   __ bind(slowCase);
 84 }
 85 #endif //COMPILER1
 86 
 87 JRT_LEAF(jfloat, SharedRuntime::frem(jfloat x, jfloat y))
 88   assert(StubRoutines::fmod() != nullptr, "");
 89   jdouble (*addr)(jdouble, jdouble) = (double (*)(double, double))StubRoutines::fmod();
 90   jdouble dx = (jdouble) x;
 91   jdouble dy = (jdouble) y;
 92 

 51     Label Continue;
 52     // return 0 for null reference input
 53     __ cmpptr(obj_reg, NULL_WORD);
 54     __ jcc(Assembler::notEqual, Continue);
 55     __ xorptr(result, result);
 56     __ ret(0);
 57     __ bind(Continue);
 58   }
 59 
 60   __ movptr(result, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
 61 
 62   // check if locked
 63   __ testptr(result, markWord::unlocked_value);
 64   __ jcc(Assembler::zero, slowCase);
 65 
 66   // get hash
 67 #ifdef _LP64
 68   // Read the header and build a mask to get its hash field.
 69   // Depend on hash_mask being at most 32 bits and avoid the use of hash_mask_in_place
 70   // because it could be larger than 32 bits in a 64-bit vm. See markWord.hpp.
 71   if (UseCompactObjectHeaders) {
 72     __ shrptr(result, markWord::hash_shift_compact);
 73     __ andptr(result, markWord::hash_mask_compact);
 74   } else {
 75     __ shrptr(result, markWord::hash_shift);
 76     __ andptr(result, markWord::hash_mask);
 77   }
 78 #else
 79   __ andptr(result, markWord::hash_mask_in_place);
 80 #endif //_LP64
 81 
 82   // test if hashCode exists
 83   __ jcc(Assembler::zero, slowCase);
 84 #ifndef _LP64
 85   __ shrptr(result, markWord::hash_shift);
 86 #endif
 87   __ ret(0);
 88   __ bind(slowCase);
 89 }
 90 #endif //COMPILER1
 91 
 92 JRT_LEAF(jfloat, SharedRuntime::frem(jfloat x, jfloat y))
 93   assert(StubRoutines::fmod() != nullptr, "");
 94   jdouble (*addr)(jdouble, jdouble) = (double (*)(double, double))StubRoutines::fmod();
 95   jdouble dx = (jdouble) x;
 96   jdouble dy = (jdouble) y;
 97 
< prev index next >