< prev index next >

src/cpu/x86/vm/c1_LIRAssembler_x86.cpp

Print this page
rev 13993 : [mq]: refactor-acmp.patch

*** 2610,2635 **** if (opr1->is_single_cpu()) { Register reg1 = opr1->as_register(); if (opr2->is_single_cpu()) { // cpu register - cpu register if (opr1->type() == T_OBJECT || opr1->type() == T_ARRAY) { ! __ cmpptr(reg1, opr2->as_register()); ! oopDesc::bs()->asm_acmp_barrier(masm(), reg1, opr2->as_register()); } else { assert(opr2->type() != T_OBJECT && opr2->type() != T_ARRAY, "cmp int, oop?"); __ cmpl(reg1, opr2->as_register()); } } else if (opr2->is_stack()) { // cpu register - stack if (opr1->type() == T_OBJECT || opr1->type() == T_ARRAY) { ! if (UseShenandoahGC && ShenandoahAcmpBarrier) { ! __ movptr(rscratch1, frame_map()->address_for_slot(opr2->single_stack_ix())); ! __ cmpptr(reg1, rscratch1); ! oopDesc::bs()->asm_acmp_barrier(masm(), reg1, rscratch1); ! } else { ! __ cmpptr(reg1, frame_map()->address_for_slot(opr2->single_stack_ix())); ! } } else { __ cmpl(reg1, frame_map()->address_for_slot(opr2->single_stack_ix())); } } else if (opr2->is_constant()) { // cpu register - constant --- 2610,2628 ---- if (opr1->is_single_cpu()) { Register reg1 = opr1->as_register(); if (opr2->is_single_cpu()) { // cpu register - cpu register if (opr1->type() == T_OBJECT || opr1->type() == T_ARRAY) { ! __ cmpoopptr(reg1, opr2->as_register()); } else { assert(opr2->type() != T_OBJECT && opr2->type() != T_ARRAY, "cmp int, oop?"); __ cmpl(reg1, opr2->as_register()); } } else if (opr2->is_stack()) { // cpu register - stack if (opr1->type() == T_OBJECT || opr1->type() == T_ARRAY) { ! __ cmpoopptr(reg1, frame_map()->address_for_slot(opr2->single_stack_ix())); } else { __ cmpl(reg1, frame_map()->address_for_slot(opr2->single_stack_ix())); } } else if (opr2->is_constant()) { // cpu register - constant
*** 2642,2653 **** if (o == NULL) { __ cmpptr(reg1, (int32_t)NULL_WORD); } else { #ifdef _LP64 __ movoop(rscratch1, o); ! __ cmpptr(reg1, rscratch1); ! oopDesc::bs()->asm_acmp_barrier(masm(), reg1, rscratch1); #else __ cmpoop(reg1, c->as_jobject()); #endif // _LP64 } } else { --- 2635,2645 ---- if (o == NULL) { __ cmpptr(reg1, (int32_t)NULL_WORD); } else { #ifdef _LP64 __ movoop(rscratch1, o); ! __ cmpoopptr(reg1, rscratch1); #else __ cmpoop(reg1, c->as_jobject()); #endif // _LP64 } } else {
*** 2756,2772 **** __ cmpl(as_Address(addr), c->as_jint()); } else if (c->type() == T_OBJECT || c->type() == T_ARRAY) { #ifdef _LP64 // %%% Make this explode if addr isn't reachable until we figure out a // better strategy by giving noreg as the temp for as_Address ! if (UseShenandoahGC && ShenandoahAcmpBarrier) { ! __ movptr(rscratch2, as_Address(addr, noreg)); ! __ cmpptr(rscratch1, rscratch2); ! oopDesc::bs()->asm_acmp_barrier(masm(), rscratch1, rscratch2); ! } else { ! __ cmpptr(rscratch1, as_Address(addr, noreg)); ! } #else __ cmpoop(as_Address(addr), c->as_jobject()); #endif // _LP64 } else { ShouldNotReachHere(); --- 2748,2758 ---- __ cmpl(as_Address(addr), c->as_jint()); } else if (c->type() == T_OBJECT || c->type() == T_ARRAY) { #ifdef _LP64 // %%% Make this explode if addr isn't reachable until we figure out a // better strategy by giving noreg as the temp for as_Address ! __ cmpoopptr(rscratch1, as_Address(addr, noreg)); #else __ cmpoop(as_Address(addr), c->as_jobject()); #endif // _LP64 } else { ShouldNotReachHere();
< prev index next >