< prev index next >

src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp

Print this page
rev 50099 : 8203157: Object equals abstraction for BarrierSetAssembler

*** 3645,3654 **** --- 3645,3659 ---- adrp(rscratch1, src2, offset); ldr(rscratch1, Address(rscratch1, offset)); cmp(src1, rscratch1); } + void MacroAssembler::cmpoop(Register obj1, Register obj2) { + BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler(); + bs->obj_equals(this, IN_HEAP, obj1, obj2); + } + void MacroAssembler::load_klass(Register dst, Register src) { if (UseCompressedClassPointers) { ldrw(dst, Address(src, oopDesc::klass_offset_in_bytes())); decode_klass_not_null(dst); } else {
*** 5034,5043 **** --- 5039,5050 ---- // if (a==null || a2==null) // return false; // a1 & a2 == 0 means (some-pointer is null) or // (very-rare-or-even-probably-impossible-pointer-values) // so, we can save one branch in most cases + cmpoop(a1, a2); + br(EQ, SAME); eor(rscratch1, a1, a2); tst(a1, a2); mov(result, false); cbz(rscratch1, SAME); br(EQ, A_MIGHT_BE_NULL);
*** 5117,5127 **** mov(result, false); // on most CPUs a2 is still "locked"(surprisingly) in ldrw and it's // faster to perform another branch before comparing a1 and a2 cmp(cnt1, elem_per_word); br(LE, SHORT); // short or same ! cmp(a1, a2); br(EQ, SAME); ldr(tmp3, Address(pre(a1, base_offset))); cmp(cnt1, stubBytesThreshold); br(GE, STUB); ldr(tmp4, Address(pre(a2, base_offset))); --- 5124,5134 ---- mov(result, false); // on most CPUs a2 is still "locked"(surprisingly) in ldrw and it's // faster to perform another branch before comparing a1 and a2 cmp(cnt1, elem_per_word); br(LE, SHORT); // short or same ! cmpoop(a1, a2); br(EQ, SAME); ldr(tmp3, Address(pre(a1, base_offset))); cmp(cnt1, stubBytesThreshold); br(GE, STUB); ldr(tmp4, Address(pre(a2, base_offset)));
< prev index next >