< prev index next >

src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp

Print this page

3621 
3622   bool do_null = !not_null;
3623   bool exact_klass_set = exact_klass != NULL && ciTypeEntries::valid_ciklass(current_klass) == exact_klass;
3624   bool do_update = !TypeEntries::is_type_unknown(current_klass) && !exact_klass_set;
3625 
3626   assert(do_null || do_update, "why are we here?");
3627   assert(!TypeEntries::was_null_seen(current_klass) || do_update, "why are we here?");
3628 
3629   __ verify_oop(obj);
3630 
3631   if (tmp != obj) {
3632     __ mov(tmp, obj);
3633   }
3634   if (do_null) {
3635     __ testptr(tmp, tmp);
3636     __ jccb(Assembler::notZero, update);
3637     if (!TypeEntries::was_null_seen(current_klass)) {
3638       __ orptr(mdo_addr, TypeEntries::null_seen);
3639     }
3640     if (do_update) {
3641 #ifndef ASSERT
3642       __ jmpb(next);
3643     }
3644 #else
3645       __ jmp(next);
3646     }

3647   } else {
3648     __ testptr(tmp, tmp);
3649     __ jcc(Assembler::notZero, update);
3650     __ stop("unexpect null obj");
3651 #endif
3652   }
3653 
3654   __ bind(update);
3655 
3656   if (do_update) {
3657 #ifdef ASSERT
3658     if (exact_klass != NULL) {
3659       Label ok;
3660       __ load_klass(tmp, tmp, tmp_load_klass);
3661       __ push(tmp);
3662       __ mov_metadata(tmp, exact_klass->constant_encoding());
3663       __ cmpptr(tmp, Address(rsp, 0));
3664       __ jcc(Assembler::equal, ok);
3665       __ stop("exact klass and actual klass differ");
3666       __ bind(ok);

3621 
3622   bool do_null = !not_null;
3623   bool exact_klass_set = exact_klass != NULL && ciTypeEntries::valid_ciklass(current_klass) == exact_klass;
3624   bool do_update = !TypeEntries::is_type_unknown(current_klass) && !exact_klass_set;
3625 
3626   assert(do_null || do_update, "why are we here?");
3627   assert(!TypeEntries::was_null_seen(current_klass) || do_update, "why are we here?");
3628 
3629   __ verify_oop(obj);
3630 
3631   if (tmp != obj) {
3632     __ mov(tmp, obj);
3633   }
3634   if (do_null) {
3635     __ testptr(tmp, tmp);
3636     __ jccb(Assembler::notZero, update);
3637     if (!TypeEntries::was_null_seen(current_klass)) {
3638       __ orptr(mdo_addr, TypeEntries::null_seen);
3639     }
3640     if (do_update) {




3641       __ jmp(next);
3642     }
3643 #ifdef ASSERT
3644   } else {
3645     __ testptr(tmp, tmp);
3646     __ jcc(Assembler::notZero, update);
3647     __ stop("unexpect null obj");
3648 #endif
3649   }
3650 
3651   __ bind(update);
3652 
3653   if (do_update) {
3654 #ifdef ASSERT
3655     if (exact_klass != NULL) {
3656       Label ok;
3657       __ load_klass(tmp, tmp, tmp_load_klass);
3658       __ push(tmp);
3659       __ mov_metadata(tmp, exact_klass->constant_encoding());
3660       __ cmpptr(tmp, Address(rsp, 0));
3661       __ jcc(Assembler::equal, ok);
3662       __ stop("exact klass and actual klass differ");
3663       __ bind(ok);
< prev index next >