8234321: Call cache flush after generating trampoline.
authorxgong
Wed, 20 Nov 2019 05:58:19 +0000
changeset 59165 2c55c2fc08f5
parent 59164 90e9e7921ae5
child 59166 51673a0b6df0
8234321: Call cache flush after generating trampoline. Reviewed-by: adinn, iklam
src/hotspot/share/interpreter/abstractInterpreter.cpp
src/hotspot/share/runtime/sharedRuntime.cpp
--- a/src/hotspot/share/interpreter/abstractInterpreter.cpp	Thu Nov 21 09:55:12 2019 +0800
+++ b/src/hotspot/share/interpreter/abstractInterpreter.cpp	Wed Nov 20 05:58:19 2019 +0000
@@ -222,6 +222,7 @@
     CodeBuffer buffer(trampoline, (int)(SharedRuntime::trampoline_size()));
     MacroAssembler _masm(&buffer);
     SharedRuntime::generate_trampoline(&_masm, _entry_table[kind]);
+    _masm.flush();
 
     if (PrintInterpreter) {
       Disassembler::decode(buffer.insts_begin(), buffer.insts_end());
--- a/src/hotspot/share/runtime/sharedRuntime.cpp	Thu Nov 21 09:55:12 2019 +0800
+++ b/src/hotspot/share/runtime/sharedRuntime.cpp	Wed Nov 20 05:58:19 2019 +0000
@@ -2626,6 +2626,7 @@
       MacroAssembler _masm(&buffer);
       SharedRuntime::generate_trampoline(&_masm, entry->get_c2i_entry());
       assert(*(int*)trampoline != 0, "Instruction(s) for trampoline must not be encoded as zeros.");
+      _masm.flush();
 
       if (PrintInterpreter) {
         Disassembler::decode(buffer.insts_begin(), buffer.insts_end());