# HG changeset patch # User dcubed # Date 1366990824 25200 # Node ID 3c9b7ef92c61c31e7edd61ced55b05f24fb7f282 # Parent 57ac6a688ae6283d52333b0fbb1283341233e454# Parent c115fac239ebb03b131e9aacdf72e040de06b006 Merge diff -r c115fac239eb -r 3c9b7ef92c61 .hgtags --- a/.hgtags Thu Apr 25 12:55:49 2013 -0700 +++ b/.hgtags Fri Apr 26 08:40:24 2013 -0700 @@ -334,4 +334,6 @@ 09b0d3e9ba6cdf7da07d4010d2d1df14596f6864 hs25-b27 6d88a566d369f6a1f86912cad7d0912686b2fda1 hs25-b28 86db4847f195c0ecceea646431f1ff22d56282e8 jdk8-b86 +d4c2667846607042370760e23f64c3ab9350e60d jdk8-b87 01d5f04e64dc2d64625b2db2056f5ed4de918a45 hs25-b29 +c4af77d2045476c56fbf3f914b336bb1b7cd18af hs25-b30 diff -r c115fac239eb -r 3c9b7ef92c61 make/hotspot_version --- a/make/hotspot_version Thu Apr 25 12:55:49 2013 -0700 +++ b/make/hotspot_version Fri Apr 26 08:40:24 2013 -0700 @@ -35,7 +35,7 @@ HS_MAJOR_VER=25 HS_MINOR_VER=0 -HS_BUILD_NUMBER=30 +HS_BUILD_NUMBER=31 JDK_MAJOR_VER=1 JDK_MINOR_VER=8 diff -r c115fac239eb -r 3c9b7ef92c61 src/cpu/x86/vm/templateInterpreter_x86_32.cpp --- a/src/cpu/x86/vm/templateInterpreter_x86_32.cpp Thu Apr 25 12:55:49 2013 -0700 +++ b/src/cpu/x86/vm/templateInterpreter_x86_32.cpp Fri Apr 26 08:40:24 2013 -0700 @@ -360,7 +360,7 @@ const Address mdo_invocation_counter(rax, in_bytes(MethodData::invocation_counter_offset()) + in_bytes(InvocationCounter::counter_offset())); __ increment_mask_and_jump(mdo_invocation_counter, increment, mask, rcx, false, Assembler::zero, overflow); - __ jmpb(done); + __ jmp(done); } __ bind(no_mdo); // Increment counter in MethodCounters diff -r c115fac239eb -r 3c9b7ef92c61 src/cpu/x86/vm/templateInterpreter_x86_64.cpp --- a/src/cpu/x86/vm/templateInterpreter_x86_64.cpp Thu Apr 25 12:55:49 2013 -0700 +++ b/src/cpu/x86/vm/templateInterpreter_x86_64.cpp Fri Apr 26 08:40:24 2013 -0700 @@ -315,7 +315,7 @@ const Address mdo_invocation_counter(rax, in_bytes(MethodData::invocation_counter_offset()) + in_bytes(InvocationCounter::counter_offset())); __ increment_mask_and_jump(mdo_invocation_counter, increment, mask, rcx, false, Assembler::zero, overflow); - __ jmpb(done); + __ jmp(done); } __ bind(no_mdo); // Increment counter in MethodCounters diff -r c115fac239eb -r 3c9b7ef92c61 src/cpu/x86/vm/x86_64.ad --- a/src/cpu/x86/vm/x86_64.ad Thu Apr 25 12:55:49 2013 -0700 +++ b/src/cpu/x86/vm/x86_64.ad Fri Apr 26 08:40:24 2013 -0700 @@ -2222,12 +2222,6 @@ $$$emit32$src$$constant; %} - enc_class Con64(immL src) - %{ - // Output immediate - emit_d64($src$$constant); - %} - enc_class Con32F_as_bits(immF src) %{ // Output Float immediate bits @@ -7608,7 +7602,7 @@ ins_pipe( pipe_cmpxchg ); %} -instruct xaddL_no_res( memory mem, Universe dummy, immL add, rFlagsReg cr) %{ +instruct xaddL_no_res( memory mem, Universe dummy, immL32 add, rFlagsReg cr) %{ predicate(n->as_LoadStore()->result_not_used()); match(Set dummy (GetAndAddL mem add)); effect(KILL cr); diff -r c115fac239eb -r 3c9b7ef92c61 src/share/vm/c1/c1_RangeCheckElimination.cpp --- a/src/share/vm/c1/c1_RangeCheckElimination.cpp Thu Apr 25 12:55:49 2013 -0700 +++ b/src/share/vm/c1/c1_RangeCheckElimination.cpp Fri Apr 26 08:40:24 2013 -0700 @@ -459,7 +459,7 @@ // Iterate over all different indices if (_optimistic) { - for (int i=0; iid()]; assert(info != NULL, "Info must not be null"); @@ -531,9 +531,7 @@ remove_range_check(ai); } } - _access_indexed_info[index_instruction->id()] = NULL; } - indices.clear(); if (list_constant.length() > 1) { AccessIndexed *first = list_constant.at(0); @@ -560,6 +558,13 @@ } } } + + // Clear data structures for next array + for (int i = 0; i < indices.length(); i++) { + Instruction *index_instruction = indices.at(i); + _access_indexed_info[index_instruction->id()] = NULL; + } + indices.clear(); } } diff -r c115fac239eb -r 3c9b7ef92c61 src/share/vm/opto/library_call.cpp diff -r c115fac239eb -r 3c9b7ef92c61 test/compiler/8011901/Test8011901.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/compiler/8011901/Test8011901.java Fri Apr 26 08:40:24 2013 -0700 @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8011901 + * @summary instruct xaddL_no_res shouldn't allow 64 bit constants. + * @run main/othervm -XX:-BackgroundCompilation Test8011901 + * + */ + +import java.lang.reflect.*; +import sun.misc.*; + +public class Test8011901 { + + private long ctl; + + private static final sun.misc.Unsafe U; + private static final long CTL; + + static { + try { + Field unsafe = sun.misc.Unsafe.class.getDeclaredField("theUnsafe"); + unsafe.setAccessible(true); + U = (sun.misc.Unsafe) unsafe.get(null); + CTL = U.objectFieldOffset(Test8011901.class.getDeclaredField("ctl")); + } catch (Exception e) { + throw new Error(e); + } + } + + public static void main(String[] args) { + for(int c = 0; c < 20000; c++) { + new Test8011901().makeTest(); + } + System.out.println("Test Passed"); + } + + public static final long EXPECTED = 1L << 42; + + public void makeTest() { + U.getAndAddLong(this, CTL, EXPECTED); + if (ctl != EXPECTED) { + throw new RuntimeException("Test failed. Expected: " + EXPECTED + ", but got = " + ctl); + } + } +}