--- 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());