857 if (C->stub_function() != NULL && BarrierSet::barrier_set()->barrier_set_nmethod() != NULL) { 858 st->print("\n\t"); 859 st->print("cmpl [r15_thread + #disarmed_offset], #disarmed_value\t"); 860 st->print("\n\t"); 861 st->print("je fast_entry\t"); 862 st->print("\n\t"); 863 st->print("call #nmethod_entry_barrier_stub\t"); 864 st->print("\n\tfast_entry:"); 865 } 866 st->cr(); 867 } 868 #endif 869 870 void MachPrologNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const { 871 Compile* C = ra_->C; 872 MacroAssembler _masm(&cbuf); 873 874 int framesize = C->frame_size_in_bytes(); 875 int bangsize = C->bang_size_in_bytes(); 876 877 __ verified_entry(framesize, C->need_stack_bang(bangsize)?bangsize:0, false, C->stub_function() != NULL); 878 879 C->set_frame_complete(cbuf.insts_size()); 880 881 if (C->has_mach_constant_base_node()) { 882 // NOTE: We set the table base offset here because users might be 883 // emitted before MachConstantBaseNode. 884 Compile::ConstantTable& constant_table = C->constant_table(); 885 constant_table.set_table_base_offset(constant_table.calculate_table_base_offset()); 886 } 887 } 888 889 uint MachPrologNode::size(PhaseRegAlloc* ra_) const 890 { 891 return MachNode::size(ra_); // too many variables; just compute it 892 // the hard way 893 } 894 895 int MachPrologNode::reloc() const 896 { | 857 if (C->stub_function() != NULL && BarrierSet::barrier_set()->barrier_set_nmethod() != NULL) { 858 st->print("\n\t"); 859 st->print("cmpl [r15_thread + #disarmed_offset], #disarmed_value\t"); 860 st->print("\n\t"); 861 st->print("je fast_entry\t"); 862 st->print("\n\t"); 863 st->print("call #nmethod_entry_barrier_stub\t"); 864 st->print("\n\tfast_entry:"); 865 } 866 st->cr(); 867 } 868 #endif 869 870 void MachPrologNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const { 871 Compile* C = ra_->C; 872 MacroAssembler _masm(&cbuf); 873 874 int framesize = C->frame_size_in_bytes(); 875 int bangsize = C->bang_size_in_bytes(); 876 877 if (C->clinit_barrier_on_entry()) { 878 assert(C->method()->holder()->is_being_initialized(), "sanity"); 879 Label L_skip_barrier; 880 Register klass = rscratch1; 881 882 __ mov_metadata(klass, C->method()->holder()->constant_encoding()); 883 __ clinit_barrier(klass, r15_thread, &L_skip_barrier /*L_fast_path*/); 884 885 __ jump(RuntimeAddress(SharedRuntime::get_handle_wrong_method_stub())); // slow path 886 887 __ bind(L_skip_barrier); 888 } 889 890 __ verified_entry(framesize, C->need_stack_bang(bangsize)?bangsize:0, false, C->stub_function() != NULL); 891 892 C->set_frame_complete(cbuf.insts_size()); 893 894 if (C->has_mach_constant_base_node()) { 895 // NOTE: We set the table base offset here because users might be 896 // emitted before MachConstantBaseNode. 897 Compile::ConstantTable& constant_table = C->constant_table(); 898 constant_table.set_table_base_offset(constant_table.calculate_table_base_offset()); 899 } 900 } 901 902 uint MachPrologNode::size(PhaseRegAlloc* ra_) const 903 { 904 return MachNode::size(ra_); // too many variables; just compute it 905 // the hard way 906 } 907 908 int MachPrologNode::reloc() const 909 { |