503 //
504 __ bind(_entry);
505
506 assert(src()->is_register(), "sanity");
507 Register src_reg = src()->as_register();
508
509 if (gen_src_check()) {
510 // The original src operand was not a constant.
511 // Generate src == null?
512 __ cmpptr(src_reg, (int32_t) NULL_WORD);
513 __ jcc(Assembler::equal, _continuation);
514 }
515
516 // Generate src->_klass->_reference_type == REF_NONE)?
517 assert(tmp()->is_register(), "sanity");
518 Register tmp_reg = tmp()->as_register();
519
520 __ load_klass(tmp_reg, src_reg);
521
522 Address ref_type_adr(tmp_reg, instanceKlass::reference_type_offset());
523 __ cmpl(ref_type_adr, REF_NONE);
524 __ jcc(Assembler::equal, _continuation);
525
526 // Is marking active?
527 assert(thread()->is_register(), "precondition");
528 Register thread_reg = thread()->as_pointer_register();
529
530 Address in_progress(thread_reg, in_bytes(JavaThread::satb_mark_queue_offset() +
531 PtrQueue::byte_offset_of_active()));
532
533 if (in_bytes(PtrQueue::byte_width_of_active()) == 4) {
534 __ cmpl(in_progress, 0);
535 } else {
536 assert(in_bytes(PtrQueue::byte_width_of_active()) == 1, "Assumption");
537 __ cmpb(in_progress, 0);
538 }
539 __ jcc(Assembler::equal, _continuation);
540
541 // val == null?
542 assert(val()->is_register(), "Precondition.");
543 Register val_reg = val()->as_register();
|
503 //
504 __ bind(_entry);
505
506 assert(src()->is_register(), "sanity");
507 Register src_reg = src()->as_register();
508
509 if (gen_src_check()) {
510 // The original src operand was not a constant.
511 // Generate src == null?
512 __ cmpptr(src_reg, (int32_t) NULL_WORD);
513 __ jcc(Assembler::equal, _continuation);
514 }
515
516 // Generate src->_klass->_reference_type == REF_NONE)?
517 assert(tmp()->is_register(), "sanity");
518 Register tmp_reg = tmp()->as_register();
519
520 __ load_klass(tmp_reg, src_reg);
521
522 Address ref_type_adr(tmp_reg, instanceKlass::reference_type_offset());
523 __ cmpb(ref_type_adr, REF_NONE);
524 __ jcc(Assembler::equal, _continuation);
525
526 // Is marking active?
527 assert(thread()->is_register(), "precondition");
528 Register thread_reg = thread()->as_pointer_register();
529
530 Address in_progress(thread_reg, in_bytes(JavaThread::satb_mark_queue_offset() +
531 PtrQueue::byte_offset_of_active()));
532
533 if (in_bytes(PtrQueue::byte_width_of_active()) == 4) {
534 __ cmpl(in_progress, 0);
535 } else {
536 assert(in_bytes(PtrQueue::byte_width_of_active()) == 1, "Assumption");
537 __ cmpb(in_progress, 0);
538 }
539 __ jcc(Assembler::equal, _continuation);
540
541 // val == null?
542 assert(val()->is_register(), "Precondition.");
543 Register val_reg = val()->as_register();
|