equal
deleted
inserted
replaced
3649 adrp(rscratch1, src2, offset); |
3649 adrp(rscratch1, src2, offset); |
3650 ldr(rscratch1, Address(rscratch1, offset)); |
3650 ldr(rscratch1, Address(rscratch1, offset)); |
3651 cmp(src1, rscratch1); |
3651 cmp(src1, rscratch1); |
3652 } |
3652 } |
3653 |
3653 |
|
3654 void MacroAssembler::cmpoop(Register obj1, Register obj2) { |
|
3655 BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler(); |
|
3656 bs->obj_equals(this, obj1, obj2); |
|
3657 } |
|
3658 |
3654 void MacroAssembler::load_klass(Register dst, Register src) { |
3659 void MacroAssembler::load_klass(Register dst, Register src) { |
3655 if (UseCompressedClassPointers) { |
3660 if (UseCompressedClassPointers) { |
3656 ldrw(dst, Address(src, oopDesc::klass_offset_in_bytes())); |
3661 ldrw(dst, Address(src, oopDesc::klass_offset_in_bytes())); |
3657 decode_klass_not_null(dst); |
3662 decode_klass_not_null(dst); |
3658 } else { |
3663 } else { |
5046 // if (a==null || a2==null) |
5051 // if (a==null || a2==null) |
5047 // return false; |
5052 // return false; |
5048 // a1 & a2 == 0 means (some-pointer is null) or |
5053 // a1 & a2 == 0 means (some-pointer is null) or |
5049 // (very-rare-or-even-probably-impossible-pointer-values) |
5054 // (very-rare-or-even-probably-impossible-pointer-values) |
5050 // so, we can save one branch in most cases |
5055 // so, we can save one branch in most cases |
|
5056 cmpoop(a1, a2); |
|
5057 br(EQ, SAME); |
5051 eor(rscratch1, a1, a2); |
5058 eor(rscratch1, a1, a2); |
5052 tst(a1, a2); |
5059 tst(a1, a2); |
5053 mov(result, false); |
5060 mov(result, false); |
5054 cbz(rscratch1, SAME); |
5061 cbz(rscratch1, SAME); |
5055 br(EQ, A_MIGHT_BE_NULL); |
5062 br(EQ, A_MIGHT_BE_NULL); |
5129 mov(result, false); |
5136 mov(result, false); |
5130 // on most CPUs a2 is still "locked"(surprisingly) in ldrw and it's |
5137 // on most CPUs a2 is still "locked"(surprisingly) in ldrw and it's |
5131 // faster to perform another branch before comparing a1 and a2 |
5138 // faster to perform another branch before comparing a1 and a2 |
5132 cmp(cnt1, elem_per_word); |
5139 cmp(cnt1, elem_per_word); |
5133 br(LE, SHORT); // short or same |
5140 br(LE, SHORT); // short or same |
5134 cmp(a1, a2); |
5141 cmpoop(a1, a2); |
5135 br(EQ, SAME); |
5142 br(EQ, SAME); |
5136 ldr(tmp3, Address(pre(a1, base_offset))); |
5143 ldr(tmp3, Address(pre(a1, base_offset))); |
5137 cmp(cnt1, stubBytesThreshold); |
5144 cmp(cnt1, stubBytesThreshold); |
5138 br(GE, STUB); |
5145 br(GE, STUB); |
5139 ldr(tmp4, Address(pre(a2, base_offset))); |
5146 ldr(tmp4, Address(pre(a2, base_offset))); |