59 }
60
61 __ movptr(result, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
62
63
64 if (LockingMode == LM_LIGHTWEIGHT) {
65 // check if monitor
66 __ testptr(result, markWord::monitor_value);
67 __ jcc(Assembler::notZero, slowCase);
68 } else {
69 // check if locked
70 __ testptr(result, markWord::unlocked_value);
71 __ jcc(Assembler::zero, slowCase);
72 }
73
74 // get hash
75 #ifdef _LP64
76 // Read the header and build a mask to get its hash field.
77 // Depend on hash_mask being at most 32 bits and avoid the use of hash_mask_in_place
78 // because it could be larger than 32 bits in a 64-bit vm. See markWord.hpp.
79 __ shrptr(result, markWord::hash_shift);
80 __ andptr(result, markWord::hash_mask);
81 #else
82 __ andptr(result, markWord::hash_mask_in_place);
83 #endif //_LP64
84
85 // test if hashCode exists
86 __ jcc(Assembler::zero, slowCase);
87 #ifndef _LP64
88 __ shrptr(result, markWord::hash_shift);
89 #endif
90 __ ret(0);
91 __ bind(slowCase);
92 }
93 #endif //COMPILER1
94
95 #if defined(TARGET_COMPILER_gcc) && !defined(_WIN64)
96 JRT_LEAF(jfloat, SharedRuntime::frem(jfloat x, jfloat y))
97 jfloat retval;
98 asm ("\
99 1: \n\
100 fprem \n\
|
59 }
60
61 __ movptr(result, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
62
63
64 if (LockingMode == LM_LIGHTWEIGHT) {
65 // check if monitor
66 __ testptr(result, markWord::monitor_value);
67 __ jcc(Assembler::notZero, slowCase);
68 } else {
69 // check if locked
70 __ testptr(result, markWord::unlocked_value);
71 __ jcc(Assembler::zero, slowCase);
72 }
73
74 // get hash
75 #ifdef _LP64
76 // Read the header and build a mask to get its hash field.
77 // Depend on hash_mask being at most 32 bits and avoid the use of hash_mask_in_place
78 // because it could be larger than 32 bits in a 64-bit vm. See markWord.hpp.
79 if (UseCompactObjectHeaders) {
80 __ shrptr(result, markWord::hash_shift_compact);
81 __ andptr(result, markWord::hash_mask_compact);
82 } else {
83 __ shrptr(result, markWord::hash_shift);
84 __ andptr(result, markWord::hash_mask);
85 }
86 #else
87 __ andptr(result, markWord::hash_mask_in_place);
88 #endif //_LP64
89
90 // test if hashCode exists
91 __ jcc(Assembler::zero, slowCase);
92 #ifndef _LP64
93 __ shrptr(result, markWord::hash_shift);
94 #endif
95 __ ret(0);
96 __ bind(slowCase);
97 }
98 #endif //COMPILER1
99
100 #if defined(TARGET_COMPILER_gcc) && !defined(_WIN64)
101 JRT_LEAF(jfloat, SharedRuntime::frem(jfloat x, jfloat y))
102 jfloat retval;
103 asm ("\
104 1: \n\
105 fprem \n\
|