/hg/release/icedtea7-forest-2.6/hotspot: 20 new changesets
andrew at icedtea.classpath.org
andrew at icedtea.classpath.org
Tue Apr 19 20:45:04 UTC 2016
changeset 3ad8648ae6ce in /hg/release/icedtea7-forest-2.6/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot?cmd=changeset;node=3ad8648ae6ce
author: andrew
date: Mon Apr 18 04:36:55 2016 +0100
Added tag icedtea-2.6.6pre01 for changeset 825fa447453a
changeset e0e34b10218b in /hg/release/icedtea7-forest-2.6/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot?cmd=changeset;node=e0e34b10218b
author: ctornqvi
date: Thu Mar 27 22:36:08 2014 +0100
8007890: [TESTBUG] JcmdWithNMTDisabled.java fails when invoked with NMT explicitly turned on
Summary: Wrapped the test in another layer process creation to avoid NMT being turned on.
Reviewed-by: coleenp, dcubed
changeset eb7d1b18afc0 in /hg/release/icedtea7-forest-2.6/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot?cmd=changeset;node=eb7d1b18afc0
author: kshefov
date: Fri Feb 12 18:15:57 2016 +0300
8059661: Test SoftReference and OOM behavior
Reviewed-by: coffeys
Contributed-by: Alexander Vorobyev <alexander.vorobyev at oracle.com>
changeset e9590a99f8e0 in /hg/release/icedtea7-forest-2.6/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot?cmd=changeset;node=e9590a99f8e0
author: iveresov
date: Tue Feb 17 11:00:18 2015 -0800
8072753: Nondeterministic wrong answer on arithmetic
Summary: Check for overflow when inverting the loop during the counted loop conversion
Reviewed-by: kvn
changeset e4092a1610f6 in /hg/release/icedtea7-forest-2.6/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot?cmd=changeset;node=e4092a1610f6
author: csahu
date: Thu Jan 28 09:41:33 2016 +0000
8073735: [TEST_BUG] compiler/loopopts/CountedLoopProblem.java got OOME
Summary: Ignore OOM in the test
Reviewed-by: kvn
changeset 43009b196480 in /hg/release/icedtea7-forest-2.6/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot?cmd=changeset;node=43009b196480
author: kevinw
date: Wed Apr 13 23:21:07 2016 +0100
8132051: Better byte behavior
Summary: Contains introduction of interp_masm_x86.{c,h}pp from 8026251
Reviewed-by: coleenp, roland
changeset d8f170444bd8 in /hg/release/icedtea7-forest-2.6/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot?cmd=changeset;node=d8f170444bd8
author: kevinw
date: Tue Jan 19 15:35:12 2016 +0000
8147567: InterpreterRuntime::post_field_access not updated for boolean in JDK-8132051
Reviewed-by: coleenp
changeset 1c5c4564204e in /hg/release/icedtea7-forest-2.6/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot?cmd=changeset;node=1c5c4564204e
author: kevinw
date: Wed Apr 13 16:44:33 2016 +0100
8148475: Missing SA Bytecode updates.
Reviewed-by: coleenp
changeset 113e570be392 in /hg/release/icedtea7-forest-2.6/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot?cmd=changeset;node=113e570be392
author: kevinw
date: Wed Feb 10 13:34:14 2016 +0000
8149170: Better byte behavior for native arguments
Summary: Arguments coming from native should be converted to 0=false, 1-255=true
Reviewed-by: coleenp
changeset 2370d9e77455 in /hg/release/icedtea7-forest-2.6/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot?cmd=changeset;node=2370d9e77455
author: kevinw
date: Wed Apr 13 17:26:35 2016 +0100
8149367: PolicyQualifierInfo/index_Ctor JCk test fails with IOE: Invalid encoding for PolicyQualifierInfo
Summary: fix incorrect code
Reviewed-by: kvn, coleenp
changeset 1e698c95d399 in /hg/release/icedtea7-forest-2.6/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot?cmd=changeset;node=1e698c95d399
author: coleenp
date: Sun Feb 21 08:33:59 2016 -0500
8150012: Better byte behavior for reflection
Reviewed-by: kvn, jrose, kevinw, ahgross
changeset 986d0464b2a9 in /hg/release/icedtea7-forest-2.6/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot?cmd=changeset;node=986d0464b2a9
author: aph
date: Thu Apr 14 02:44:12 2016 +0100
8154210: Zero: Better byte behaviour
Summary: Complete support for 8132051 on Zero and fix failure on 64-bit big-endian systems
Reviewed-by: andrew, chrisphi
changeset 3c694533a19c in /hg/release/icedtea7-forest-2.6/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot?cmd=changeset;node=3c694533a19c
author: sgehwolf
date: Fri Jun 12 16:09:45 2015 +0100
8087120: [GCC5] java.lang.StackOverflowError on Zero JVM initialization on non x86 platforms.
Summary: Use __builtin_frame_address(0) rather than returning address of local variable.
Reviewed-by: dholmes
changeset 67b4da0ad88d in /hg/release/icedtea7-forest-2.6/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot?cmd=changeset;node=67b4da0ad88d
author: ysuenaga
date: Fri May 29 22:29:44 2015 +0900
8081475: SystemTap does not work when JDK is compiled with GCC 5
Summary: libjvm.so which is generated by GCC 5 does not have .note.stapsdt section as dtrace was disabled due to incorrect version check
Reviewed-by: dholmes, coleenp
changeset 6e42747134be in /hg/release/icedtea7-forest-2.6/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot?cmd=changeset;node=6e42747134be
author: andrew
date: Fri Apr 15 04:31:10 2016 +0100
Merge
changeset b9b4bc1e05e2 in /hg/release/icedtea7-forest-2.6/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot?cmd=changeset;node=b9b4bc1e05e2
author: andrew
date: Mon Apr 18 04:46:06 2016 +0100
Added tag jdk7u101-b00 for changeset 6e42747134be
changeset 218f6a0c1ace in /hg/release/icedtea7-forest-2.6/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot?cmd=changeset;node=218f6a0c1ace
author: andrew
date: Mon Apr 18 06:49:38 2016 +0100
Merge jdk7u101-b00
changeset 3ed1cf151dda in /hg/release/icedtea7-forest-2.6/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot?cmd=changeset;node=3ed1cf151dda
author: simonis
date: Wed Jan 27 15:01:46 2016 +0100
8148487: PPC64: Better byte behavior
Reviewed-by: goetz, mdoerr
changeset bca222181d07 in /hg/release/icedtea7-forest-2.6/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot?cmd=changeset;node=bca222181d07
author: aph
date: Mon Apr 18 07:12:53 2016 +0100
8154413: AArch64: Better byte behaviour
Summary: Add support for 8132051 on AArch64
Reviewed-by: adinn
changeset 3022a3d80efd in /hg/release/icedtea7-forest-2.6/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot?cmd=changeset;node=3022a3d80efd
author: andrew
date: Tue Apr 19 21:44:54 2016 +0100
PR2938: Fix build of 8148487 backport
Summary: ztos case in templateTable_ppc_64.cpp needs to match other cases in 7
diffstat:
.hgtags | 2 +
agent/src/share/classes/sun/jvm/hotspot/interpreter/Bytecodes.java | 48 +-
src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp | 5 +-
src/cpu/aarch64/vm/interp_masm_aarch64.cpp | 41 ++-
src/cpu/aarch64/vm/interp_masm_aarch64.hpp | 3 +
src/cpu/aarch64/vm/templateTable_aarch64.cpp | 59 +++-
src/cpu/ppc/vm/interp_masm_ppc_64.cpp | 40 ++
src/cpu/ppc/vm/interp_masm_ppc_64.hpp | 2 +
src/cpu/ppc/vm/interpreter_ppc.cpp | 10 +
src/cpu/ppc/vm/templateInterpreter_ppc.cpp | 12 +-
src/cpu/ppc/vm/templateTable_ppc_64.cpp | 61 +++-
src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp | 7 +-
src/cpu/sparc/vm/cppInterpreter_sparc.cpp | 5 +-
src/cpu/sparc/vm/interp_masm_sparc.cpp | 61 +++-
src/cpu/sparc/vm/interp_masm_sparc.hpp | 4 +-
src/cpu/sparc/vm/templateInterpreter_sparc.cpp | 5 +-
src/cpu/sparc/vm/templateTable_sparc.cpp | 67 ++++-
src/cpu/x86/vm/bytecodeInterpreter_x86.cpp | 7 +-
src/cpu/x86/vm/c1_LIRGenerator_x86.cpp | 7 +-
src/cpu/x86/vm/cppInterpreter_x86.cpp | 9 +-
src/cpu/x86/vm/interp_masm_x86.cpp | 76 +++++
src/cpu/x86/vm/interp_masm_x86.hpp | 49 +++
src/cpu/x86/vm/interp_masm_x86_32.cpp | 7 +-
src/cpu/x86/vm/interp_masm_x86_32.hpp | 14 -
src/cpu/x86/vm/interp_masm_x86_64.cpp | 7 +-
src/cpu/x86/vm/interp_masm_x86_64.hpp | 13 -
src/cpu/x86/vm/register_definitions_x86.cpp | 7 +-
src/cpu/x86/vm/templateInterpreter_x86_32.cpp | 10 +-
src/cpu/x86/vm/templateInterpreter_x86_64.cpp | 11 +-
src/cpu/x86/vm/templateTable_x86_32.cpp | 70 ++++-
src/cpu/x86/vm/templateTable_x86_64.cpp | 59 +++-
src/cpu/x86/vm/vtableStubs_x86_32.cpp | 2 +-
src/cpu/x86/vm/vtableStubs_x86_64.cpp | 2 +-
src/cpu/zero/vm/cppInterpreter_zero.cpp | 65 +++-
src/share/vm/c1/c1_Canonicalizer.cpp | 5 +-
src/share/vm/c1/c1_GraphBuilder.cpp | 61 +++-
src/share/vm/c1/c1_Instruction.hpp | 9 +-
src/share/vm/c1/c1_LIRGenerator.cpp | 25 +-
src/share/vm/c1/c1_LIRGenerator.hpp | 3 +-
src/share/vm/classfile/classFileParser.cpp | 8 +-
src/share/vm/interpreter/abstractInterpreter.hpp | 7 +-
src/share/vm/interpreter/bytecodeInterpreter.cpp | 32 +-
src/share/vm/interpreter/bytecodes.cpp | 3 +-
src/share/vm/interpreter/bytecodes.hpp | 3 +-
src/share/vm/interpreter/interpreterRuntime.cpp | 6 +-
src/share/vm/interpreter/templateInterpreter.cpp | 28 +-
src/share/vm/interpreter/templateInterpreter.hpp | 4 +-
src/share/vm/interpreter/templateTable.cpp | 3 +-
src/share/vm/interpreter/templateTable.hpp | 7 +-
src/share/vm/oops/constMethodKlass.cpp | 3 +-
src/share/vm/oops/constMethodOop.hpp | 7 +-
src/share/vm/oops/cpCacheOop.hpp | 27 +-
src/share/vm/oops/klass.hpp | 17 +-
src/share/vm/oops/methodOop.cpp | 4 +-
src/share/vm/oops/oop.inline.hpp | 6 +-
src/share/vm/oops/typeArrayOop.hpp | 2 +-
src/share/vm/opto/loopnode.cpp | 13 +
src/share/vm/opto/memnode.cpp | 4 +-
src/share/vm/opto/parse1.cpp | 37 ++-
src/share/vm/opto/parse2.cpp | 8 +-
src/share/vm/opto/type.cpp | 10 +-
src/share/vm/prims/jni.cpp | 30 +-
src/share/vm/prims/jvmtiEnvBase.cpp | 4 +-
src/share/vm/prims/jvmtiExport.cpp | 4 +-
src/share/vm/prims/unsafe.cpp | 15 +-
src/share/vm/runtime/deoptimization.cpp | 34 +-
src/share/vm/runtime/reflection.cpp | 4 +-
src/share/vm/utilities/globalDefinitions.hpp | 23 +-
test/compiler/loopopts/CountedLoopProblem.java | 58 +++
test/gc/TestSoftReferencesBehaviorOnOOME.java | 146 ++++++++++
test/runtime/NMT/JcmdWithNMTDisabled.java | 26 +-
71 files changed, 1286 insertions(+), 247 deletions(-)
diffs (truncated from 3307 to 500 lines):
diff -r 825fa447453a -r 3022a3d80efd .hgtags
--- a/.hgtags Wed Apr 06 18:30:45 2016 +0100
+++ b/.hgtags Tue Apr 19 21:44:54 2016 +0100
@@ -888,3 +888,5 @@
19d919ae5506a750e3a0bcc6bd176c66b7e1e65d icedtea-2.6.4
631da593499ee184ea8efb2bc5491e0d99ac636d jdk7u99-b00
04d7046d2d41ae18c762fbdad7e114fdd55e2282 icedtea-2.6.5
+825fa447453ad85b3a6f11f87c5147b8b78fb3ab icedtea-2.6.6pre01
+6e42747134be8a4a366d337da1fc84a847ad8381 jdk7u101-b00
diff -r 825fa447453a -r 3022a3d80efd agent/src/share/classes/sun/jvm/hotspot/interpreter/Bytecodes.java
--- a/agent/src/share/classes/sun/jvm/hotspot/interpreter/Bytecodes.java Wed Apr 06 18:30:45 2016 +0100
+++ b/agent/src/share/classes/sun/jvm/hotspot/interpreter/Bytecodes.java Tue Apr 19 21:44:54 2016 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -253,29 +253,30 @@
public static final int _fast_sgetfield = 210;
public static final int _fast_aputfield = 211;
public static final int _fast_bputfield = 212;
- public static final int _fast_cputfield = 213;
- public static final int _fast_dputfield = 214;
- public static final int _fast_fputfield = 215;
- public static final int _fast_iputfield = 216;
- public static final int _fast_lputfield = 217;
- public static final int _fast_sputfield = 218;
- public static final int _fast_aload_0 = 219;
- public static final int _fast_iaccess_0 = 220;
- public static final int _fast_aaccess_0 = 221;
- public static final int _fast_faccess_0 = 222;
- public static final int _fast_iload = 223;
- public static final int _fast_iload2 = 224;
- public static final int _fast_icaload = 225;
- public static final int _fast_invokevfinal = 226;
- public static final int _fast_linearswitch = 227;
- public static final int _fast_binaryswitch = 228;
- public static final int _fast_aldc = 229;
- public static final int _fast_aldc_w = 230;
- public static final int _return_register_finalizer = 231;
- public static final int _invokehandle = 232;
- public static final int _shouldnotreachhere = 233; // For debugging
+ public static final int _fast_zputfield = 213;
+ public static final int _fast_cputfield = 214;
+ public static final int _fast_dputfield = 215;
+ public static final int _fast_fputfield = 216;
+ public static final int _fast_iputfield = 217;
+ public static final int _fast_lputfield = 218;
+ public static final int _fast_sputfield = 219;
+ public static final int _fast_aload_0 = 220;
+ public static final int _fast_iaccess_0 = 221;
+ public static final int _fast_aaccess_0 = 222;
+ public static final int _fast_faccess_0 = 223;
+ public static final int _fast_iload = 224;
+ public static final int _fast_iload2 = 225;
+ public static final int _fast_icaload = 226;
+ public static final int _fast_invokevfinal = 227;
+ public static final int _fast_linearswitch = 228;
+ public static final int _fast_binaryswitch = 229;
+ public static final int _fast_aldc = 230;
+ public static final int _fast_aldc_w = 231;
+ public static final int _return_register_finalizer = 232;
+ public static final int _invokehandle = 233;
+ public static final int _shouldnotreachhere = 234; // For debugging
- public static final int number_of_codes = 234;
+ public static final int number_of_codes = 235;
// Flag bits derived from format strings, can_trap, can_rewrite, etc.:
// semantic flags:
@@ -775,6 +776,7 @@
def(_fast_aputfield , "fast_aputfield" , "bJJ" , null , BasicType.getTObject() , 0, true , _putfield );
def(_fast_bputfield , "fast_bputfield" , "bJJ" , null , BasicType.getTInt() , 0, true , _putfield );
+ def(_fast_zputfield , "fast_zputfield" , "bJJ" , null , BasicType.getTInt() , 0, true , _putfield );
def(_fast_cputfield , "fast_cputfield" , "bJJ" , null , BasicType.getTChar() , 0, true , _putfield );
def(_fast_dputfield , "fast_dputfield" , "bJJ" , null , BasicType.getTDouble() , 0, true , _putfield );
def(_fast_fputfield , "fast_fputfield" , "bJJ" , null , BasicType.getTFloat() , 0, true , _putfield );
diff -r 825fa447453a -r 3022a3d80efd src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp
--- a/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp Wed Apr 06 18:30:45 2016 +0100
+++ b/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp Tue Apr 19 21:44:54 2016 +0100
@@ -339,7 +339,7 @@
length.load_item();
}
}
- if (needs_store_check) {
+ if (needs_store_check || x->check_boolean()) {
value.load_item();
} else {
value.load_for_store(x->elt_type());
@@ -388,7 +388,8 @@
// Seems to be a precise
post_barrier(LIR_OprFact::address(array_addr), value.result());
} else {
- __ move(value.result(), array_addr, null_check_info);
+ LIR_Opr result = maybe_mask_boolean(x, array.result(), value.result(), null_check_info);
+ __ move(result, array_addr, null_check_info);
}
}
diff -r 825fa447453a -r 3022a3d80efd src/cpu/aarch64/vm/interp_masm_aarch64.cpp
--- a/src/cpu/aarch64/vm/interp_masm_aarch64.cpp Wed Apr 06 18:30:45 2016 +0100
+++ b/src/cpu/aarch64/vm/interp_masm_aarch64.cpp Tue Apr 19 21:44:54 2016 +0100
@@ -52,7 +52,43 @@
#endif
-// Implementation of InterpreterMacroAssembler
+void InterpreterMacroAssembler::narrow(Register result) {
+
+ // Get method->_constMethod->_result_type
+ ldr(rscratch1, Address(rfp, frame::interpreter_frame_method_offset * wordSize));
+ ldr(rscratch1, Address(rscratch1, methodOopDesc::const_offset()));
+ ldrb(rscratch1, Address(rscratch1, constMethodOopDesc::result_type_offset()));
+
+ Label done, notBool, notByte, notChar;
+
+ // common case first
+ cmpw(rscratch1, T_INT);
+ br(Assembler::EQ, done);
+
+ // mask integer result to narrower return type.
+ cmpw(rscratch1, T_BOOLEAN);
+ br(Assembler::NE, notBool);
+ andw(result, result, 0x1);
+ b(done);
+
+ bind(notBool);
+ cmpw(rscratch1, T_BYTE);
+ br(Assembler::NE, notByte);
+ sbfx(result, result, 0, 8);
+ b(done);
+
+ bind(notByte);
+ cmpw(rscratch1, T_CHAR);
+ br(Assembler::NE, notChar);
+ ubfx(result, result, 0, 16); // truncate upper 16 bits
+ b(done);
+
+ bind(notChar);
+ sbfx(result, result, 0, 16); // sign-extend short
+
+ // Nothing to do for T_INT
+ bind(done);
+}
#ifndef CC_INTERP
@@ -90,6 +126,7 @@
verify_oop(r0, state); break;
case ltos: ldr(r0, val_addr); break;
case btos: // fall through
+ case ztos: // fall through
case ctos: // fall through
case stos: // fall through
case itos: ldrw(r0, val_addr); break;
@@ -293,6 +330,7 @@
switch (state) {
case atos: pop_ptr(); break;
case btos:
+ case ztos:
case ctos:
case stos:
case itos: pop_i(); break;
@@ -310,6 +348,7 @@
switch (state) {
case atos: push_ptr(); break;
case btos:
+ case ztos:
case ctos:
case stos:
case itos: push_i(); break;
diff -r 825fa447453a -r 3022a3d80efd src/cpu/aarch64/vm/interp_masm_aarch64.hpp
--- a/src/cpu/aarch64/vm/interp_masm_aarch64.hpp Wed Apr 06 18:30:45 2016 +0100
+++ b/src/cpu/aarch64/vm/interp_masm_aarch64.hpp Tue Apr 19 21:44:54 2016 +0100
@@ -244,6 +244,9 @@
void update_mdp_by_constant(Register mdp_in, int constant);
void update_mdp_for_ret(Register return_bci);
+ // narrow int return value
+ void narrow(Register result);
+
void profile_taken_branch(Register mdp, Register bumped_count);
void profile_not_taken_branch(Register mdp);
void profile_call(Register mdp);
diff -r 825fa447453a -r 3022a3d80efd src/cpu/aarch64/vm/templateTable_aarch64.cpp
--- a/src/cpu/aarch64/vm/templateTable_aarch64.cpp Wed Apr 06 18:30:45 2016 +0100
+++ b/src/cpu/aarch64/vm/templateTable_aarch64.cpp Tue Apr 19 21:44:54 2016 +0100
@@ -232,6 +232,7 @@
switch (bc) {
case Bytecodes::_fast_aputfield:
case Bytecodes::_fast_bputfield:
+ case Bytecodes::_fast_zputfield:
case Bytecodes::_fast_cputfield:
case Bytecodes::_fast_dputfield:
case Bytecodes::_fast_fputfield:
@@ -1108,6 +1109,18 @@
// r1: index
// r3: array
index_check(r3, r1); // prefer index in r1
+
+ // Need to check whether array is boolean or byte
+ // since both types share the bastore bytecode.
+ __ load_klass(r2, r3);
+ __ ldrw(r2, Address(r2, Klass::layout_helper_offset()));
+ int diffbit = Klass::layout_helper_boolean_diffbit();
+ __ andw(rscratch1, r2, diffbit);
+ Label L_skip;
+ __ cbzw(rscratch1, L_skip);
+ __ andw(r0, r0, 1); // if it is a T_BOOLEAN array, mask the stored value to 0/1
+ __ bind(L_skip);
+
__ lea(rscratch1, Address(r3, r1, Address::uxtw(0)));
__ strb(r0, Address(rscratch1,
arrayOopDesc::base_offset_in_bytes(T_BYTE)));
@@ -2204,6 +2217,13 @@
if (_desc->bytecode() == Bytecodes::_return)
__ membar(MacroAssembler::StoreStore);
+ // Narrow result if state is itos but result type is smaller.
+ // Need to narrow in the return bytecode rather than in generate_return_entry
+ // since compiled code callers expect the result to already be narrowed.
+ if (state == itos) {
+ __ narrow(r0);
+ }
+
__ remove_activation(state);
__ ret(lr);
}
@@ -2443,7 +2463,7 @@
const Address field(obj, off);
- Label Done, notByte, notInt, notShort, notChar,
+ Label Done, notByte, notBool, notInt, notShort, notChar,
notLong, notFloat, notObj, notDouble;
// x86 uses a shift and mask or wings it with a shift plus assert
@@ -2463,6 +2483,20 @@
__ b(Done);
__ bind(notByte);
+ __ cmp(flags, ztos);
+ __ br(Assembler::NE, notBool);
+
+ // ztos (same code as btos)
+ __ ldrsb(r0, field);
+ __ push(ztos);
+ // Rewrite bytecode to be faster
+ if (!is_static) {
+ // use btos rewriting, no truncating to t/f bit is needed for getfield.
+ patch_bytecode(Bytecodes::_fast_bgetfield, bc, r1);
+ }
+ __ b(Done);
+
+ __ bind(notBool);
__ cmp(flags, atos);
__ br(Assembler::NE, notObj);
// atos
@@ -2655,7 +2689,7 @@
// field address
const Address field(obj, off);
- Label notByte, notInt, notShort, notChar,
+ Label notByte, notBool, notInt, notShort, notChar,
notLong, notFloat, notObj, notDouble;
// x86 uses a shift and mask or wings it with a shift plus assert
@@ -2677,6 +2711,22 @@
}
__ bind(notByte);
+ __ cmp(flags, ztos);
+ __ br(Assembler::NE, notBool);
+
+ // ztos
+ {
+ __ pop(ztos);
+ if (!is_static) pop_and_check_object(obj);
+ __ andw(r0, r0, 0x1);
+ __ strb(r0, field);
+ if (!is_static) {
+ patch_bytecode(Bytecodes::_fast_zputfield, bc, r1, true, byte_no);
+ }
+ __ b(Done);
+ }
+
+ __ bind(notBool);
__ cmp(flags, atos);
__ br(Assembler::NE, notObj);
@@ -2827,6 +2877,7 @@
switch (bytecode()) { // load values into the jvalue object
case Bytecodes::_fast_aputfield: __ push_ptr(r0); break;
case Bytecodes::_fast_bputfield: // fall through
+ case Bytecodes::_fast_zputfield: // fall through
case Bytecodes::_fast_sputfield: // fall through
case Bytecodes::_fast_cputfield: // fall through
case Bytecodes::_fast_iputfield: __ push_i(r0); break;
@@ -2852,6 +2903,7 @@
switch (bytecode()) { // restore tos values
case Bytecodes::_fast_aputfield: __ pop_ptr(r0); break;
case Bytecodes::_fast_bputfield: // fall through
+ case Bytecodes::_fast_zputfield: // fall through
case Bytecodes::_fast_sputfield: // fall through
case Bytecodes::_fast_cputfield: // fall through
case Bytecodes::_fast_iputfield: __ pop_i(r0); break;
@@ -2907,6 +2959,9 @@
case Bytecodes::_fast_iputfield:
__ strw(r0, field);
break;
+ case Bytecodes::_fast_zputfield:
+ __ andw(r0, r0, 0x1); // boolean is true if LSB is 1
+ // fall through to bputfield
case Bytecodes::_fast_bputfield:
__ strb(r0, field);
break;
diff -r 825fa447453a -r 3022a3d80efd src/cpu/ppc/vm/interp_masm_ppc_64.cpp
--- a/src/cpu/ppc/vm/interp_masm_ppc_64.cpp Wed Apr 06 18:30:45 2016 +0100
+++ b/src/cpu/ppc/vm/interp_masm_ppc_64.cpp Tue Apr 19 21:44:54 2016 +0100
@@ -175,6 +175,7 @@
case ltos: ld(R17_tos, in_bytes(JvmtiThreadState::earlyret_value_offset()), RjvmtiState);
break;
case btos: // fall through
+ case ztos: // fall through
case ctos: // fall through
case stos: // fall through
case itos: lwz(R17_tos, in_bytes(JvmtiThreadState::earlyret_value_offset()), RjvmtiState);
@@ -303,6 +304,7 @@
switch (state) {
case atos: push_ptr(); break;
case btos:
+ case ztos:
case ctos:
case stos:
case itos: push_i(); break;
@@ -318,6 +320,7 @@
switch (state) {
case atos: pop_ptr(); break;
case btos:
+ case ztos:
case ctos:
case stos:
case itos: pop_i(); break;
@@ -750,6 +753,43 @@
stdux(Rscratch2, R1_SP, Rscratch1); // atomically set *(SP = top_frame_sp) = **SP
}
+void InterpreterMacroAssembler::narrow(Register result) {
+ Register ret_type = R11_scratch1;
+ ld(R11_scratch1, in_bytes(methodOopDesc::const_offset()), R19_method);
+ lbz(ret_type, in_bytes(constMethodOopDesc::result_type_offset()), R11_scratch1);
+
+ Label notBool, notByte, notChar, done;
+
+ // common case first
+ cmpwi(CCR0, ret_type, T_INT);
+ beq(CCR0, done);
+
+ cmpwi(CCR0, ret_type, T_BOOLEAN);
+ bne(CCR0, notBool);
+ andi(result, result, 0x1);
+ b(done);
+
+ bind(notBool);
+ cmpwi(CCR0, ret_type, T_BYTE);
+ bne(CCR0, notByte);
+ extsb(result, result);
+ b(done);
+
+ bind(notByte);
+ cmpwi(CCR0, ret_type, T_CHAR);
+ bne(CCR0, notChar);
+ andi(result, result, 0xffff);
+ b(done);
+
+ bind(notChar);
+ // cmpwi(CCR0, ret_type, T_SHORT); // all that's left
+ // bne(CCR0, done);
+ extsh(result, result);
+
+ // Nothing to do for T_INT
+ bind(done);
+}
+
// Remove activation.
//
// Unlock the receiver if this is a synchronized method.
diff -r 825fa447453a -r 3022a3d80efd src/cpu/ppc/vm/interp_masm_ppc_64.hpp
--- a/src/cpu/ppc/vm/interp_masm_ppc_64.hpp Wed Apr 06 18:30:45 2016 +0100
+++ b/src/cpu/ppc/vm/interp_masm_ppc_64.hpp Tue Apr 19 21:44:54 2016 +0100
@@ -149,6 +149,8 @@
void get_cpool_and_tags(Register Rcpool, Register Rtags);
void is_a(Label& L);
+ void narrow(Register result);
+
// Java Call Helpers
void call_from_interpreter(Register Rtarget_method, Register Rret_addr, Register Rscratch1, Register Rscratch2);
diff -r 825fa447453a -r 3022a3d80efd src/cpu/ppc/vm/interpreter_ppc.cpp
--- a/src/cpu/ppc/vm/interpreter_ppc.cpp Wed Apr 06 18:30:45 2016 +0100
+++ b/src/cpu/ppc/vm/interpreter_ppc.cpp Tue Apr 19 21:44:54 2016 +0100
@@ -656,6 +656,16 @@
__ blr();
}
+ if (branch_table[ztos] == 0) { // generate only once
+ __ align(32, 28, 28); // align load
+ __ fence(); // volatile entry point (one instruction before non-volatile_entry point)
+ branch_table[ztos] = __ pc(); // non-volatile_entry point
+ __ lbzx(R3_RET, Rclass_or_obj, Roffset);
+ __ extsb(R3_RET, R3_RET);
+ __ beq(CCR6, Lacquire);
+ __ blr();
+ }
+
if (branch_table[ctos] == 0) { // generate only once
__ align(32, 28, 28); // align load
__ fence(); // volatile entry point (one instruction before non-volatile_entry point)
diff -r 825fa447453a -r 3022a3d80efd src/cpu/ppc/vm/templateInterpreter_ppc.cpp
--- a/src/cpu/ppc/vm/templateInterpreter_ppc.cpp Wed Apr 06 18:30:45 2016 +0100
+++ b/src/cpu/ppc/vm/templateInterpreter_ppc.cpp Tue Apr 19 21:44:54 2016 +0100
@@ -157,6 +157,7 @@
switch (state) {
case ltos:
case btos:
+ case ztos:
case ctos:
case stos:
case atos:
@@ -216,6 +217,7 @@
switch (state) {
case ltos:
case btos:
+ case ztos:
case ctos:
case stos:
case atos:
@@ -1661,12 +1663,14 @@
// Copied from TemplateTable::_return.
// Restoration of lr done by remove_activation.
switch (state) {
+ // Narrow result if state is itos but result type is smaller.
+ case itos: __ narrow(R17_tos); /* fall through */
case ltos:
case btos:
+ case ztos:
case ctos:
case stos:
- case atos:
- case itos: __ mr(R3_RET, R17_tos); break;
+ case atos: __ mr(R3_RET, R17_tos); break;
case ftos:
case dtos: __ fmr(F1_RET, F15_ftos); break;
case vtos: // This might be a constructor. Final fields (and volatile fields on PPC64) need
@@ -1736,6 +1740,10 @@
bname = "trace_code_btos {";
tsize = 2;
break;
+ case ztos:
+ bname = "trace_code_ztos {";
+ tsize = 2;
+ break;
case ctos:
bname = "trace_code_ctos {";
tsize = 2;
diff -r 825fa447453a -r 3022a3d80efd src/cpu/ppc/vm/templateTable_ppc_64.cpp
--- a/src/cpu/ppc/vm/templateTable_ppc_64.cpp Wed Apr 06 18:30:45 2016 +0100
+++ b/src/cpu/ppc/vm/templateTable_ppc_64.cpp Tue Apr 19 21:44:54 2016 +0100
@@ -175,6 +175,7 @@
switch (new_bc) {
case Bytecodes::_fast_aputfield:
case Bytecodes::_fast_bputfield:
+ case Bytecodes::_fast_zputfield:
case Bytecodes::_fast_cputfield:
case Bytecodes::_fast_dputfield:
case Bytecodes::_fast_fputfield:
@@ -1011,9 +1012,21 @@
Rarray = R12_scratch2,
Rscratch = R3_ARG1;
__ pop_i(Rindex);
+ __ pop_ptr(Rarray);
// tos: val
- // Rarray: array ptr (popped by index_check)
- __ index_check(Rarray, Rindex, 0, Rscratch, Rarray);
+
+ // Need to check whether array is boolean or byte
+ // since both types share the bastore bytecode.
+ __ load_klass(Rscratch, Rarray);
+ __ lwz(Rscratch, in_bytes(Klass::layout_helper_offset()), Rscratch);
+ int diffbit = exact_log2(Klass::layout_helper_boolean_diffbit());
+ __ testbitdi(CCR0, R0, Rscratch, diffbit);
+ Label L_skip;
+ __ bfalse(CCR0, L_skip);
+ __ andi(R17_tos, R17_tos, 1); // if it is a T_BOOLEAN array, mask the stored value to 0/1
+ __ bind(L_skip);
+
More information about the distro-pkg-dev
mailing list