2118 // lock, the object could not be rebiased toward another thread, so
2119 // the bias bit would be clear.
2120 ldr(tmp_reg, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
2121
2122 andr(tmp_reg, tmp_reg, (uintx)markOopDesc::biased_lock_mask_in_place);
2123 cmp(tmp_reg, markOopDesc::biased_lock_pattern);
2124 b(done, eq);
2125 }
2126
2127
2128 void MacroAssembler::resolve_jobject(Register value,
2129 Register tmp1,
2130 Register tmp2) {
2131 assert_different_registers(value, tmp1, tmp2);
2132 Label done, not_weak;
2133 cbz(value, done); // Use NULL as-is.
2134 STATIC_ASSERT(JNIHandles::weak_tag_mask == 1u);
2135 tbz(value, 0, not_weak); // Test for jweak tag.
2136
2137 // Resolve jweak.
2138 access_load_at(T_OBJECT, IN_ROOT | ON_PHANTOM_OOP_REF,
2139 Address(value, -JNIHandles::weak_tag_value), value, tmp1, tmp2, noreg);
2140 b(done);
2141 bind(not_weak);
2142 // Resolve (untagged) jobject.
2143 access_load_at(T_OBJECT, IN_CONCURRENT_ROOT,
2144 Address(value, 0), value, tmp1, tmp2, noreg);
2145 verify_oop(value);
2146 bind(done);
2147 }
2148
2149
2150 //////////////////////////////////////////////////////////////////////////////////
2151
2152 #ifdef AARCH64
2153
2154 void MacroAssembler::load_sized_value(Register dst, Address src, size_t size_in_bytes, bool is_signed) {
2155 switch (size_in_bytes) {
2156 case 8: ldr(dst, src); break;
2157 case 4: is_signed ? ldr_s32(dst, src) : ldr_u32(dst, src); break;
2158 case 2: is_signed ? ldrsh(dst, src) : ldrh(dst, src); break;
|
2118 // lock, the object could not be rebiased toward another thread, so
2119 // the bias bit would be clear.
2120 ldr(tmp_reg, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
2121
2122 andr(tmp_reg, tmp_reg, (uintx)markOopDesc::biased_lock_mask_in_place);
2123 cmp(tmp_reg, markOopDesc::biased_lock_pattern);
2124 b(done, eq);
2125 }
2126
2127
2128 void MacroAssembler::resolve_jobject(Register value,
2129 Register tmp1,
2130 Register tmp2) {
2131 assert_different_registers(value, tmp1, tmp2);
2132 Label done, not_weak;
2133 cbz(value, done); // Use NULL as-is.
2134 STATIC_ASSERT(JNIHandles::weak_tag_mask == 1u);
2135 tbz(value, 0, not_weak); // Test for jweak tag.
2136
2137 // Resolve jweak.
2138 access_load_at(T_OBJECT, IN_NATIVE | ON_PHANTOM_OOP_REF,
2139 Address(value, -JNIHandles::weak_tag_value), value, tmp1, tmp2, noreg);
2140 b(done);
2141 bind(not_weak);
2142 // Resolve (untagged) jobject.
2143 access_load_at(T_OBJECT, IN_CONCURRENT_ROOT,
2144 Address(value, 0), value, tmp1, tmp2, noreg);
2145 verify_oop(value);
2146 bind(done);
2147 }
2148
2149
2150 //////////////////////////////////////////////////////////////////////////////////
2151
2152 #ifdef AARCH64
2153
2154 void MacroAssembler::load_sized_value(Register dst, Address src, size_t size_in_bytes, bool is_signed) {
2155 switch (size_in_bytes) {
2156 case 8: ldr(dst, src); break;
2157 case 4: is_signed ? ldr_s32(dst, src) : ldr_u32(dst, src); break;
2158 case 2: is_signed ? ldrsh(dst, src) : ldrh(dst, src); break;
|