From 5b19c425fa0915afc4b0132e43695af30fc2802f Mon Sep 17 00:00:00 2001 From: Jiangli Zhou Date: Fri, 3 Jun 2016 17:45:03 -0400 Subject: [PATCH] 8157189: 'iload_w' in shared class is not interpreted correctly Don't rewrite 'iload_w' to 'nofast_iload' in shared class. Reviewed-by: ccheung, hseigel --- hotspot/src/share/vm/memory/metaspaceShared.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/memory/metaspaceShared.cpp b/hotspot/src/share/vm/memory/metaspaceShared.cpp index b975e9e1327..02f025a9630 100644 --- a/hotspot/src/share/vm/memory/metaspaceShared.cpp +++ b/hotspot/src/share/vm/memory/metaspaceShared.cpp @@ -191,7 +191,12 @@ static void rewrite_nofast_bytecode(Method* method) { case Bytecodes::_getfield: *bcs.bcp() = Bytecodes::_nofast_getfield; break; case Bytecodes::_putfield: *bcs.bcp() = Bytecodes::_nofast_putfield; break; case Bytecodes::_aload_0: *bcs.bcp() = Bytecodes::_nofast_aload_0; break; - case Bytecodes::_iload: *bcs.bcp() = Bytecodes::_nofast_iload; break; + case Bytecodes::_iload: { + if (!bcs.is_wide()) { + *bcs.bcp() = Bytecodes::_nofast_iload; + } + break; + } default: break; } }