495
496 Register scratch1 = Z_tmp_2;
497 Register scratch2 = Z_tmp_3;
498 Register pre_val = Z_RET; // return value
499 // Z_esp is callers operand stack pointer, i.e. it points to the parameters.
500 Register Rargp = Z_esp;
501
502 Label slow_path;
503 address entry = __ pc();
504
505 const int referent_offset = java_lang_ref_Reference::referent_offset;
506 guarantee(referent_offset > 0, "referent offset not initialized");
507
508 BLOCK_COMMENT("Reference_get {");
509
510 // If the receiver is null then it is OK to jump to the slow path.
511 __ load_and_test_long(pre_val, Address(Rargp, Interpreter::stackElementSize)); // Get receiver.
512 __ z_bre(slow_path);
513
514 // Load the value of the referent field.
515 BarrierSetAssembler *bs = Universe::heap()->barrier_set()->barrier_set_assembler();
516 bs->load_at(_masm, IN_HEAP | ON_WEAK_OOP_REF, T_OBJECT,
517 Address(pre_val, referent_offset), pre_val, scratch1, scratch2);
518
519 // Restore caller sp for c2i case.
520 __ resize_frame_absolute(Z_R10, Z_R0, true); // Cut the stack back to where the caller started.
521 __ z_br(Z_R14);
522
523 // Branch to previously generated regular method entry.
524 __ bind(slow_path);
525
526 address meth_entry = Interpreter::entry_for_kind(Interpreter::zerolocals);
527 __ jump_to_entry(meth_entry, Z_R1);
528
529 BLOCK_COMMENT("} Reference_get");
530
531 return entry;
532 }
533
534 address TemplateInterpreterGenerator::generate_StackOverflowError_handler() {
535 address entry = __ pc();
|
495
496 Register scratch1 = Z_tmp_2;
497 Register scratch2 = Z_tmp_3;
498 Register pre_val = Z_RET; // return value
499 // Z_esp is callers operand stack pointer, i.e. it points to the parameters.
500 Register Rargp = Z_esp;
501
502 Label slow_path;
503 address entry = __ pc();
504
505 const int referent_offset = java_lang_ref_Reference::referent_offset;
506 guarantee(referent_offset > 0, "referent offset not initialized");
507
508 BLOCK_COMMENT("Reference_get {");
509
510 // If the receiver is null then it is OK to jump to the slow path.
511 __ load_and_test_long(pre_val, Address(Rargp, Interpreter::stackElementSize)); // Get receiver.
512 __ z_bre(slow_path);
513
514 // Load the value of the referent field.
515 BarrierSetAssembler *bs = BarrierSet::barrier_set()->barrier_set_assembler();
516 bs->load_at(_masm, IN_HEAP | ON_WEAK_OOP_REF, T_OBJECT,
517 Address(pre_val, referent_offset), pre_val, scratch1, scratch2);
518
519 // Restore caller sp for c2i case.
520 __ resize_frame_absolute(Z_R10, Z_R0, true); // Cut the stack back to where the caller started.
521 __ z_br(Z_R14);
522
523 // Branch to previously generated regular method entry.
524 __ bind(slow_path);
525
526 address meth_entry = Interpreter::entry_for_kind(Interpreter::zerolocals);
527 __ jump_to_entry(meth_entry, Z_R1);
528
529 BLOCK_COMMENT("} Reference_get");
530
531 return entry;
532 }
533
534 address TemplateInterpreterGenerator::generate_StackOverflowError_handler() {
535 address entry = __ pc();
|