changeset 57003:2c55c2fc08f5

8234321: Call cache flush after generating trampoline. Reviewed-by: adinn, iklam
author xgong
date Wed, 20 Nov 2019 05:58:19 +0000
parents 90e9e7921ae5
children 51673a0b6df0
files src/hotspot/share/interpreter/abstractInterpreter.cpp src/hotspot/share/runtime/sharedRuntime.cpp
diffstat 2 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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());