56 __ bind(Continue);
57 }
58
59 __ movptr(result, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
60
61 // check if locked
62 __ testptr(result, markWord::unlocked_value);
63 __ jcc(Assembler::zero, slowCase);
64
65 if (UseBiasedLocking) {
66 // Check if biased and fall through to runtime if so
67 __ testptr(result, markWord::biased_lock_bit_in_place);
68 __ jcc(Assembler::notZero, slowCase);
69 }
70
71 // get hash
72 #ifdef _LP64
73 // Read the header and build a mask to get its hash field.
74 // Depend on hash_mask being at most 32 bits and avoid the use of hash_mask_in_place
75 // because it could be larger than 32 bits in a 64-bit vm. See markWord.hpp.
76 __ shrptr(result, markWord::hash_shift);
77 __ andptr(result, markWord::hash_mask);
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
|
56 __ bind(Continue);
57 }
58
59 __ movptr(result, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
60
61 // check if locked
62 __ testptr(result, markWord::unlocked_value);
63 __ jcc(Assembler::zero, slowCase);
64
65 if (UseBiasedLocking) {
66 // Check if biased and fall through to runtime if so
67 __ testptr(result, markWord::biased_lock_bit_in_place);
68 __ jcc(Assembler::notZero, slowCase);
69 }
70
71 // get hash
72 #ifdef _LP64
73 // Read the header and build a mask to get its hash field.
74 // Depend on hash_mask being at most 32 bits and avoid the use of hash_mask_in_place
75 // because it could be larger than 32 bits in a 64-bit vm. See markWord.hpp.
76 if (UseCompactObjectHeaders) {
77 __ shrptr(result, markWord::hash_shift_compact);
78 __ andptr(result, markWord::hash_mask_compact);
79 } else {
80 __ shrptr(result, markWord::hash_shift);
81 __ andptr(result, markWord::hash_mask);
82 }
83 #else
84 __ andptr(result, markWord::hash_mask_in_place);
85 #endif //_LP64
86
87 // test if hashCode exists
88 __ jcc(Assembler::zero, slowCase);
89 #ifndef _LP64
90 __ shrptr(result, markWord::hash_shift);
91 #endif
92 __ ret(0);
93 __ bind(slowCase);
94 }
95 #endif //COMPILER1
96
|