equal
deleted
inserted
replaced
951 #endif |
951 #endif |
952 |
952 |
953 void MachEpilogNode::emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const |
953 void MachEpilogNode::emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const |
954 { |
954 { |
955 Compile* C = ra_->C; |
955 Compile* C = ra_->C; |
|
956 MacroAssembler _masm(&cbuf); |
|
957 |
956 if (C->max_vector_size() > 16) { |
958 if (C->max_vector_size() > 16) { |
957 // Clear upper bits of YMM registers when current compiled code uses |
959 // Clear upper bits of YMM registers when current compiled code uses |
958 // wide vectors to avoid AVX <-> SSE transition penalty during call. |
960 // wide vectors to avoid AVX <-> SSE transition penalty during call. |
959 MacroAssembler _masm(&cbuf); |
|
960 __ vzeroupper(); |
961 __ vzeroupper(); |
961 } |
962 } |
962 |
963 |
963 int framesize = C->frame_size_in_bytes(); |
964 int framesize = C->frame_size_in_bytes(); |
964 assert((framesize & (StackAlignmentInBytes-1)) == 0, "frame size not aligned"); |
965 assert((framesize & (StackAlignmentInBytes-1)) == 0, "frame size not aligned"); |
981 } |
982 } |
982 } |
983 } |
983 |
984 |
984 // popq rbp |
985 // popq rbp |
985 emit_opcode(cbuf, 0x58 | RBP_enc); |
986 emit_opcode(cbuf, 0x58 | RBP_enc); |
|
987 |
|
988 if (StackReservedPages > 0 && C->has_reserved_stack_access()) { |
|
989 __ reserved_stack_check(); |
|
990 } |
986 |
991 |
987 if (do_polling() && C->is_method_compilation()) { |
992 if (do_polling() && C->is_method_compilation()) { |
988 MacroAssembler _masm(&cbuf); |
993 MacroAssembler _masm(&cbuf); |
989 AddressLiteral polling_page(os::get_polling_page(), relocInfo::poll_return_type); |
994 AddressLiteral polling_page(os::get_polling_page(), relocInfo::poll_return_type); |
990 if (Assembler::is_polling_page_far()) { |
995 if (Assembler::is_polling_page_far()) { |