2667 }
2668 } else if (opr2->is_constant()) {
2669 // cpu register - constant
2670 LIR_Const* c = opr2->as_constant_ptr();
2671 if (c->type() == T_INT) {
2672 __ cmpl(reg1, c->as_jint());
2673 } else if (c->type() == T_OBJECT || c->type() == T_ARRAY) {
2674 // In 64bit oops are single register
2675 jobject o = c->as_jobject();
2676 if (o == NULL) {
2677 __ cmpptr(reg1, (int32_t)NULL_WORD);
2678 } else {
2679 #ifdef _LP64
2680 __ movoop(rscratch1, o);
2681 __ cmpptr(reg1, rscratch1);
2682 #else
2683 __ cmpoop(reg1, c->as_jobject());
2684 #endif // _LP64
2685 }
2686 } else {
2687 fatal(err_msg("unexpected type: %s", basictype_to_str(c->type())));
2688 }
2689 // cpu register - address
2690 } else if (opr2->is_address()) {
2691 if (op->info() != NULL) {
2692 add_debug_info_for_null_check_here(op->info());
2693 }
2694 __ cmpl(reg1, as_Address(opr2->as_address_ptr()));
2695 } else {
2696 ShouldNotReachHere();
2697 }
2698
2699 } else if(opr1->is_double_cpu()) {
2700 Register xlo = opr1->as_register_lo();
2701 Register xhi = opr1->as_register_hi();
2702 if (opr2->is_double_cpu()) {
2703 #ifdef _LP64
2704 __ cmpptr(xlo, opr2->as_register_lo());
2705 #else
2706 // cpu register - cpu register
2707 Register ylo = opr2->as_register_lo();
|
2667 }
2668 } else if (opr2->is_constant()) {
2669 // cpu register - constant
2670 LIR_Const* c = opr2->as_constant_ptr();
2671 if (c->type() == T_INT) {
2672 __ cmpl(reg1, c->as_jint());
2673 } else if (c->type() == T_OBJECT || c->type() == T_ARRAY) {
2674 // In 64bit oops are single register
2675 jobject o = c->as_jobject();
2676 if (o == NULL) {
2677 __ cmpptr(reg1, (int32_t)NULL_WORD);
2678 } else {
2679 #ifdef _LP64
2680 __ movoop(rscratch1, o);
2681 __ cmpptr(reg1, rscratch1);
2682 #else
2683 __ cmpoop(reg1, c->as_jobject());
2684 #endif // _LP64
2685 }
2686 } else {
2687 fatal("unexpected type: %s", basictype_to_str(c->type()));
2688 }
2689 // cpu register - address
2690 } else if (opr2->is_address()) {
2691 if (op->info() != NULL) {
2692 add_debug_info_for_null_check_here(op->info());
2693 }
2694 __ cmpl(reg1, as_Address(opr2->as_address_ptr()));
2695 } else {
2696 ShouldNotReachHere();
2697 }
2698
2699 } else if(opr1->is_double_cpu()) {
2700 Register xlo = opr1->as_register_lo();
2701 Register xhi = opr1->as_register_hi();
2702 if (opr2->is_double_cpu()) {
2703 #ifdef _LP64
2704 __ cmpptr(xlo, opr2->as_register_lo());
2705 #else
2706 // cpu register - cpu register
2707 Register ylo = opr2->as_register_lo();
|