# HG changeset patch # User zhaixiang # Date 1528783097 -28800 # Node ID cecfc245b19a49708ad98a99d5bed84fc122ef17 # Parent 239e32ede77d981f091f3719fbc430eda1316165 #7157 Fix all forgot saying delayed() when filling delay slot issues Summary: enable check_delay and guarantee delay_state is at_delay_slot when filling delay slot Reviewed-by: aoqi diff -r 239e32ede77d -r cecfc245b19a src/cpu/mips/vm/assembler_mips.inline.hpp --- a/src/cpu/mips/vm/assembler_mips.inline.hpp Mon Jun 11 17:42:16 2018 +0800 +++ b/src/cpu/mips/vm/assembler_mips.inline.hpp Tue Jun 12 13:58:17 2018 +0800 @@ -34,6 +34,7 @@ inline void Assembler::check_delay() { # ifdef CHECK_DELAY + guarantee(delay_state != at_delay_slot, "must say delayed() when filling delay slot"); delay_state = no_delay; # endif } diff -r 239e32ede77d -r cecfc245b19a src/cpu/mips/vm/c1_LIRAssembler_mips.cpp --- a/src/cpu/mips/vm/c1_LIRAssembler_mips.cpp Mon Jun 11 17:42:16 2018 +0800 +++ b/src/cpu/mips/vm/c1_LIRAssembler_mips.cpp Tue Jun 12 13:58:17 2018 +0800 @@ -297,15 +297,6 @@ Register receiver = FrameMap::receiver_opr->as_register(); Register ic_klass = IC_Klass; - /*const int ic_cmp_size = LP64_ONLY(10) NOT_LP64(9); - const bool do_post_padding = VerifyOops || UseCompressedOops; - if (!do_post_padding) { - // insert some nops so that the verified entry point is aligned on CodeEntryAlignment - while ((__ offset() + ic_cmp_size) % CodeEntryAlignment != 0) { - __ nop(); - } - }*/ - int offset = __ offset(); __ inline_cache_check(receiver, IC_Klass); __ align(CodeEntryAlignment); diff -r 239e32ede77d -r cecfc245b19a src/cpu/mips/vm/c1_MacroAssembler_mips.cpp --- a/src/cpu/mips/vm/c1_MacroAssembler_mips.cpp Mon Jun 11 17:42:16 2018 +0800 +++ b/src/cpu/mips/vm/c1_MacroAssembler_mips.cpp Tue Jun 12 13:58:17 2018 +0800 @@ -436,14 +436,6 @@ bind(L); // assert(UseCompressedOops, "check alignment in emit_method_entry"); } -/* -void C1_MacroAssembler::method_exit(bool restore_frame) { - if (restore_frame) { - leave(); - } - jr(RA); - delayed()->nop(); -}*/ void C1_MacroAssembler::build_frame(int frame_size_in_bytes, int bang_size_in_bytes) { diff -r 239e32ede77d -r cecfc245b19a src/cpu/mips/vm/interp_masm_mips_64.cpp --- a/src/cpu/mips/vm/interp_masm_mips_64.cpp Mon Jun 11 17:42:16 2018 +0800 +++ b/src/cpu/mips/vm/interp_masm_mips_64.cpp Tue Jun 12 13:58:17 2018 +0800 @@ -364,12 +364,12 @@ Label has_counters; ld(mcs, method, in_bytes(Method::method_counters_offset())); bne(mcs, R0, has_counters); - nop(); + delayed()->nop(); call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::build_method_counters), method); ld(mcs, method, in_bytes(Method::method_counters_offset())); beq(mcs, R0, skip); // No MethodCounters allocated, OutOfMemory - nop(); + delayed()->nop(); bind(has_counters); } @@ -1035,7 +1035,7 @@ daddu(tmp, tmp, AT); daddiu(tmp, tmp, in_bytes(ConstMethod::codes_offset())); beq(tmp, BCP, verify_continue); - nop(); + delayed()->nop(); call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::verify_mdp), method, BCP, mdp); bind(verify_continue); pop(tmp); @@ -1078,7 +1078,7 @@ Label L; slt(AT, tmp, R0); bne(AT, R0, L); - nop(); + delayed()->nop(); daddi(tmp, tmp, (int32_t) DataLayout::counter_increment); bind(L); sd(tmp, data); @@ -1114,7 +1114,7 @@ Label L; slt(AT, tmp, R0); bne(AT, R0, L); - nop(); + delayed()->nop(); daddi(tmp, tmp, (int32_t) DataLayout::counter_increment); bind(L); @@ -1167,12 +1167,12 @@ if (test_value_out == noreg) { ld(AT, Address(mdp_in, offset)); bne(AT, value, not_equal_continue); - nop(); + delayed()->nop(); } else { // Put the test value into a register, so caller can use it: ld(test_value_out, Address(mdp_in, offset)); bne(value, test_value_out, not_equal_continue); - nop(); + delayed()->nop(); } } @@ -1321,11 +1321,11 @@ if (receiver_can_be_null) { Label not_null; bne(receiver, R0, not_null); - nop(); + delayed()->nop(); // We are making a call. Increment the count. increment_mdp_data_at(mdp, in_bytes(CounterData::count_offset())); beq(R0, R0, skip_receiver_profile); - nop(); + delayed()->nop(); bind(not_null); } @@ -1386,7 +1386,7 @@ int count_offset = in_bytes(VirtualCallData::receiver_count_offset(row)); increment_mdp_data_at(mdp, count_offset); beq(R0, R0, done); - nop(); + delayed()->nop(); bind(next_test); if (test_for_null_also) { @@ -1396,22 +1396,22 @@ // The only thing left to do is handle the null case. if (is_virtual_call) { beq(reg2, R0, found_null); - nop(); + delayed()->nop(); // Receiver did not match any saved receiver and there is no empty row for it. // Increment total counter to indicate polymorphic case. increment_mdp_data_at(mdp, in_bytes(CounterData::count_offset())); beq(R0, R0, done); - nop(); + delayed()->nop(); bind(found_null); } else { bne(reg2, R0, done); - nop(); + delayed()->nop(); } break; } // Since null is rare, make it be the branch-taken case. beq(reg2, R0, found_null); - nop(); + delayed()->nop(); // Put all the "Case 3" tests here. record_klass_in_profile_helper(receiver, mdp, reg2, start_row + 1, done, is_virtual_call); @@ -1433,7 +1433,7 @@ set_mdp_data_at(mdp, count_offset, reg2); if (start_row > 0) { beq(R0, R0, done); - nop(); + delayed()->nop(); } } @@ -1500,7 +1500,7 @@ update_mdp_by_offset(mdp, in_bytes(RetData::bci_displacement_offset(row))); beq(R0, R0, profile_continue); - nop(); + delayed()->nop(); bind(next_test); } @@ -1642,31 +1642,31 @@ // common case first addiu(AT, T9, -T_INT); beq(AT, R0, done); - nop(); + delayed()->nop(); // mask integer result to narrower return type. addiu(AT, T9, -T_BOOLEAN); bne(AT, R0, notBool); - nop(); + delayed()->nop(); andi(result, result, 0x1); beq(R0, R0, done); - nop(); + delayed()->nop(); bind(notBool); addiu(AT, T9, -T_BYTE); bne(AT, R0, notByte); - nop(); + delayed()->nop(); seb(result, result); beq(R0, R0, done); - nop(); + delayed()->nop(); bind(notByte); addiu(AT, T9, -T_CHAR); bne(AT, R0, notChar); - nop(); + delayed()->nop(); andi(result, result, 0xFFFF); beq(R0, R0, done); - nop(); + delayed()->nop(); bind(notChar); seh(result, result); @@ -1682,7 +1682,7 @@ verify_oop(obj); bne(obj, R0, update); - nop(); + delayed()->nop(); push(T1); if (mdo_addr.index() == noreg) { @@ -1710,7 +1710,7 @@ pop(T1); beq(R0, R0, next); - nop(); + delayed()->nop(); bind(update); load_klass(obj, obj); @@ -1727,12 +1727,12 @@ li(AT, TypeEntries::type_klass_mask); andr(AT, obj, AT); beq(AT, R0, next); - nop(); + delayed()->nop(); li(AT, TypeEntries::type_unknown); andr(AT, AT, obj); bne(AT, R0, next); - nop(); + delayed()->nop(); if (mdo_addr.index() == noreg) { ld(AT, mdo_addr); @@ -1742,7 +1742,7 @@ ld(AT, AT, mdo_addr.disp()); } beq(AT, R0, none); - nop(); + delayed()->nop(); push(T1); @@ -1760,7 +1760,7 @@ subu(AT, AT, T1); pop(T1); beq(AT, R0, none); - nop(); + delayed()->nop(); // There is a chance that the checks above (re-reading profiling // data from memory) fail if another thread has just set the @@ -1776,7 +1776,7 @@ li(AT, TypeEntries::type_klass_mask); andr(AT, obj, AT); beq(AT, R0, next); - nop(); + delayed()->nop(); // different than before. Cannot keep accurate profile. push(T1); @@ -1804,7 +1804,7 @@ } pop(T1); beq(R0, R0, next); - nop(); + delayed()->nop(); bind(none); @@ -1835,7 +1835,7 @@ lb(AT, mdp, in_bytes(DataLayout::tag_offset()) - off_to_start); li(tmp, is_virtual ? DataLayout::virtual_call_type_data_tag : DataLayout::call_type_data_tag); bne(tmp, AT, profile_continue); - nop(); + delayed()->nop(); if (MethodData::profile_arguments()) { @@ -1864,7 +1864,7 @@ li(AT, TypeStackSlotEntries::per_arg_count()); slt(AT, tmp, AT); bne(AT, R0, done); - nop(); + delayed()->nop(); } ld(tmp, callee, in_bytes(Method::const_offset())); @@ -1949,18 +1949,18 @@ lb(AT, _bcp_register, 0); daddiu(AT, AT, -1 * Bytecodes::_invokedynamic); beq(AT, R0, do_profile); - nop(); + delayed()->nop(); lb(AT, _bcp_register, 0); daddiu(AT, AT, -1 * Bytecodes::_invokehandle); beq(AT, R0, do_profile); - nop(); + delayed()->nop(); get_method(tmp); lb(tmp, tmp, Method::intrinsic_id_offset_in_bytes()); li(AT, vmIntrinsics::_compiledLambdaForm); bne(tmp, AT, profile_continue); - nop(); + delayed()->nop(); bind(do_profile); } @@ -1985,7 +1985,7 @@ // parameters. If it's negative we're not profiling any parameters lw(tmp1, mdp, in_bytes(MethodData::parameters_type_data_di_offset()) - in_bytes(MethodData::data_offset())); bltz(tmp1, profile_continue); - nop(); + delayed()->nop(); // Compute a pointer to the area for parameters from the offset // and move the pointer to the slot for the last @@ -2022,7 +2022,7 @@ // go to next parameter decrement(tmp1, TypeStackSlotEntries::per_arg_count()); bgtz(tmp1, loop); - nop(); + delayed()->nop(); bind(profile_continue); } diff -r 239e32ede77d -r cecfc245b19a src/cpu/mips/vm/interpreterRT_mips_64.cpp --- a/src/cpu/mips/vm/interpreterRT_mips_64.cpp Mon Jun 11 17:42:16 2018 +0800 +++ b/src/cpu/mips/vm/interpreterRT_mips_64.cpp Tue Jun 12 13:58:17 2018 +0800 @@ -85,7 +85,7 @@ Label L; __ bne(Rtmp1, R0, L); - __ addu_long(Rtmp1, from(), Interpreter::local_offset_in_bytes(offset())); + __ delayed()->daddiu(Rtmp1, from(), Interpreter::local_offset_in_bytes(offset())); __ move(Rtmp1, R0); __ bind(L); diff -r 239e32ede77d -r cecfc245b19a src/cpu/mips/vm/macroAssembler_mips.cpp --- a/src/cpu/mips/vm/macroAssembler_mips.cpp Mon Jun 11 17:42:16 2018 +0800 +++ b/src/cpu/mips/vm/macroAssembler_mips.cpp Tue Jun 12 13:58:17 2018 +0800 @@ -125,7 +125,7 @@ MacroAssembler masm(&cb); #define __ masm. __ b(target); - __ nop(); + __ delayed()->nop(); __ nop(); __ nop(); __ nop(); @@ -188,11 +188,11 @@ void MacroAssembler::general_jump(address target) { if (reachable_from_cache(target)) { j(target); - nop(); + delayed()->nop(); } else { set64(T9, (long)target); jr(T9); - nop(); + delayed()->nop(); } } @@ -216,11 +216,11 @@ nop(); nop(); j(target); - nop(); + delayed()->nop(); } else { patchable_set48(T9, (long)target); jr(T9); - nop(); + delayed()->nop(); } } @@ -231,11 +231,11 @@ void MacroAssembler::general_call(address target) { if (reachable_from_cache(target)) { jal(target); - nop(); + delayed()->nop(); } else { set64(T9, (long)target); jalr(T9); - nop(); + delayed()->nop(); } } @@ -259,11 +259,11 @@ nop(); nop(); jal(target); - nop(); + delayed()->nop(); } else { patchable_set48(T9, (long)target); jalr(T9); - nop(); + delayed()->nop(); } } @@ -347,7 +347,7 @@ Label not_taken; bne(rs, rt, not_taken); - nop(); + delayed()->nop(); jmp_far(L); @@ -358,7 +358,7 @@ Label not_taken; beq(rs, rt, not_taken); - nop(); + delayed()->nop(); jmp_far(L); @@ -369,7 +369,7 @@ Label not_taken; bc1f(not_taken); - nop(); + delayed()->nop(); jmp_far(L); @@ -380,7 +380,7 @@ Label not_taken; bc1t(not_taken); - nop(); + delayed()->nop(); jmp_far(L); @@ -819,7 +819,7 @@ } jr(T9); - nop(); + delayed()->nop(); } void MacroAssembler::mov_metadata(Address dst, Metadata* obj) { int oop_index; @@ -1591,7 +1591,7 @@ lb(AT, in_progress); } beq(AT, R0, done); - nop(); + delayed()->nop(); // Do we need to load the previous value? if (obj != noreg) { @@ -1600,7 +1600,7 @@ // Is the previous value null? beq(pre_val, R0, done); - nop(); + delayed()->nop(); // Can we store original value in the thread's buffer? // Is index == 0? @@ -1608,7 +1608,7 @@ ld(tmp, index); beq(tmp, R0, runtime); - nop(); + delayed()->nop(); daddiu(tmp, tmp, -1 * wordSize); sd(tmp, index); @@ -1618,7 +1618,7 @@ // Record the previous value sd(pre_val, tmp, 0); beq(R0, R0, done); - nop(); + delayed()->nop(); bind(runtime); // save the live input values @@ -1692,12 +1692,12 @@ xorr(AT, store_addr, new_val); dsrl(AT, AT, HeapRegion::LogOfHRGrainBytes); beq(AT, R0, done); - nop(); + delayed()->nop(); // crosses regions, storing NULL? beq(new_val, R0, done); - nop(); + delayed()->nop(); // storing region crossing non-NULL, is card already dirty? const Register card_addr = tmp; @@ -1713,13 +1713,13 @@ lb(AT, card_addr, 0); daddiu(AT, AT, -1 * (int)G1SATBCardTableModRefBS::g1_young_card_val()); beq(AT, R0, done); - nop(); + delayed()->nop(); sync(); lb(AT, card_addr, 0); daddiu(AT, AT, -1 * (int)(int)CardTableModRefBS::dirty_card_val()); beq(AT, R0, done); - nop(); + delayed()->nop(); // storing a region crossing, non-NULL oop, card is clean. @@ -1729,7 +1729,7 @@ lw(AT, queue_index); beq(AT, R0, runtime); - nop(); + delayed()->nop(); daddiu(AT, AT, -1 * wordSize); sw(AT, queue_index); ld(tmp2, buffer); @@ -1743,7 +1743,7 @@ sw(card_addr, tmp2, 0); #endif beq(R0, R0, done); - nop(); + delayed()->nop(); bind(runtime); // save the live input values @@ -4031,10 +4031,10 @@ if (peel) { beq(intf_klass, method_result, found_method); - nop(); + delayed()->nop(); } else { bne(intf_klass, method_result, search); - nop(); + delayed()->nop(); // (invert the test to fall through to found_method...) } @@ -4046,7 +4046,7 @@ // the receiver class doesn't implement the interface, and wasn't the // same as when the caller was compiled. beq(method_result, R0, L_no_such_interface); - nop(); + delayed()->nop(); daddiu(scan_temp, scan_temp, scan_step); } diff -r 239e32ede77d -r cecfc245b19a src/cpu/mips/vm/methodHandles_mips.cpp --- a/src/cpu/mips/vm/methodHandles_mips.cpp Mon Jun 11 17:42:16 2018 +0800 +++ b/src/cpu/mips/vm/methodHandles_mips.cpp Tue Jun 12 13:58:17 2018 +0800 @@ -71,20 +71,20 @@ BLOCK_COMMENT("verify_klass {"); __ verify_oop(obj); __ beq(obj, R0, L_bad); - __ nop(); + __ delayed()->nop(); __ push(temp); //if (temp2 != noreg) __ push(temp2); #define UNPUSH { __ pop(temp); } __ load_klass(temp, obj); __ li(AT, (long)&klass_addr); __ ld(AT, AT, 0); __ beq(temp, AT, L_ok); - __ nop(); + __ delayed()->nop(); intptr_t super_check_offset = klass->super_check_offset(); __ ld(temp, Address(temp, super_check_offset)); __ li(AT, (long)&klass_addr); __ ld(AT, AT, 0); __ beq(AT, temp, L_ok); - __ nop(); + __ delayed()->nop(); UNPUSH; __ bind(L_bad); __ STOP(error_message); @@ -103,7 +103,7 @@ __ andr(temp, temp, AT); __ move(AT, ref_kind); __ beq(temp, AT, L); - __ nop(); + __ delayed()->nop(); { char* buf = NEW_C_HEAP_ARRAY(char, 100, mtInternal); jio_snprintf(buf, 100, "verify_ref_kind expected %x", ref_kind); if (ref_kind == JVM_REF_invokeVirtual || @@ -124,7 +124,7 @@ Label L_no_such_method; __ beq(method, R0, L_no_such_method); - __ nop(); + __ delayed()->nop(); __ verify_method_ptr(method); @@ -143,10 +143,10 @@ // Is a cmpl faster? __ lbu(AT, rthread, in_bytes(JavaThread::interp_only_mode_offset())); __ beq(AT, R0, run_compiled_code); - __ nop(); + __ delayed()->nop(); __ ld(T9, method, in_bytes(Method::interpreter_entry_offset())); __ jr(T9); - __ nop(); + __ delayed()->nop(); __ BIND(run_compiled_code); } @@ -154,12 +154,12 @@ Method::from_interpreted_offset(); __ ld(T9, method, in_bytes(entry_offset)); __ jr(T9); - __ nop(); + __ delayed()->nop(); __ bind(L_no_such_method); address wrong_method = StubRoutines::throw_AbstractMethodError_entry(); __ jmp(wrong_method, relocInfo::runtime_call_type); - __ nop(); + __ delayed()->nop(); } void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm, @@ -195,7 +195,7 @@ Address recv_addr = __ argument_address(temp2, -1); __ ld(AT, recv_addr); __ beq(recv, AT, L); - __ nop(); + __ delayed()->nop(); recv_addr = __ argument_address(temp2, -1); __ ld(V0, recv_addr); @@ -242,7 +242,7 @@ guarantee(Assembler::is_simm16(iid), "Oops, iid is not simm16! Change the instructions."); __ addiu(AT, AT, -1 * (int) iid); __ beq(AT, R0, L); - __ nop(); + __ delayed()->nop(); if (iid == vmIntrinsics::_linkToVirtual || iid == vmIntrinsics::_linkToSpecial) { // could do this for all kinds, but would explode assembly code size @@ -419,7 +419,7 @@ Label L_index_ok; __ slt(AT, R0, temp2_index); __ bne(AT, R0, L_index_ok); - __ nop(); + __ delayed()->nop(); __ STOP("no virtual index"); __ BIND(L_index_ok); } @@ -451,7 +451,7 @@ Label L; __ slt(AT, rbx_index, R0); __ beq(AT, R0, L); - __ nop(); + __ delayed()->nop(); __ STOP("invalid vtable index for MH.invokeInterface"); __ bind(L); } @@ -484,7 +484,7 @@ __ bind(L_incompatible_class_change_error); address icce_entry= StubRoutines::throw_IncompatibleClassChangeError_entry(); __ jmp(icce_entry, relocInfo::runtime_call_type); - __ nop(); + __ delayed()->nop(); } } } diff -r 239e32ede77d -r cecfc245b19a src/cpu/mips/vm/mips_64.ad --- a/src/cpu/mips/vm/mips_64.ad Mon Jun 11 17:42:16 2018 +0800 +++ b/src/cpu/mips/vm/mips_64.ad Tue Jun 12 13:58:17 2018 +0800 @@ -1522,7 +1522,7 @@ Register iCache = as_Register(ic_reg); __ load_klass(T9, receiver); __ beq(T9, iCache, L); - __ nop(); + __ delayed()->nop(); __ relocate(relocInfo::runtime_call_type); __ patchable_jump((address)SharedRuntime::get_ic_miss_stub()); @@ -3362,7 +3362,7 @@ /* 2013/7/22 Jin: Refer to X86_64's RDI */ __ move(result, 0); __ b(done); - __ nop(); + __ delayed()->nop(); __ bind(miss); __ move(result, 1); @@ -6545,7 +6545,7 @@ __ move(S3, oop); __ jr(target); - __ nop(); + __ delayed()->nop(); %} ins_pipe( pipe_jump ); @@ -7583,7 +7583,7 @@ __ b(L); else __ b(int(0)); - __ nop(); + __ delayed()->nop(); %} ins_pipe( pipe_jump ); @@ -7648,7 +7648,7 @@ default: Unimplemented(); } - __ nop(); + __ delayed()->nop(); %} ins_pipe( pipe_jump ); ins_pc_relative(1); @@ -7713,7 +7713,7 @@ default: Unimplemented(); } - __ nop(); + __ delayed()->nop(); %} ins_pipe( pipe_jump ); ins_pc_relative(1); @@ -7747,7 +7747,7 @@ default: Unimplemented(); } - __ nop(); + __ delayed()->nop(); %} ins_pipe( pipe_jump ); @@ -7785,7 +7785,7 @@ default: Unimplemented(); } - __ nop(); + __ delayed()->nop(); %} ins_pc_relative(1); @@ -7824,7 +7824,7 @@ default: Unimplemented(); } - __ nop(); + __ delayed()->nop(); %} ins_pc_relative(1); @@ -7891,7 +7891,7 @@ default: Unimplemented(); } - __ nop(); + __ delayed()->nop(); %} ins_pc_relative(1); @@ -7928,7 +7928,7 @@ default: Unimplemented(); } - __ nop(); + __ delayed()->nop(); %} //TODO: pipe_branchP or create pipe_branchN LEE ins_pc_relative(1); @@ -7993,7 +7993,7 @@ default: Unimplemented(); } - __ nop(); + __ delayed()->nop(); %} ins_pc_relative(1); ins_pipe( pipe_alu_branch ); @@ -8055,7 +8055,7 @@ default: Unimplemented(); } - __ nop(); + __ delayed()->nop(); %} ins_pc_relative(1); @@ -8120,7 +8120,7 @@ default: Unimplemented(); } - __ nop(); + __ delayed()->nop(); %} ins_pc_relative(1); @@ -8183,7 +8183,7 @@ default: Unimplemented(); } - __ nop(); + __ delayed()->nop(); %} ins_pc_relative(1); @@ -8242,7 +8242,7 @@ default: Unimplemented(); } - __ nop(); + __ delayed()->nop(); %} ins_pc_relative(1); @@ -8308,7 +8308,7 @@ default: Unimplemented(); } - __ nop(); + __ delayed()->nop(); %} ins_pc_relative(1); @@ -8363,7 +8363,7 @@ default: Unimplemented(); } - __ nop(); + __ delayed()->nop(); %} ins_pc_relative(1); @@ -8432,7 +8432,7 @@ default: Unimplemented(); } - __ nop(); + __ delayed()->nop(); %} ins_pc_relative(1); @@ -8655,7 +8655,7 @@ default: Unimplemented(); } - __ nop(); + __ delayed()->nop(); %} @@ -8723,7 +8723,7 @@ default: Unimplemented(); } - __ nop(); + __ delayed()->nop(); %} ins_pc_relative(1); @@ -8789,7 +8789,7 @@ default: Unimplemented(); } - __ nop(); + __ delayed()->nop(); %} ins_pc_relative(1); @@ -10277,41 +10277,41 @@ switch(flag) { case 0x01: //equal __ bne(op1, op2, L); - __ nop(); + __ delayed()->nop(); __ mov_s(dst, src); __ bind(L); break; case 0x02: //not_equal __ beq(op1, op2, L); - __ nop(); + __ delayed()->nop(); __ mov_s(dst, src); __ bind(L); break; case 0x03: //great __ slt(AT, op2, op1); __ beq(AT, R0, L); - __ nop(); + __ delayed()->nop(); __ mov_s(dst, src); __ bind(L); break; case 0x04: //great_equal __ slt(AT, op1, op2); __ bne(AT, R0, L); - __ nop(); + __ delayed()->nop(); __ mov_s(dst, src); __ bind(L); break; case 0x05: //less __ slt(AT, op1, op2); __ beq(AT, R0, L); - __ nop(); + __ delayed()->nop(); __ mov_s(dst, src); __ bind(L); break; case 0x06: //less_equal __ slt(AT, op2, op1); __ bne(AT, R0, L); - __ nop(); + __ delayed()->nop(); __ mov_s(dst, src); __ bind(L); break; @@ -10342,41 +10342,41 @@ switch(flag) { case 0x01: //equal __ bne(op1, op2, L); - __ nop(); + __ delayed()->nop(); __ mov_d(dst, src); __ bind(L); break; case 0x02: //not_equal __ beq(op1, op2, L); - __ nop(); + __ delayed()->nop(); __ mov_d(dst, src); __ bind(L); break; case 0x03: //great __ slt(AT, op2, op1); __ beq(AT, R0, L); - __ nop(); + __ delayed()->nop(); __ mov_d(dst, src); __ bind(L); break; case 0x04: //great_equal __ slt(AT, op1, op2); __ bne(AT, R0, L); - __ nop(); + __ delayed()->nop(); __ mov_d(dst, src); __ bind(L); break; case 0x05: //less __ slt(AT, op1, op2); __ beq(AT, R0, L); - __ nop(); + __ delayed()->nop(); __ mov_d(dst, src); __ bind(L); break; case 0x06: //less_equal __ slt(AT, op2, op1); __ bne(AT, R0, L); - __ nop(); + __ delayed()->nop(); __ mov_d(dst, src); __ bind(L); break; @@ -10407,41 +10407,41 @@ switch(flag) { case 0x01: //equal __ bne(op1, op2, L); - __ nop(); + __ delayed()->nop(); __ mov_d(dst, src); __ bind(L); break; case 0x02: //not_equal __ beq(op1, op2, L); - __ nop(); + __ delayed()->nop(); __ mov_d(dst, src); __ bind(L); break; case 0x03: //great __ slt(AT, op2, op1); __ beq(AT, R0, L); - __ nop(); + __ delayed()->nop(); __ mov_d(dst, src); __ bind(L); break; case 0x04: //great_equal __ slt(AT, op1, op2); __ bne(AT, R0, L); - __ nop(); + __ delayed()->nop(); __ mov_d(dst, src); __ bind(L); break; case 0x05: //less __ slt(AT, op1, op2); __ beq(AT, R0, L); - __ nop(); + __ delayed()->nop(); __ mov_d(dst, src); __ bind(L); break; case 0x06: //less_equal __ slt(AT, op2, op1); __ bne(AT, R0, L); - __ nop(); + __ delayed()->nop(); __ mov_d(dst, src); __ bind(L); break; @@ -13106,7 +13106,7 @@ ins_encode %{ __ jr(RA); - __ nop(); + __ delayed()->nop(); %} ins_pipe( pipe_jump ); @@ -13151,7 +13151,7 @@ } __ jr(T9); - __ nop(); + __ delayed()->nop(); %} ins_pipe(pipe_jump); @@ -13185,7 +13185,7 @@ __ move(exception_oop, oop); __ jr(target); - __ nop(); + __ delayed()->nop(); %} ins_pipe( pipe_jump ); %} diff -r 239e32ede77d -r cecfc245b19a src/cpu/mips/vm/nativeInst_mips.cpp --- a/src/cpu/mips/vm/nativeInst_mips.cpp Mon Jun 11 17:42:16 2018 +0800 +++ b/src/cpu/mips/vm/nativeInst_mips.cpp Tue Jun 12 13:58:17 2018 +0800 @@ -1369,7 +1369,7 @@ __ ori(T9, T9, (offset - 8) & 0xffff); __ daddu(T9, T9, RA); __ jr(T9); - __ nop(); + __ delayed()->nop(); } #else __ b(entry); diff -r 239e32ede77d -r cecfc245b19a src/cpu/mips/vm/sharedRuntime_mips_64.cpp --- a/src/cpu/mips/vm/sharedRuntime_mips_64.cpp Mon Jun 11 17:42:16 2018 +0800 +++ b/src/cpu/mips/vm/sharedRuntime_mips_64.cpp Tue Jun 12 13:58:17 2018 +0800 @@ -3770,7 +3770,7 @@ __ st_ptr(R0, thread, in_bytes(JavaThread::vm_result_offset())); __ ld_ptr(V0, thread, in_bytes(Thread::pending_exception_offset())); __ jmp(StubRoutines::forward_exception_entry(), relocInfo::runtime_call_type); - __ delayed() -> nop(); + __ delayed()->nop(); // ------------- // make sure all code is generated masm->flush(); diff -r 239e32ede77d -r cecfc245b19a src/cpu/mips/vm/stubGenerator_mips_64.cpp --- a/src/cpu/mips/vm/stubGenerator_mips_64.cpp Mon Jun 11 17:42:16 2018 +0800 +++ b/src/cpu/mips/vm/stubGenerator_mips_64.cpp Tue Jun 12 13:58:17 2018 +0800 @@ -705,7 +705,7 @@ __ daddiu(count, count, -1); __ slt(AT, count, R0); __ beq(AT, R0, L_loop); - __ nop(); + __ delayed()->nop(); } break; default: @@ -1236,7 +1236,7 @@ __ daddi(tmp3, tmp3, -16); __ daddi(AT, tmp3, -16); __ bgez(AT, l_8); - __ sd(tmp6, tmp2, -8); + __ delayed()->sd(tmp6, tmp2, -8); } __ bind(l_6); @@ -1259,7 +1259,7 @@ __ daddi(tmp3, tmp3, -8); __ daddi(AT, tmp3, -8); __ bgez(AT, l_3); - __ sw(tmp6, tmp2, -4); + __ delayed()->sw(tmp6, tmp2, -4); } __ bind(l_1); @@ -1282,7 +1282,7 @@ __ daddi(tmp3, tmp3, -4); __ daddi(AT, tmp3, -4); __ bgez(AT, l_5); - __ sh(tmp6, tmp2, -2); + __ delayed()->sh(tmp6, tmp2, -2); } // single element __ bind(l_4); diff -r 239e32ede77d -r cecfc245b19a src/cpu/mips/vm/templateInterpreter_mips_64.cpp --- a/src/cpu/mips/vm/templateInterpreter_mips_64.cpp Mon Jun 11 17:42:16 2018 +0800 +++ b/src/cpu/mips/vm/templateInterpreter_mips_64.cpp Tue Jun 12 13:58:17 2018 +0800 @@ -818,7 +818,7 @@ __ ld(V0, SP, 0); __ beq(V0, R0, slow_path); - __ nop(); + __ delayed()->nop(); // Generate the G1 pre-barrier code to log the value of // the referent field in an SATB buffer. diff -r 239e32ede77d -r cecfc245b19a src/cpu/mips/vm/templateTable_mips_64.cpp --- a/src/cpu/mips/vm/templateTable_mips_64.cpp Mon Jun 11 17:42:16 2018 +0800 +++ b/src/cpu/mips/vm/templateTable_mips_64.cpp Tue Jun 12 13:58:17 2018 +0800 @@ -1243,7 +1243,7 @@ Label L_skip; __ andr(AT, T9, AT); __ beq(AT, R0, L_skip); - __ nop(); + __ delayed()->nop(); __ andi(FSR, FSR, 0x1); __ bind(L_skip); @@ -2009,7 +2009,7 @@ Label has_counters; __ ld(AT, T3, in_bytes(Method::method_counters_offset())); // use AT as MDO, TEMP __ bne(AT, R0, has_counters); - __ nop(); + __ delayed()->nop(); __ push(T3); //__ push(A7); __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::build_method_counters), @@ -2018,7 +2018,7 @@ __ pop(T3); __ ld(AT, T3, in_bytes(Method::method_counters_offset())); // use AT as MDO, TEMP __ beq(AT, R0, dispatch); - __ nop(); + __ delayed()->nop(); __ bind(has_counters); // increment back edge counter @@ -2843,7 +2843,7 @@ Label notVolatile; __ beq(scratch, R0, notVolatile); - __ nop(); + __ delayed()->nop(); volatile_barrier(); __ bind(notVolatile); } @@ -3136,7 +3136,7 @@ Label notVolatile; __ beq(scratch, R0, notVolatile); - __ nop(); + __ delayed()->nop(); volatile_barrier(); __ bind(notVolatile); } @@ -3327,7 +3327,7 @@ { Label notVolatile; __ beq(scratch, R0, notVolatile); - __ nop(); + __ delayed()->nop(); volatile_barrier(); __ bind(notVolatile); } @@ -3432,7 +3432,7 @@ Label notVolatile; __ beq(scratch, R0, notVolatile); - __ nop(); + __ delayed()->nop(); volatile_barrier(); __ bind(notVolatile); } @@ -3479,7 +3479,7 @@ { Label notVolatile; __ beq(scratch, R0, notVolatile); - __ nop(); + __ delayed()->nop(); volatile_barrier(); __ bind(notVolatile); } @@ -3529,7 +3529,7 @@ Label notVolatile; __ beq(scratch, R0, notVolatile); - __ nop(); + __ delayed()->nop(); volatile_barrier(); __ bind(notVolatile); } @@ -3575,7 +3575,7 @@ { Label notVolatile; __ beq(scratch, R0, notVolatile); - __ nop(); + __ delayed()->nop(); volatile_barrier(); __ bind(notVolatile); } @@ -3607,7 +3607,7 @@ Label notVolatile; __ beq(scratch, R0, notVolatile); - __ nop(); + __ delayed()->nop(); volatile_barrier(); __ bind(notVolatile); } @@ -3633,7 +3633,7 @@ { Label notVolatile; __ beq(scratch, R0, notVolatile); - __ nop(); + __ delayed()->nop(); volatile_barrier(); __ bind(notVolatile); } @@ -4374,7 +4374,7 @@ // Collect counts on whether this test sees NULLs a lot or not. if (ProfileInterpreter) { __ beq(R0, R0, done); - __ nop(); + __ delayed()->nop(); __ bind(is_null); __ profile_null_seen(T3); } else {